public class LightweightNetwork extends LightweightGraph
LightweightGraph.TraversalIterator
Constructor and Description |
---|
LightweightNetwork()
Create a new, empty, light-weight network
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
public LightweightNetwork()
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)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.