|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Node - The type of the graph's nodes.public interface IMutableGraph<Node>
Specification of a mutable, unlabeled, directed graph with useful operations on it.
Classes implementing this interface are:
MutableGraph, a complete implementation that provides
both, the useful operations and a representation of the
graph.AbstractGraph, a partial implementation that provides
the useful operations but leaves the representation of the
graph unspecified.
| Method Summary | |
|---|---|
boolean |
bypassNode(Node node)
Removes a given node from the graph while preserving edges incident upon it. |
void |
computeTransitiveClosure()
Computes the transitive closure of the graph and updates it with the result. |
boolean |
insertEdge(Node srcNode,
Node dstNode)
Inserts a given directed edge into the graph, also inserting the nodes of the edge if they do not exist in the graph. |
boolean |
insertEdgeStrict(Node srcNode,
Node dstNode)
Inserts a given directed edge into the graph, presuming that the nodes of the edge exist in the graph. |
boolean |
insertNode(Node node)
Inserts a given node as a non-root node into the graph. |
boolean |
insertRoot(Node node)
Inserts a given node as a root node into the graph. |
boolean |
insertRootStrict(Node node)
Designates a given node in the graph as a root node. |
boolean |
removeEdge(Node srcNode,
Node dstNode)
Removes a given directed edge from the graph. |
boolean |
removeNode(Node node)
Removes a given node from the graph along with edges incident upon it. |
boolean |
removeRootStrict(Node node)
Designates a given node in the graph as a non-root node. |
boolean |
replaceNode(Node oldNode,
Node newNode)
Replaces a given node in the graph by another given node. |
void |
union(IGraph<Node> graph)
Computes the union of this graph with a given directed graph, and updates this graph with the result. |
| Methods inherited from interface chord.util.graph.IGraph |
|---|
getAllPathsBuilder, getBackEdges, getNodeMap, getNodes, getNodesInCycles, getNodesInRPO, getPreds, getRoots, getShortestPathsBuilder, getSimpleCycles, getSuccs, getTopSortedSCCs, hasCycles, hasEdge, hasNode, hasRoot, isConnected, numNodes, numPreds, numRoots, numSuccs |
| Method Detail |
|---|
boolean insertNode(Node node)
node - The node to be inserted.
boolean insertRoot(Node node)
node - The node to be inserted.
boolean insertRootStrict(Node node)
node - A node in the graph.
java.lang.RuntimeException - if node does not exist
in the graph.boolean bypassNode(Node node)
1. for each immed. pred. node1 of node: edge (node1,node) 2. for each immed. succ. node2 of node: edge (node,node2)This operation inserts the following edges into the graph:
for each immed. pred. node1 of node such that node1 != node:
for each immed. succ. node2 of node such that node2 != node:
edge (node1,node2)
Moreover, if node is a root node, then each of its
immediate successors is designated a root node.
node - The node to be removed.
removeNode(Node)boolean removeRootStrict(Node node)
node - A node in the graph.
java.lang.RuntimeException - if node does not exist
in the graph.boolean removeNode(Node node)
node - A node.
bypassNode(Node)
boolean replaceNode(Node oldNode,
Node newNode)
oldNode - The old node.newNode - The new node.
boolean insertEdge(Node srcNode,
Node dstNode)
srcNode - The source node of the edge to be inserted.dstNode - The target node of the edge to be inserted.
boolean insertEdgeStrict(Node srcNode,
Node dstNode)
srcNode - The source node of the edge to be inserted.dstNode - The target node of the edge to be inserted.
java.lang.RuntimeException - if srcNode or
dstNode does not exist in the graph.
boolean removeEdge(Node srcNode,
Node dstNode)
srcNode - The source node of the edge to be removed.dstNode - The target node of the edge to be removed.
void computeTransitiveClosure()
void union(IGraph<Node> graph)
graph - A directed graph.
It must be non-null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||