|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--net.walend.digraph.AbstractMatrixCEDigraph
|
+--net.walend.digraph.MutableMatrixCEDigraph
| Nested Class Summary |
| Nested classes inherited from class net.walend.digraph.AbstractMatrixCEDigraph |
AbstractMatrixCEDigraph.MatrixEdgeIterator, AbstractMatrixCEDigraph.NodeIterator |
| Field Summary | |
private static int |
DEFAULTSIZE
|
| Fields inherited from class net.walend.digraph.AbstractMatrixCEDigraph |
|
| Fields inherited from interface net.walend.digraph.CEDigraph |
EMPTY |
| Constructor Summary | |
MutableMatrixCEDigraph()
|
|
MutableMatrixCEDigraph(CEDigraph digraph)
|
|
MutableMatrixCEDigraph(GEDigraph digraph,
java.lang.Object edge)
|
|
MutableMatrixCEDigraph(int nodeCapacity)
|
|
MutableMatrixCEDigraph(UEDigraph digraph)
|
|
| Method Summary | |
java.lang.Object |
addEdge(int fromIndex,
int toIndex,
java.lang.Object edge)
|
java.lang.Object |
addEdge(java.lang.Object fromNode,
java.lang.Object toNode,
java.lang.Object edge)
Return null if no existing edge is displaced by edge. |
boolean |
addNode(java.lang.Object node)
Return true if the node is added successfully, false if the digraph does not change. |
boolean |
addNodes(java.util.Set nodes)
Return true if adding the nodes changes the digraph. |
void |
clear()
Remove all nodes and edges from the CEDigraph |
void |
clearEdges()
Remove all the edges from the CEDigraph. |
Bag |
removeCEDigraph(CEDigraph digraph)
Return a Bag of edges orphaned when digraph is removed |
java.lang.Object |
removeEdge(int fromIndex,
int toIndex)
|
java.lang.Object |
removeEdge(java.lang.Object fromNode,
java.lang.Object toNode)
Return the edge that connected fromNode to toNode, or null if no edge existed. |
Bag |
removeNode(int index)
|
Bag |
removeNode(java.lang.Object node)
Return the Bag of orphaned edges that are removed with node |
Bag |
removeNodes(java.util.Set nodes)
Return the Bag of edges orphaned edges when these nodes are removed. |
Bag |
retainNodes(java.util.Set nodes)
Return a Bag of orphaned edges when the nodes are removed. |
java.lang.Object |
setNode(int index,
java.lang.Object node)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.walend.digraph.IndexedMutableCEDigraph |
insureCapacity |
| Methods inherited from interface net.walend.digraph.CEDigraph |
containsCEDigraph, containsEdge, edgeIterator, getEdge, getEdges, getInboundEdges, getOutboundEdges, intersectWithCEDigraph, sameCEDigraphAs, unionCEDigraph |
| 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.IndexedCEDigraph |
containsEdge, getEdge, getInboundEdges, getOutboundEdges, indexedEdgeIterator |
| Methods inherited from interface net.walend.digraph.IndexedDigraph |
containsEdge, containsNode, countInboundEdges, countOutboundEdges, getFromIndices, getFromNodes, getNode, getNodeIndex, getToIndices, getToNodes, indexedEdgeNodeIterator, indexedNodeIterator, nodeCapacity, nodeIndices |
| Field Detail |
private static final int DEFAULTSIZE
| Constructor Detail |
public MutableMatrixCEDigraph()
public MutableMatrixCEDigraph(int nodeCapacity)
public MutableMatrixCEDigraph(CEDigraph digraph)
public MutableMatrixCEDigraph(UEDigraph digraph)
public MutableMatrixCEDigraph(GEDigraph digraph,
java.lang.Object edge)
| Method Detail |
public boolean addNode(java.lang.Object node)
MutableCEDigraph
addNode in interface MutableCEDigraphaddNode in class AbstractMatrixCEDigraph
public java.lang.Object addEdge(java.lang.Object fromNode,
java.lang.Object toNode,
java.lang.Object edge)
throws NodeMissingException
MutableCEDigraph
addEdge in interface MutableCEDigraphaddEdge in class AbstractMatrixCEDigraphNodeMissingException - if either node is not in the digraph.
public Bag removeNode(java.lang.Object node)
throws NodeMissingException
MutableCEDigraph
removeNode in interface MutableCEDigraphremoveNode in class AbstractMatrixCEDigraphNodeMissingException - if the node is not in the digraph
public java.lang.Object removeEdge(java.lang.Object fromNode,
java.lang.Object toNode)
throws NodeMissingException
MutableCEDigraph
removeEdge in interface MutableCEDigraphremoveEdge in class AbstractMatrixCEDigraphNodeMissingException - if either node is not in the digraphpublic boolean addNodes(java.util.Set nodes)
MutableCEDigraph
addNodes in interface MutableCEDigraphaddNodes in class AbstractMatrixCEDigraphpublic Bag removeNodes(java.util.Set nodes)
MutableCEDigraph
removeNodes in interface MutableCEDigraphremoveNodes in class AbstractMatrixCEDigraphpublic Bag removeCEDigraph(CEDigraph digraph)
MutableCEDigraph
removeCEDigraph in interface MutableCEDigraphremoveCEDigraph in class AbstractMatrixCEDigraphpublic Bag retainNodes(java.util.Set nodes)
MutableCEDigraph
retainNodes in interface MutableCEDigraphretainNodes in class AbstractMatrixCEDigraphpublic void clear()
MutableCEDigraph
clear in interface MutableCEDigraphclear in class AbstractMatrixCEDigraphpublic void clearEdges()
MutableCEDigraph
clearEdges in interface MutableCEDigraphclearEdges in class AbstractMatrixCEDigraph
public java.lang.Object setNode(int index,
java.lang.Object node)
setNode in interface IndexedMutableCEDigraphsetNode in class AbstractMatrixCEDigraphjava.lang.ArrayIndexOutOfBoundsException - if index does not have a node. Use nodeIndicies() or getNodeIndex() to avoid these. In your code, catch ArrayIndexOutOfBoundsException and throw a ConcurrentModificationException if you think that's the problem.
public java.lang.Object addEdge(int fromIndex,
int toIndex,
java.lang.Object edge)
addEdge in interface IndexedMutableCEDigraphaddEdge in class AbstractMatrixCEDigraphjava.lang.ArrayIndexOutOfBoundsException - if index does not have a node. Use nodeIndicies() or getNodeIndex() to avoid these. In your code, catch ArrayIndexOutOfBoundsException and throw a ConcurrentModificationException if you think that's the problem.public Bag removeNode(int index)
removeNode in interface IndexedMutableCEDigraphremoveNode in class AbstractMatrixCEDigraphjava.lang.ArrayIndexOutOfBoundsException - if index does not have a node. Use nodeIndicies() or getNodeIndex() to avoid these. In your code, catch ArrayIndexOutOfBoundsException and throw a ConcurrentModificationException if you think that's the problem.
public java.lang.Object removeEdge(int fromIndex,
int toIndex)
removeEdge in interface IndexedMutableCEDigraphremoveEdge in class AbstractMatrixCEDigraphjava.lang.ArrayIndexOutOfBoundsException - if index does not have a node. Use nodeIndicies() or getNodeIndex() to avoid these. In your code, catch ArrayIndexOutOfBoundsException and throw a ConcurrentModificationException if you think that's the problem.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||