Interface AdjacencyGraph<N,E>
-
- Type Parameters:
N- Value type that the graph node stores.E- Value type that the graph edge stores.
- All Known Implementing Classes:
ControlFlowGraph,DiGraph,Graph,LinkedDirectedGraph,LinkedUndirectedGraph,UndiGraph
public interface AdjacencyGraph<N,E>A minimal graph interface. Provided is add nodes to the graph, adjacency calculation between a SubGraph and a GraphNode, and adding node annotations.For a more extensive interface, see
Graph.- See Also:
Graph
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearNodeAnnotations()Makes each node's annotation null.GraphNode<N,E>getNode(N value)Gets a node from the graph given a value.intgetNodeCount()java.util.Collection<? extends GraphNode<N,E>>getNodes()Gets an immutable list of all nodes.intgetWeight(N value)Returns a weight for the given value to be used in ordering nodes, e.g.SubGraph<N,E>newSubGraph()Returns an empty SubGraph for this Graph.
-
-
-
Method Detail
-
getNodes
java.util.Collection<? extends GraphNode<N,E>> getNodes()
Gets an immutable list of all nodes.
-
getNodeCount
int getNodeCount()
-
getNode
GraphNode<N,E> getNode(N value)
Gets a node from the graph given a value. Values equality are compared usingObject.equals.- Parameters:
value- The node's value.- Returns:
- The corresponding node in the graph, null if there value has no corresponding node.
-
clearNodeAnnotations
void clearNodeAnnotations()
Makes each node's annotation null.
-
getWeight
int getWeight(N value)
Returns a weight for the given value to be used in ordering nodes, e.g. inGraphColoring.
-
-