analyzeLabelCombinations method
Label combination analysis
Analyzes combination patterns of entities with multiple labels.
Implementation
Future<Map<Set<String>, int>> analyzeLabelCombinations() async {
final combinations = <Set<String>, int>{};
// Analyze vertex combinations
await _graph.transaction((txn) async {
await for (final vertex in txn.vertices()) {
if (vertex.labels.length > 1) {
combinations[vertex.labels] = (combinations[vertex.labels] ?? 0) + 1;
}
}
// Analyze edge combinations
await for (final edge in txn.edges()) {
if (edge.labels.length > 1) {
combinations[edge.labels] = (combinations[edge.labels] ?? 0) + 1;
}
}
});
return combinations;
}