Package eu.bandm.tools.graph
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.
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 TypeMethodDescription@Opt Collection<? extends V>
neighbours
(V node) Return all nodes to which there is an edge from a given node.
-
Method Details
-
neighbours
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 iffneighbours(v).contains(w)
impliesneighbours(w) != null
for all node objectsv
,w
. All traversal algorithms require graph models to be closed.- Parameters:
node
- a node- Returns:
- a read-only collection containing all neighbours of
node
, ornull
ifnode
is not a node of the graph represented by this model.
-