uk.ed.inf.graph.util.impl
Class AdjMatrix
java.lang.Object
uk.ed.inf.graph.util.impl.AdjMatrix
- All Implemented Interfaces:
- IAdjacencyDataStructure
public final class AdjMatrix
- extends java.lang.Object
- implements IAdjacencyDataStructure
Implementation of an adjacency matrix.
NOT TESTED, so not completed.
- Author:
- smoodie
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdjMatrix
public AdjMatrix()
addNode
public void addNode(int idx)
- Specified by:
addNode
in interface IAdjacencyDataStructure
addEdge
public void addEdge(int one,
int two,
int edgeIdx)
- Specified by:
addEdge
in interface IAdjacencyDataStructure
getEdge
public int getEdge(int one,
int two)
- Specified by:
getEdge
in interface IAdjacencyDataStructure
isConnected
public boolean isConnected(int one,
int two)
- Specified by:
isConnected
in interface IAdjacencyDataStructure
containsNode
public boolean containsNode(int nodeIdx)
- Specified by:
containsNode
in interface IAdjacencyDataStructure