agl2.rep
Class BitMatrixRep

java.lang.Object
  |
  +--agl2.rep.BitMatrixRep
All Implemented Interfaces:
EdgeRep, java.io.Serializable, UndirectedEdgeRep

public class BitMatrixRep
extends java.lang.Object
implements UndirectedEdgeRep, java.io.Serializable

The BitMatrixRep description.

See Also:
Serialized Form

Field Summary
protected  java.util.BitSet adjmatrix
           
protected  int maxnodes
           
protected  int nodeCount
           
static java.util.HashSet repTags
           
protected  agl2.rep.BitMatrixRep.IntVertex[] vertices
           
 
Constructor Summary
BitMatrixRep()
           
BitMatrixRep(int maxnodes)
           
 
Method Summary
 Edge addEdge(java.lang.Object from, java.lang.Object to)
           
 java.lang.Object addNode(java.lang.Object o)
          Add a node to the edge rep.
 EdgeRep cloneRep()
           
 Edge getEdge(java.lang.Object from, java.lang.Object to)
           
 java.util.Set getEdges()
           
 java.util.Set getIncidentEdges(java.lang.Object o)
           
 java.util.Set getIncidentNodes(java.lang.Object o)
           
 java.util.Map getMap(GraphTag tag)
          GraphTag represents map data that is exported by the type.
 java.util.Set getNodes()
           
 boolean hasEdge(java.lang.Object from, java.lang.Object to, Edge e)
           
 boolean isNode(java.lang.Object v1)
           
 java.util.Set provides()
          Each EdgeRep provides certain capabilites For example, it may support multiple edges, or an index of the nodes.
 void remEdge(Edge e)
           
 void remNode(java.lang.Object o)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

repTags

public static final java.util.HashSet repTags

vertices

protected agl2.rep.BitMatrixRep.IntVertex[] vertices

adjmatrix

protected java.util.BitSet adjmatrix

maxnodes

protected int maxnodes

nodeCount

protected int nodeCount
Constructor Detail

BitMatrixRep

public BitMatrixRep()

BitMatrixRep

public BitMatrixRep(int maxnodes)
Method Detail

cloneRep

public EdgeRep cloneRep()
Specified by:
cloneRep in interface EdgeRep

addNode

public java.lang.Object addNode(java.lang.Object o)
Description copied from interface: EdgeRep
Add a node to the edge rep.

Specified by:
addNode in interface EdgeRep
Returns:
An objectof type Vertex or null (any object is a vertex)

remNode

public void remNode(java.lang.Object o)
Specified by:
remNode in interface EdgeRep

addEdge

public Edge addEdge(java.lang.Object from,
                    java.lang.Object to)
Specified by:
addEdge in interface EdgeRep

remEdge

public void remEdge(Edge e)
Specified by:
remEdge in interface EdgeRep

isNode

public boolean isNode(java.lang.Object v1)
Specified by:
isNode in interface EdgeRep

hasEdge

public boolean hasEdge(java.lang.Object from,
                       java.lang.Object to,
                       Edge e)

getEdge

public Edge getEdge(java.lang.Object from,
                    java.lang.Object to)
Specified by:
getEdge in interface EdgeRep

getNodes

public java.util.Set getNodes()
Specified by:
getNodes in interface EdgeRep

getEdges

public java.util.Set getEdges()
Specified by:
getEdges in interface EdgeRep

getIncidentNodes

public java.util.Set getIncidentNodes(java.lang.Object o)
Specified by:
getIncidentNodes in interface UndirectedEdgeRep

getIncidentEdges

public java.util.Set getIncidentEdges(java.lang.Object o)
Specified by:
getIncidentEdges in interface UndirectedEdgeRep

provides

public java.util.Set provides()
Description copied from interface: EdgeRep
Each EdgeRep provides certain capabilites For example, it may support multiple edges, or an index of the nodes. Graphs can use this information to choose a representation from the available candidates.

Specified by:
provides in interface EdgeRep
Returns:
A set of GraphTag

getMap

public java.util.Map getMap(GraphTag tag)
Description copied from interface: EdgeRep
GraphTag represents map data that is exported by the type. Certain EdgeRep classes naturally provide an efficient map. These maps can be aquired using the getMap call. An EdgeRep may return null to signify that the requested map is not supported.

Specified by:
getMap in interface EdgeRep
Returns:
internal map for the associated tag.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object