Adjacency

com.phasmidsoftware.gryphon.core.Adjacency
trait Adjacency[V]

Hierarchical trait defining the behavior of an "adjacency." An adjacency is a relationship between two adjacent vertices in a graph structure.

Adjacencies are the fundamental building blocks of a graph structure because from any given vertex, it is only possible to traverse to the vertices that are adjacent to it.

The discovered flag has been removed from Adjacency and its implementations. Visited-node tracking is now handled by the immutable VisitedSet[V] typeclass inside the Visitor V1.2.0 traversal engine.

Type parameters

V

the underlying vertex attribute type.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AdjacencyEdge[V, E]
class AdjacencyVertex[V]

Members list

Value members

Abstract methods

def maybeEdge[E]: Option[Edge[V, E]]

Retrieves the Edge associated with this adjacency, if one exists.

Retrieves the Edge associated with this adjacency, if one exists.

Attributes

Returns

an Option[Edge[V, E]] containing the Edge if present, or None.

def vertex: V

Retrieves the vertex associated with this adjacency.

Retrieves the vertex associated with this adjacency.

Attributes

Returns

the vertex of type V that this adjacency points to.