twitter/cassovary — pull request #19 by adelbertc (2012-08-19 23:04:20+00:00)
Title: Adding ReadFromEdgelist functionality to easily read graphs for disk

Big graphs are easily represented by edgelist files, and in my experience this is how I usually read my graphs in. Currently I have `ReadFromEdgelist` functionality for `ArrayBasedDirectedGraph`.

The spec for `ReadFromEdgelist` uses the edgelist file found in `src/test/resources/graphs/ExampleGraph.edgelist`, which is the edgelist representation of the same graph in the `ArrayBasedDirectedGraphSpec`.

The `ReadFromEdgelistSpec` is the exact same as that of `ArrayBasedDirectedGraph`, except without the "map xxxxxx edges" check as the current implementation does not allow repeat edges via a `Set`, and converting it to an `Array` does not make it sorted. I figured since this is for big graphs, sorting the edges would take an unnecessary amount of time and there doesn't seem to be any methods that make use of a sorted `Array` of edges, though this can be easily implemented if desired.