|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.walend.digraph.AbstractHashGEDigraph | +--net.walend.digraph.MutableHashGEDigraph
Nested Class Summary |
Nested classes inherited from class net.walend.digraph.AbstractHashGEDigraph |
AbstractHashGEDigraph.HashEdgeIterator, AbstractHashGEDigraph.NodeIterator, AbstractHashGEDigraph.NodePair |
Field Summary | |
private static int |
DEFAULTSIZE
|
Fields inherited from class net.walend.digraph.AbstractHashGEDigraph |
|
Fields inherited from interface net.walend.digraph.GEDigraph |
EMPTY |
Constructor Summary | |
MutableHashGEDigraph()
|
|
MutableHashGEDigraph(CEDigraph digraph)
|
|
MutableHashGEDigraph(GEDigraph digraph)
|
|
MutableHashGEDigraph(int nodeCapacity,
int edgeCapacity)
|
|
MutableHashGEDigraph(UEDigraph digraph)
|
Method Summary | |
boolean |
addEdge(java.lang.Object fromNode,
java.lang.Object toNode)
Return true if the digraph changes when this edge is added, false if the digraph is unchanged. |
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 GEDigraph |
void |
clearEdges()
Remove all the edges from the GEDigraph. |
boolean |
removeEdge(java.lang.Object fromNode,
java.lang.Object toNode)
Return true if the digraph changes when the edge is removed, false if the digraph didn't have an edge between these two nodes. |
int |
removeGEDigraph(GEDigraph digraph)
Return the number of edges orphaned when digraph is removed |
int |
removeNode(java.lang.Object node)
Return the number of orphaned edges that were lost when this node is removed. |
int |
removeNodes(java.util.Set nodes)
Return the number of edges orphaned edges when these nodes are removed. |
int |
retainNodes(java.util.Set nodes)
Return the number of orphaned edges when the nodes are removed. |
Methods inherited from class net.walend.digraph.AbstractHashGEDigraph |
containsEdge, containsGEDigraph, containsNode, containsNodes, countInboundEdges, countOutboundEdges, edgeCount, edgeNodeIterator, getFromNodes, getNodes, getPrincipleInterface, getToNodes, intersectWithGEDigraph, isEdgeFree, isEmpty, nodeCount, nodeIterator, sameGEDigraphAs, sameStateAs, toString, unionGEDigraph |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 |
Field Detail |
private static final int DEFAULTSIZE
Constructor Detail |
public MutableHashGEDigraph()
public MutableHashGEDigraph(int nodeCapacity, int edgeCapacity)
public MutableHashGEDigraph(GEDigraph digraph)
public MutableHashGEDigraph(CEDigraph digraph)
public MutableHashGEDigraph(UEDigraph digraph)
Method Detail |
public boolean addNode(java.lang.Object node)
MutableGEDigraph
addNode
in interface MutableGEDigraph
addNode
in class AbstractHashGEDigraph
public boolean addEdge(java.lang.Object fromNode, java.lang.Object toNode) throws NodeMissingException
MutableGEDigraph
addEdge
in interface MutableGEDigraph
addEdge
in class AbstractHashGEDigraph
NodeMissingException
- if either node is not in the digraph.public int removeNode(java.lang.Object node) throws NodeMissingException
MutableGEDigraph
removeNode
in interface MutableGEDigraph
removeNode
in class AbstractHashGEDigraph
NodeMissingException
- if the node is not in the digraphpublic boolean removeEdge(java.lang.Object fromNode, java.lang.Object toNode) throws NodeMissingException
MutableGEDigraph
removeEdge
in interface MutableGEDigraph
removeEdge
in class AbstractHashGEDigraph
NodeMissingException
- if either node is not in the digraphpublic boolean addNodes(java.util.Set nodes)
MutableGEDigraph
addNodes
in interface MutableGEDigraph
addNodes
in class AbstractHashGEDigraph
public int removeNodes(java.util.Set nodes)
MutableGEDigraph
removeNodes
in interface MutableGEDigraph
removeNodes
in class AbstractHashGEDigraph
public int removeGEDigraph(GEDigraph digraph)
MutableGEDigraph
removeGEDigraph
in interface MutableGEDigraph
removeGEDigraph
in class AbstractHashGEDigraph
public int retainNodes(java.util.Set nodes)
MutableGEDigraph
retainNodes
in interface MutableGEDigraph
retainNodes
in class AbstractHashGEDigraph
public void clear()
MutableGEDigraph
clear
in interface MutableGEDigraph
clear
in class AbstractHashGEDigraph
public void clearEdges()
MutableGEDigraph
clearEdges
in interface MutableGEDigraph
clearEdges
in class AbstractHashGEDigraph
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |