Companion object for Vertex, providing factory methods.
Attributes
Members list
Value members
Concrete methods
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].
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
MonoidandOrderinginstances.
Value parameters
- attribute
-
the data associated with this vertex.
Attributes
- Returns
-
a new
RelaxableVertex[V, R].
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].
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].