uk.ed.inf.graph.util.impl
Class AdjList
java.lang.Object
uk.ed.inf.graph.util.impl.AdjList
- All Implemented Interfaces:
- IAdjacencyDataStructure
public final class AdjList
- extends java.lang.Object
- implements IAdjacencyDataStructure
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdjList
public AdjList()
AdjList
public AdjList(int initialCapacity)
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)