Closed pankajgupta closed 9 years ago
What you want is: For ArrayBasedDirectedGraph: To keep in every node an Array of neighbors (only those existing). Use Binary Search for lookup, linear intersection. Right?
Yes, except also for others like SharedArrayBasedDirectedGraph. cc @plofgren as he was interested in this.
Is anyone working on this issue? If not, I can start working on it soon.
I can work on ArrayBasedDirectedGraph
I'll try to work on SharedArrayBasedDirectedGraph .
In some applications one needs fast intersections of adjacency lists and fast search of whether a node v is a neighbor of a node u. In such cases, a graph that keeps the adjacency list in sorted order would be great.
This should work for both in and out directions in both ArrayBasedDirectedGraph and SharedArrayBasedDirectedGraph.