Neighbours
com.phasmidsoftware.visitor.core.Neighbours
Typeclass: given a structure H, yield the neighbouring nodes of type V. This is the "how do we traverse" concern — completely decoupled from domain.
For homogeneous graphs (node points to node), use GraphNeighbours[V] = Neighbours[V, V]. For trees, H might be Tree[A] and V might be A.
Type parameters
- H
-
the container / structure type
- V
-
the neighbour / child type
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article