A vertex that additionally carries an optional relaxable property maybeR, used in Dijkstra-style shortest-path algorithms.
The discovered flag has been removed; only the relaxable property maybeR is retained as mutable state (Dijkstra relaxation requires in-place update semantics on the vertex).
Type parameters
- R
-
the type of the relaxable property; must have an
Ordering. - V
-
the type of the vertex attribute.
Value parameters
- adjacencies
-
the collection of adjacencies.
- attribute
-
the data associated with this vertex.
- maybeR
-
the current best-known cost to reach this vertex, if set.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass AbstractVertex[V]trait Vertex[V]trait Attribute[V]class Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Result of comparing this with operand that.
Result of comparing this with operand that.
Implement this method to determine how instances of A will be sorted.
Returns x where:
-
x < 0whenthis < that -
x == 0whenthis == that -
x > 0whenthis > that
Value parameters
- that
-
the instance to compare against
Attributes
- Returns
-
an integer whose sign indicates the ordering relation between
thisandthat
Updates maybeR to r if r is smaller than the current value (or if unset).
Updates maybeR to r if r is smaller than the current value (or if unset).
Value parameters
- r
-
the candidate relaxation value.
Attributes
- Returns
-
this vertex (mutated in place) if relaxed, otherwise this vertex unchanged.
Renders the vertex as a human-readable string.
Renders the vertex as a human-readable string.
Attributes
- Returns
-
a string representation of the vertex.
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Any
Constructs a new instance of this vertex type with the given adjacencies, preserving all other fields.
Constructs a new instance of this vertex type with the given adjacencies, preserving all other fields.
Value parameters
- adjacencies
-
the updated adjacency collection.
Attributes
- Returns
-
a new vertex of the same concrete type.
Inherited methods
Adds an adjacency, delegating construction to unit.
Returns true if this is less than that
Returns true if this is less than that
Value parameters
- that
-
the instance to compare against
Attributes
- Inherited from:
- Ordered
Returns true if this is less than or equal to that.
Returns true if this is less than or equal to that.
Attributes
- Inherited from:
- Ordered
Returns true if this is greater than that.
Returns true if this is greater than that.
Value parameters
- that
-
the instance to compare against
Attributes
- Inherited from:
- Ordered
Returns true if this is greater than or equal to that.
Returns true if this is greater than or equal to that.
Attributes
- Inherited from:
- Ordered
Result of comparing this with operand that.
Result of comparing this with operand that.
Value parameters
- that
-
the instance to compare against
Attributes
- Inherited from:
- Ordered
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product