|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ed.inf.graph.compound.base.BaseChildCompoundGraph
public abstract class BaseChildCompoundGraph
Constructor Summary | |
---|---|
protected |
BaseChildCompoundGraph(BaseGraphCopyBuilder copyBuilder,
BaseGraphMoveBuilder moveBuilder)
|
Method Summary | |
---|---|
protected void |
addNewEdge(BaseCompoundEdge newEdge)
|
protected void |
addNewNode(BaseCompoundNode newNode)
|
boolean |
canCopyHere(ISubCompoundGraph<? extends BaseCompoundNode,? extends BaseCompoundEdge> subGraph)
Tests whether the subGraph can be copied to this graph. |
boolean |
canMoveHere(ISubCompoundGraph<? extends BaseCompoundNode,? extends BaseCompoundEdge> iSubGraph)
Tests whether the subGraph can be moved to this graph. |
boolean |
containsConnection(BaseCompoundNode thisNode,
BaseCompoundNode thatNode)
Tests if the graph contains an edge connecting these nodes. |
boolean |
containsConnection(IBasicPair<? extends BaseCompoundNode,? extends BaseCompoundEdge> ends)
Tests if the graph has an edge between the defined ends. |
boolean |
containsDirectedEdge(BaseCompoundNode outNode,
BaseCompoundNode inNode)
Tests if there is one or more directed edges from the outNode to the inNode . |
boolean |
containsDirectedEdge(IDirectedPair<? extends BaseCompoundNode,? extends BaseCompoundEdge> ends)
Test if there is one or more directed edge defined by the end pair ends . |
boolean |
containsEdge(BaseCompoundEdge edge)
Tests if the graph contains the edge. |
boolean |
containsEdge(int edgeIdx)
Tests if the graph contains the edge of the given index. |
boolean |
containsNode(BaseCompoundNode node)
Tests if this node exists in the graph. |
boolean |
containsNode(int nodeIdx)
Tests if the graph contains the node with the given index number. |
void |
copyHere(ISubCompoundGraph<? extends BaseCompoundNode,? extends BaseCompoundEdge> subGraph)
Copies a subgraph into this graph. |
protected void |
createEdgeSet(IDirectedEdgeSet<BaseCompoundNode,BaseCompoundEdge> edgeSet)
|
protected void |
createNodeSet(INodeSet<BaseCompoundNode,BaseCompoundEdge> nodeSet)
|
abstract BaseChildCompoundEdgeFactory |
edgeFactory()
Gets the edgeFactory for this class. |
java.util.Iterator<BaseCompoundEdge> |
edgeIterator()
Get an iterator that traverses all the edges in this graph. |
BaseSubCompoundGraph |
getCopiedComponents()
Retrieves the nodes and edges created in this graph by the last copy operation. |
BaseCompoundEdge |
getEdge(int edgeIdx)
Get the edge with this index. |
protected IEdgeSet<BaseCompoundNode,BaseCompoundEdge> |
getEdgeSet()
|
BaseSubCompoundGraph |
getMovedComponents()
Retrieves the nodes and edges created in this graph by the last copy operation. |
BaseCompoundNode |
getNode(int nodeIdx)
Get the node matching the nodeIdx. |
protected INodeSet<BaseCompoundNode,BaseCompoundEdge> |
getNodeSet()
|
int |
getNumEdges()
Get the number of edges in the graph. |
int |
getNumNodes()
Get the number of nodes in the graph. |
abstract BaseCompoundNode |
getRootNode()
Get the root node of this graph. |
BaseCompoundGraph |
getSuperGraph()
Gets the compound graph that owns this child graph. |
protected abstract boolean |
hasPassedAdditionalValidation()
A hook method that should be used to provide addition validation for the class inheriting from this one. |
boolean |
isInducedSubgraph()
|
boolean |
isValid()
|
void |
moveHere(ISubCompoundGraph<? extends BaseCompoundNode,? extends BaseCompoundEdge> subGraph)
Moves a subgraph into this graph. |
abstract BaseCompoundNodeFactory |
nodeFactory()
|
java.util.Iterator<BaseCompoundNode> |
nodeIterator()
Get an iterator that traverses all the nodes in this graph. |
protected java.util.Iterator<BaseCompoundEdge> |
unfilteredEdgeIterator()
|
protected java.util.Iterator<BaseCompoundNode> |
unfilteredNodeIterator()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected BaseChildCompoundGraph(BaseGraphCopyBuilder copyBuilder, BaseGraphMoveBuilder moveBuilder)
Method Detail |
---|
protected final void createNodeSet(INodeSet<BaseCompoundNode,BaseCompoundEdge> nodeSet)
protected final void createEdgeSet(IDirectedEdgeSet<BaseCompoundNode,BaseCompoundEdge> edgeSet)
protected final IEdgeSet<BaseCompoundNode,BaseCompoundEdge> getEdgeSet()
protected final INodeSet<BaseCompoundNode,BaseCompoundEdge> getNodeSet()
public abstract BaseCompoundNode getRootNode()
ICompoundGraph
getRootNode
in interface ICompoundGraph<BaseCompoundNode,BaseCompoundEdge>
public boolean containsDirectedEdge(BaseCompoundNode outNode, BaseCompoundNode inNode)
IDirectedGraph
outNode
to the inNode
.
containsDirectedEdge
in interface IDirectedGraph<BaseCompoundNode,BaseCompoundEdge>
outNode
- the node the edge comes out from, can be null.inNode
- the node the edge goes into, can be null.
public final boolean containsConnection(BaseCompoundNode thisNode, BaseCompoundNode thatNode)
IBasicGraph
containsConnection
in interface IBasicGraph<BaseCompoundNode,BaseCompoundEdge>
thisNode
- a node to test.thatNode
- the other node to test.
public final boolean containsEdge(BaseCompoundEdge edge)
IBasicGraph
containsEdge
in interface IBasicGraph<BaseCompoundNode,BaseCompoundEdge>
edge
- the edge to test.
public final boolean containsEdge(int edgeIdx)
IBasicGraph
containsEdge
in interface IBasicGraph<BaseCompoundNode,BaseCompoundEdge>
edgeIdx
- the index to test.
public final boolean containsNode(int nodeIdx)
IBasicGraph
containsNode
in interface IBasicGraph<BaseCompoundNode,BaseCompoundEdge>
nodeIdx
- The index number of the node.
public boolean containsNode(BaseCompoundNode node)
IBasicGraph
containsNode
in interface IBasicGraph<BaseCompoundNode,BaseCompoundEdge>
node
- to be tested.
public BaseCompoundEdge getEdge(int edgeIdx)
IBasicGraph
getEdge
in interface IBasicGraph<BaseCompoundNode,BaseCompoundEdge>
edgeIdx
- The index of the edge.
public final java.util.Iterator<BaseCompoundEdge> edgeIterator()
IBasicGraph
edgeIterator
in interface IBasicGraph<BaseCompoundNode,BaseCompoundEdge>
protected final java.util.Iterator<BaseCompoundEdge> unfilteredEdgeIterator()
protected final java.util.Iterator<BaseCompoundNode> unfilteredNodeIterator()
public BaseCompoundNode getNode(int nodeIdx)
IBasicGraph
getNode
in interface IBasicGraph<BaseCompoundNode,BaseCompoundEdge>
nodeIdx
- the node index to lookup.
public final java.util.Iterator<BaseCompoundNode> nodeIterator()
IBasicGraph
nodeIterator
in interface IBasicGraph<BaseCompoundNode,BaseCompoundEdge>
public final int getNumEdges()
IBasicGraph
getNumEdges
in interface IBasicGraph<BaseCompoundNode,BaseCompoundEdge>
public final int getNumNodes()
IBasicGraph
getNumNodes
in interface IBasicGraph<BaseCompoundNode,BaseCompoundEdge>
public final boolean canCopyHere(ISubCompoundGraph<? extends BaseCompoundNode,? extends BaseCompoundEdge> subGraph)
IModifiableChildCompoundGraph
canCopyHere
in interface IModifiableChildCompoundGraph<BaseCompoundNode,BaseCompoundEdge>
public final void copyHere(ISubCompoundGraph<? extends BaseCompoundNode,? extends BaseCompoundEdge> subGraph)
IModifiableChildCompoundGraph
copyHere
in interface IModifiableChildCompoundGraph<BaseCompoundNode,BaseCompoundEdge>
public BaseCompoundGraph getSuperGraph()
IChildCompoundGraph
getSuperGraph
in interface IChildCompoundGraph<BaseCompoundNode,BaseCompoundEdge>
public final boolean isInducedSubgraph()
protected void addNewNode(BaseCompoundNode newNode)
protected void addNewEdge(BaseCompoundEdge newEdge)
public final boolean containsDirectedEdge(IDirectedPair<? extends BaseCompoundNode,? extends BaseCompoundEdge> ends)
IDirectedGraph
ends
.
containsDirectedEdge
in interface IDirectedGraph<BaseCompoundNode,BaseCompoundEdge>
ends
- the pair of nodes to be tested, can be null.
public final boolean containsConnection(IBasicPair<? extends BaseCompoundNode,? extends BaseCompoundEdge> ends)
IBasicGraph
containsConnection
in interface IBasicGraph<BaseCompoundNode,BaseCompoundEdge>
ends
- the ends of the edge to test.
public abstract BaseCompoundNodeFactory nodeFactory()
nodeFactory
in interface IModifiableChildCompoundGraph<BaseCompoundNode,BaseCompoundEdge>
public abstract BaseChildCompoundEdgeFactory edgeFactory()
IModifiableChildCompoundGraph
edgeFactory
in interface IModifiableChildCompoundGraph<BaseCompoundNode,BaseCompoundEdge>
public boolean canMoveHere(ISubCompoundGraph<? extends BaseCompoundNode,? extends BaseCompoundEdge> iSubGraph)
subGraph
can be children.
In addition at least one node must be moving to a new child graph.
of this child compound graph.
canMoveHere
in interface IModifiableChildCompoundGraph<BaseCompoundNode,BaseCompoundEdge>
subGraph
- the subgraph to test, can be null.
public void moveHere(ISubCompoundGraph<? extends BaseCompoundNode,? extends BaseCompoundEdge> subGraph)
subGraph
.
The new nodes from the move can be found in getMovedComponents()
and the removed nodes will be found in subGraph
.
At least one node must be moving to a new child graph. Only those nodes and edges
that have a new owning child graph will be moved, other nodes will remain where they are.
moveHere
in interface IModifiableChildCompoundGraph<BaseCompoundNode,BaseCompoundEdge>
subGraph
- the subgraph to move.
java.lang.IllegalArgumentException
- if canMoveHere(subGraph) == false
.public BaseSubCompoundGraph getMovedComponents()
getMovedComponents
in interface IModifiableChildCompoundGraph<BaseCompoundNode,BaseCompoundEdge>
public BaseSubCompoundGraph getCopiedComponents()
IModifiableChildCompoundGraph
getCopiedComponents
in interface IModifiableChildCompoundGraph<BaseCompoundNode,BaseCompoundEdge>
protected abstract boolean hasPassedAdditionalValidation()
public boolean isValid()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |