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