Vertex

com.phasmidsoftware.gryphon.core.Vertex
See theVertex companion trait
object Vertex

Companion object for Vertex, providing factory methods.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Vertex.type

Members list

Value members

Concrete methods

def create[V](attribute: V, vau: Adjacencies[V] = ...): SimpleVertex[V]

Creates a SimpleVertex with the given attribute and adjacencies.

Creates a SimpleVertex with the given attribute and adjacencies.

Value parameters

attribute

the data associated with this vertex.

vau

the initial adjacency collection (defaults to an empty Bag).

Attributes

Returns

a new SimpleVertex[V].

def createRelaxableWithSet[V, R : Monoid : Ordering](attribute: V): RelaxableVertex[V, R]

Creates a RelaxableVertex with an empty Set-backed adjacency collection. Suitable for Dijkstra-style algorithms that need to relax edge weights.

Creates a RelaxableVertex with an empty Set-backed adjacency collection. Suitable for Dijkstra-style algorithms that need to relax edge weights.

Type parameters

R

the type of the relaxable property; must have both Monoid and Ordering instances.

Value parameters

attribute

the data associated with this vertex.

Attributes

Returns

a new RelaxableVertex[V, R].

def createWithBag[V](attribute: V): SimpleVertex[V]

Creates a SimpleVertex with an empty Bag-backed adjacency collection.

Creates a SimpleVertex with an empty Bag-backed adjacency collection.

Value parameters

attribute

the data associated with this vertex.

Attributes

Returns

a new SimpleVertex[V].

def createWithSet[V](attribute: V): SimpleVertex[V]

Creates a SimpleVertex with an empty Set-backed adjacency collection. Appropriate when edges (rather than bare vertices) form the adjacencies.

Creates a SimpleVertex with an empty Set-backed adjacency collection. Appropriate when edges (rather than bare vertices) form the adjacencies.

Value parameters

attribute

the data associated with this vertex.

Attributes

Returns

a new SimpleVertex[V].