public class EfficientMatrixGraph
extends java.lang.Object
An efficient implementation of a graph data structure. This class uses many bad OOP principles for the sake of
efficiency. For instance, there are no accessors, etc. Instead, direct access is allowed. Sure it only saves a little
bit, but every little bit counts. This also stores both adjacency list and matrix so each operation can be done as
efficiently as possible. Since it is (in theory) immutable, there should be no problems with inconsistency.
- Author:
- Modified by Chuck Cusack, April 2010