twitter/cassovary — pull request #15 by adelbertc (2012-07-09 19:36:30+00:00)
Title: New immutable graph class based on immutable.Map[Int, Node]

MapBasedDirectedGraph is very similar to ArrayBasedDirectedGraph, but potentially more suited for graphs with extremely large node id's. The Map circumvents the need to create an extremely large Array in such a case. Different from SynchronizedDyanmicGraph in that it is immutable.

Added corresponding MapBasedDirectedGraphSpec, uses same tests as ArrayBasedDirectedGraph sans the "iterate over all nodes" - that test fails only because the returned values are out of order since Map is unordered, upon manual inspection everything was OK.