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:
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:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Makes each node's annotation null.Gets a node from the graph given a value.getNodes()
Gets an immutable list of all nodes.int
Returns a weight for the given value to be used in ordering nodes, e.g.Returns an empty SubGraph for this Graph.
-
Method Details
-
getNodes
Collection<GraphNode<N,E>> getNodes()Gets an immutable list of all nodes. -
getNode
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.
-
newSubGraph
Returns an empty SubGraph for this Graph. -
clearNodeAnnotations
void clearNodeAnnotations()Makes each node's annotation null. -
getWeight
Returns a weight for the given value to be used in ordering nodes, e.g. inGraphColoring
.
-