Package eu.bandm.tools.graph
Class AdHocAnnotatedGraphModel<V,A>
java.lang.Object
eu.bandm.tools.graph.AdHocAnnotatedGraphModel<V,A>
- All Implemented Interfaces:
AnnotatedGraphModel<V,
,A> GraphModel<V>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAnnotation
(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)
-
Constructor Details
-
AdHocAnnotatedGraphModel
-
-
Method Details
-
neighbours
Description copied from interface:GraphModel
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.- Specified by:
neighbours
in interfaceGraphModel<V>
- 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.
-
getAnnotation
- Specified by:
getAnnotation
in interfaceAnnotatedGraphModel<V,
A>
-
setAnnotation
- Specified by:
setAnnotation
in interfaceAnnotatedGraphModel<V,
A>
-