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

java.lang.Object
  extended by 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

Constructor Summary
AdjMatrix()
           
 
Method Summary
 void addEdge(int one, int two, int edgeIdx)
           
 void addNode(int idx)
           
 boolean containsNode(int nodeIdx)
           
 int getEdge(int one, int two)
           
 boolean isConnected(int one, int two)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdjMatrix

public AdjMatrix()
Method Detail

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