Construct a shared array-based graph from a sequence of NodeIdEdgesMaxId iterables.
Construct a shared array-based graph from a sequence of NodeIdEdgesMaxId iterables. Eg each Iterable[NodeIdEdgesMaxId] could come from one graph dump file.
This function builds the graph using similar steps as in ArrayBasedDirectedGraph. The main difference here is that instead of each node storing neighbor ids in separate arrays of ids, here one shared array is used for all neighbor ids. Thus each node can find its edges through an offset into this shared array. To avoid huge arrays, this edge array is also sharded based on node's id.
the sequence of nodes each with its own edges
number of threads construction uses
the direction of the graph to be built
specifies the number of shards to use in creating shared array