public class NodeGraphModel<V extends Node<? extends V>> extends Object implements GraphModel<V>
Constructor and Description |
---|
NodeGraphModel() |
Modifier and Type | Method and Description |
---|---|
Collection<? extends V> |
neighbours(V node)
Return all nodes to which there is an edge from a given node.
|
public Collection<? extends V> neighbours(V node)
GraphModel
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.
neighbours
in interface GraphModel<V extends Node<? extends V>>
node
- a nodenode
,
or null
if node
is not a node of the graph represented by
this model.see also the complete user documentation .