agl2.rep
Class AdjacentEdgeRep
java.lang.Object
|
+--agl2.rep.AdjacentEdgeRep
- All Implemented Interfaces:
- java.lang.Cloneable, DirectedEdgeRep, EdgeRep, java.io.Serializable
- public class AdjacentEdgeRep
- extends java.lang.Object
- implements DirectedEdgeRep, java.io.Serializable, java.lang.Cloneable
The AdjacentEdgeRep
Supports user defined edge types
Maintain a hash table of nodes
to edges.
- See Also:
- Serialized Form
Field Summary |
static java.util.HashSet |
repTags
|
Method Summary |
Edge |
addEdge(java.lang.Object v1,
java.lang.Object v2)
|
java.lang.Object |
addNode(java.lang.Object o)
Add a node to the edge rep. |
EdgeRep |
cloneRep()
|
java.util.Set |
getAdjacentEdges(java.lang.Object o)
|
java.util.Set |
getAdjacentNodes(java.lang.Object o)
|
Edge |
getEdge(java.lang.Object from,
java.lang.Object to)
|
java.util.Set |
getEdges()
|
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 v1,
java.lang.Object v2)
|
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 |
repTags
public static final java.util.HashSet repTags
AdjacentEdgeRep
public AdjacentEdgeRep()
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
isNode
public boolean isNode(java.lang.Object v1)
- Specified by:
isNode
in interface EdgeRep
addEdge
public Edge addEdge(java.lang.Object v1,
java.lang.Object v2)
- Specified by:
addEdge
in interface EdgeRep
remEdge
public void remEdge(Edge e)
- Specified by:
remEdge
in interface EdgeRep
hasEdge
public boolean hasEdge(java.lang.Object v1,
java.lang.Object v2)
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
getAdjacentNodes
public java.util.Set getAdjacentNodes(java.lang.Object o)
- Specified by:
getAdjacentNodes
in interface DirectedEdgeRep
getEdges
public java.util.Set getEdges()
- Specified by:
getEdges
in interface EdgeRep
getAdjacentEdges
public java.util.Set getAdjacentEdges(java.lang.Object o)
- Specified by:
getAdjacentEdges
in interface DirectedEdgeRep
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