twitter / cassovary

Cassovary is a simple big graph processing library for the JVM
http://twitter.com/cassovary
Apache License 2.0
1.05k stars 150 forks source link

Allow sparse array representation in ArrayBasedDirectedGraph #199

Open pankajgupta opened 9 years ago

pankajgupta commented 9 years ago

Currently all nodes are stored in an array of size maxNodeId+1. This is wasteful in memory when the node ids are sparsely distributed. Make a sparse representation of the collection of nodes (e.g., using fastutils int2int map or a trie, or some other home grown version) that maps node id to a node efficiently and compactly.

pankajgupta commented 9 years ago

Working on this.