Vertex

com.phasmidsoftware.gryphon.core.Vertex
See theVertex companion object
trait Vertex[V] extends Attribute[V]

Represents a vertex in a graph, containing an attribute of type V and a collection of adjacencies denoting its connections to other vertices.

Vertex is immutable. The mutable discovered flag has been removed from all 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 type of the attribute associated with the vertex.

Attributes

Companion
object
Graph
Supertypes
trait Attribute[V]
class Object
trait Matchable
class Any
Known subtypes
class AbstractVertex[V]
class RelaxableVertex[V, R]
class SimpleVertex[V]

Members list

Value members

Abstract methods

def +(a: Adjacency[V]): Vertex[V]

Adds a new adjacency to this vertex, returning a new vertex instance.

Adds a new adjacency to this vertex, returning a new vertex instance.

Value parameters

a

the adjacency to be added.

Attributes

Returns

a new Vertex[V] with the adjacency included.

Retrieves the collection of adjacencies associated with the vertex.

Retrieves the collection of adjacencies associated with the vertex.

Attributes

Returns

an instance of Adjacencies[V] representing the connections from this vertex.

def render: String

Renders the vertex as a human-readable string.

Renders the vertex as a human-readable string.

Attributes

Returns

a string representation of the vertex.

Inherited and Abstract methods

def attribute: V

Retrieves the attribute of type A associated with this instance.

Retrieves the attribute of type A associated with this instance.

Attributes

Returns

the attribute of type A representing the defining characteristic or property of this instance.

Inherited from:
Attribute