agl2.rep
Class AdjacentMultiEdgeRep
java.lang.Object
|
+--agl2.rep.AdjacentMultiEdgeRep
- All Implemented Interfaces:
- DirectedEdgeRep, EdgeRep, java.io.Serializable
- public class AdjacentMultiEdgeRep
- extends java.lang.Object
- implements DirectedEdgeRep, java.io.Serializable
The AdjacentEdgeRep
Supports user defined edge types
Maintain a hash table of nodes
to edges.
- See Also:
- Serialized Form
Method Summary |
void |
addEdge(java.lang.Object v1,
java.lang.Object v2,
Edge e)
|
void |
addNode(java.lang.Object o)
Add a node to the edge rep. |
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,
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(java.lang.Object v1,
java.lang.Object v2,
Edge e)
|
void |
remNode(java.lang.Object o)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdjacentMultiEdgeRep
public AdjacentMultiEdgeRep()
addNode
public void 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 void addEdge(java.lang.Object v1,
java.lang.Object v2,
Edge e)
remEdge
public void remEdge(java.lang.Object v1,
java.lang.Object v2,
Edge e)
hasEdge
public boolean hasEdge(java.lang.Object v1,
java.lang.Object v2,
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
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.