chord.util.graph
Interface IMutableLabeledGraph<Node,Label>
- Type Parameters:
Node - The type of the graph's nodes.Label - The type of the labels on the graph's edges.
- All Superinterfaces:
- IGraph<Node>, ILabeledGraph<Node,Label>, IMutableGraph<Node>, java.io.Serializable
- All Known Implementing Classes:
- MutableLabeledGraph
public interface IMutableLabeledGraph<Node,Label>
- extends ILabeledGraph<Node,Label>, IMutableGraph<Node>
Specification of a mutable, labeled, directed graph with
useful operations on it.
Classes implementing this interface are:
MutableLabeledGraph, 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.
- Author:
- Mayur Naik (mhn@cs.stanford.edu)
|
Method Summary |
boolean |
insertLabel(Node srcNode,
Node dstNode,
Label label)
Inserts a given label on a given directed edge in the graph,
also inserting the edge and the nodes of the edge if they do
not exist in the graph. |
boolean |
removeLabel(Node srcNode,
Node dstNode,
Label label)
Removes a given label from a given directed edge in the graph. |
| Methods inherited from interface chord.util.graph.IMutableGraph |
bypassNode, computeTransitiveClosure, insertEdge, insertEdgeStrict, insertNode, insertRoot, insertRootStrict, removeEdge, removeNode, removeRootStrict, replaceNode, union |
| 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 |
insertLabel
boolean insertLabel(Node srcNode,
Node dstNode,
Label label)
- Inserts a given label on a given directed edge in the graph,
also inserting the edge and the nodes of the edge if they do
not exist in the graph.
- Parameters:
srcNode - The source node of the edge.dstNode - The target node of the edge.label - The label to be inserted.
- Returns:
- true if the graph is modified, i.e., if an edge from
srcNode to dstNode with label
label does not exist in the graph.
removeLabel
boolean removeLabel(Node srcNode,
Node dstNode,
Label label)
- Removes a given label from a given directed edge in the graph.
- Parameters:
srcNode - The source node of the edge.dstNode - The target node of the edge.label - The label to be removed.
- Returns:
- true if the graph is modified, i.e., if a edge from
srcNode to dstNode with label
label exists in the graph.