|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
MutableGEPath is an interface for represtenting mutable paths through GEDigraph.
Direct implementations of GEDigraph should have a copy constructor that takes a GEPath, and a constructor that requires a GEDigraph and a start node.
Field Summary |
Fields inherited from interface net.walend.digraph.GEDigraph |
EMPTY |
Method Summary | |
void |
addToHead(java.lang.Object node)
Adds an edge and node to the beginning of the path. |
void |
addToTail(java.lang.Object node)
Adds an edge and a node to the end of the path. |
void |
graftToHead(GEPath path)
Adds a path to the beginning of this path. |
void |
graftToTail(GEPath path)
Adds a path to the end of this path. |
GEPath |
pruneHead(int index)
Removes from the head to the edge at index. |
GEPath |
pruneHeadFromFirst(java.lang.Object node)
Removes from the head to the first occurance of node. |
GEPath |
pruneHeadFromLast(java.lang.Object node)
Removes from the head to the last occurance of node. |
GEPath |
pruneTail(int index)
Removes from the edge at index to the tail. |
GEPath |
pruneTailFromFirst(java.lang.Object node)
Removes from the first occurance of node to the tail. |
GEPath |
pruneTailFromLast(java.lang.Object node)
Removes from the last occurance of node to the tail. |
void |
removeHead()
Removes the head node from the path. |
void |
removeTail()
Removes the tail node from the path. |
GEPath |
splice(GEPath path,
int startNodeIndex,
int endNodeIndex)
Splices in path between the startNodeIndex and endNodeIndex. |
GEPath |
spliceFirst(GEPath path)
Splices in path between the first occurence of path's head and the first occurence of path's tail. |
GEPath |
spliceFirstToLast(GEPath path)
Splices in path between the first occurence of path's head and the last occurence of path's tail. |
GEPath |
spliceLast(GEPath path)
Splices in path between the last occurence of path's head and the last occurence of path's tail. |
GEPath |
spliceLastToFirst(GEPath path)
Splices in path between the last occurence of path's head and the first occurence of path's tail. |
Methods inherited from interface net.walend.digraph.path.GEPath |
getSubpath, getSubpathFirst, getSubpathFirstToLast, getSubpathLast, getSubpathLastToFirst, getSupergraph, sameGEPathAs |
Methods inherited from interface net.walend.digraph.GEDigraph |
containsGEDigraph, intersectWithGEDigraph, sameGEDigraphAs, unionGEDigraph |
Methods inherited from interface net.walend.digraph.Digraph |
containsEdge, containsNode, containsNodes, countInboundEdges, countOutboundEdges, edgeCount, edgeNodeIterator, getFromNodes, getNodes, getToNodes, isEdgeFree, isEmpty, nodeCount, nodeIterator |
Methods inherited from interface net.walend.collection.HasState |
getPrincipleInterface, sameStateAs |
Methods inherited from interface net.walend.digraph.path.Path |
getHead, getIndexOfNode, getLastIndexOfNode, getNodeAtIndex, getNodeList, getTail, pathEdgeCount, pathEdgeNodeIterator, pathNodeCount, pathNodeIterator, valid |
Method Detail |
public void addToTail(java.lang.Object node) throws EdgeMissingException, NodeMissingException
EdgeMissingException
- if the edge is not in the digraph between the tail node and node.
NodeMissingException
- if the node is not in the digraph.public void addToHead(java.lang.Object node) throws EdgeMissingException, NodeMissingException
EdgeMissingException
- if the edge is not in the digraph between the head node and node.
NodeMissingException
- if the node is not in the digraph.public void graftToHead(GEPath path) throws EdgeMissingException, NodeMissingException, InvalidSpliceException
EdgeMissingException
- if the any edge in path is missing from the digraph.
NodeMissingException
- if any node in path not in the digraph.
InvalidSpliceException
- if path's tail node is not this' head node.public void graftToTail(GEPath path) throws EdgeMissingException, NodeMissingException, InvalidSpliceException
EdgeMissingException
- if the any edge in path is missing from the digraph.
NodeMissingException
- if any node in path not in the digraph.
InvalidSpliceException
- if path's head node is not this' tail node.public void removeHead() throws LastNodeException
LastNodeException
public void removeTail() throws LastNodeException
LastNodeException
public GEPath pruneTail(int index)
public GEPath pruneHead(int index)
public GEPath pruneTailFromFirst(java.lang.Object node) throws NodeMissingException
NodeMissingException
- if the node is not in the digraph.public GEPath pruneTailFromLast(java.lang.Object node) throws NodeMissingException
NodeMissingException
- if the node is not in the digraph.public GEPath pruneHeadFromFirst(java.lang.Object node) throws NodeMissingException
NodeMissingException
- if the node is not in the digraph.public GEPath pruneHeadFromLast(java.lang.Object node) throws NodeMissingException
NodeMissingException
- if the node is not in the digraph.public GEPath splice(GEPath path, int startNodeIndex, int endNodeIndex) throws EdgeMissingException, NodeMissingException, InvalidSpliceException
EdgeMissingException
- if the any edge in path is missing from the digraph.
NodeMissingException
- if any node in path not in the digraph.
InvalidSpliceException
- if path's head node is not the node in this at startNodeIndex, or if the path's tail node is not the node in this at endNodeIndex.public GEPath spliceFirst(GEPath path) throws EdgeMissingException, NodeMissingException, InvalidSpliceException
EdgeMissingException
- if the any edge in path is missing from the digraph.
NodeMissingException
- if any node in path not in the digraph.
InvalidSpliceException
- if path's head node is not the node in this at startNodeIndex, or if the path's tail node is not the node in this at endNodeIndex.public GEPath spliceLast(GEPath path) throws EdgeMissingException, NodeMissingException, InvalidSpliceException
EdgeMissingException
- if the any edge in path is missing from the digraph.
NodeMissingException
- if any node in path not in the digraph.
InvalidSpliceException
- if path's head node is not the node in this at startNodeIndex, or if the path's tail node is not the node in this at endNodeIndex.public GEPath spliceFirstToLast(GEPath path) throws EdgeMissingException, NodeMissingException, InvalidSpliceException
EdgeMissingException
- if the any edge in path is missing from the digraph.
NodeMissingException
- if any node in path not in the digraph.
InvalidSpliceException
- if path's head node is not the node in this at startNodeIndex, or if the path's tail node is not the node in this at endNodeIndex.public GEPath spliceLastToFirst(GEPath path) throws EdgeMissingException, NodeMissingException, InvalidSpliceException
EdgeMissingException
- if the any edge in path is missing from the digraph.
NodeMissingException
- if any node in path not in the digraph.
InvalidSpliceException
- if path's head node is not the node in this at startNodeIndex, or if the path's tail node is not the node in this at endNodeIndex.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |