|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.pod.lwgraph.LightweightGraph
diva.pod.lwgraph.LightweightNetwork
public class LightweightNetwork
A light-weight network is an extension of light-weight graph, and adds methods for dealing with explicit port objects.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class diva.pod.lwgraph.LightweightGraph |
---|
LightweightGraph.TraversalIterator |
Constructor Summary | |
---|---|
LightweightNetwork()
Create a new, empty, light-weight network |
Method Summary | |
---|---|
void |
addEdge(LWEdge edge)
Add an edge to the graph. |
void |
addPort(LWNode node,
LWPort port)
Add a port to the graph, and give it the given node as its parent |
void |
connect(LWEdge edge,
LWPort tailport,
LWPort headport)
Connect the given tail and head ports using the given edge. |
LWPort |
getHeadPort(LWEdge edge)
Get the head port of the given edge, or null if there isn't one. |
LWPort |
getTailPort(LWEdge edge)
Get the tail port of the given edge, or null if there isn't one. |
Iterator |
ports(LWNode node)
Return an iterator over the ports that belong to the given node. |
void |
setHeadPort(LWEdge edge,
LWPort head)
Connect the given head port to an edge. |
void |
setTailPort(LWEdge edge,
LWPort tail)
Connect the given tail port to an edge. |
Methods inherited from class diva.pod.lwgraph.LightweightGraph |
---|
addNode, cacheTraversal, connect, edges, getEdge, getEdgeCount, getHeadNode, getNode, getNodeCount, getParent, getTailNode, getTopology, inEdges, invalidateCache, nodes, nodes, outEdges, predecessors, removeEdge, removeNode, roots, setHeadNode, setParent, setTailNode, successors |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LightweightNetwork()
Method Detail |
---|
public void addPort(LWNode node, LWPort port)
public void addEdge(LWEdge edge)
addEdge
in class LightweightGraph
public void connect(LWEdge edge, LWPort tailport, LWPort headport)
public LWPort getHeadPort(LWEdge edge)
public LWPort getTailPort(LWEdge edge)
public Iterator ports(LWNode node)
public void setHeadPort(LWEdge edge, LWPort head)
public void setTailPort(LWEdge edge, LWPort tail)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |