agouge/graphhopper-sna — pull request #11 by agouge (2013-05-06 09:07:34+00:00)
Title: Convert project from GraphHopper to JGraphT

After much consideration, I have decided to convert this project to use JGraphT rather than GraphHopper as the underlying graph structure.

I based this decision on a few factors:
* The object-oriented nature of JGraphT. Being able to easily create node and edge objects is a plus, and should come in handy for future modeling applications.
* JGraphT's rich graph-theoretic API (which doesn't change very often).

In terms of performance, I am currently seeing:
* An improvement on weighted graphs (using Dijkstra)
* Slightly reduced performance on unweighted graphs (using BFS)

The Dijkstra improvement is probably due to the elimination of the hashmap lookups I was using (mapping a node to its "information"). The BFS decrease may be due to a slow Java queue, but I have to dig around a little more to try to improve this.

I will soon be renaming this project since it no longer uses GraphHopper.

Summary of the changes made:
* General reduction of object creation. Now analyzers just have one algorithm that is reused instead of initializing an algorithm for every node.
* Much better unit tests. Add "keyed graphs" for use in the unit tests.
* Fix closeness for directed graphs so that nodes not belonging to a strongly connected component have a closeness value of zero.

Fixes #3.