Neighbours

com.phasmidsoftware.visitor.core.Neighbours
trait Neighbours[H, V]

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 Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def neighbours(h: H): Iterator[V]