uk.ed.inf.graph.util.impl
Class AdjList

java.lang.Object
  extended by uk.ed.inf.graph.util.impl.AdjList
All Implemented Interfaces:
IAdjacencyDataStructure

public final class AdjList
extends java.lang.Object
implements IAdjacencyDataStructure


Nested Class Summary
static class AdjList.AdjUnitComparitor
           
 
Constructor Summary
AdjList()
           
AdjList(int initialCapacity)
           
 
Method Summary
 void addEdge(int edgeIdx, int thisNodeIdx, int thatNodeIdx)
           
 void addNode(int nodeIdx)
           
 boolean containsNode(int nodeIdx)
           
(package private)  void ensureCapacity(int capacity)
           
 int getEdge(int thisNodeIdx, int thatNodeIdx)
           
 boolean isConnected(int thisNodeIdx, int thatNodeIdx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdjList

public AdjList()

AdjList

public AdjList(int initialCapacity)
Method Detail

addNode

public void addNode(int nodeIdx)
Specified by:
addNode in interface IAdjacencyDataStructure

containsNode

public boolean containsNode(int nodeIdx)
Specified by:
containsNode in interface IAdjacencyDataStructure

addEdge

public void addEdge(int edgeIdx,
                    int thisNodeIdx,
                    int thatNodeIdx)
Specified by:
addEdge in interface IAdjacencyDataStructure

isConnected

public boolean isConnected(int thisNodeIdx,
                           int thatNodeIdx)
Specified by:
isConnected in interface IAdjacencyDataStructure

getEdge

public int getEdge(int thisNodeIdx,
                   int thatNodeIdx)
Specified by:
getEdge in interface IAdjacencyDataStructure

ensureCapacity

void ensureCapacity(int capacity)