Interface GraphModel<V>

All Known Subinterfaces:
AnnotatedGraphModel<V,A>, RootedGraphModel<V>
All Known Implementing Classes:
AdHocAnnotatedGraphModel, AdHocRootedGraphModel, AnnotatedNodeGraphModel, DominatorTree, NodeGraphModel, SCCGraphModel
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface GraphModel<V>
This interface represents a graph or a family of graphs. Graphs are directed and unlabelled. Node identity is modulo equals. Nodes may not be null.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Opt Collection<? extends V>
    neighbours(V node)
    Return all nodes to which there is an edge from a given node.
  • Method Details

    • neighbours

      @Opt @Opt Collection<? extends V> neighbours(V node)
      Return all nodes to which there is an edge from a given node. The order of nodes may or may not be significant to the application; it is ignored by all algorithms in this package. Multiple occurrences of the same node may or may not imply multiple edges, depending on the context.

      A return value of null indicates that the given node object is not part of the graph covered by this graph model. A graph model is called closed iff neighbours(v).contains(w) implies neighbours(w) != null for all node objects v, w. All traversal algorithms require graph models to be closed.

      Parameters:
      node - a node
      Returns:
      a read-only collection containing all neighbours of node, or null if node is not a node of the graph represented by this model.