OrderableEdge
A trait that represents an ordered edge in a graph structure.
Extends the Edge interface by providing an ordering mechanism based on the edge's attribute of type E. It also implements the Scala Ordered trait to enable comparisons between edges.
Type parameters
- E
-
the type of the attribute associated with the edge. This attribute is used for determining the order of the edges.
- V
-
the type of the vertices connected by the edge.
Attributes
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Compares this edge with another edge based on their attributes using the specified ordering.
Compares this edge with another edge based on their attributes using the specified ordering.
Value parameters
- ordering
-
the implicit ordering instance that defines the comparison behavior for the edge attributes.
- that
-
the edge to compare against.
Attributes
- Returns
-
an integer where a negative value indicates this edge's attribute is less than the other edge's attribute, zero indicates they are equal, and a positive value indicates this edge's attribute is greater.
Inherited methods
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
Inherited and Abstract methods
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
Arepresenting the defining characteristic or property of this instance. - Inherited from:
- Attribute
Retrieves the black Vertex of this Connexion. If this is a DirectedEdge, this vertex represents the end. If this is an UndirectedEdge, see the note above for white.
Retrieves the black Vertex of this Connexion. If this is a DirectedEdge, this vertex represents the end. If this is an UndirectedEdge, see the note above for white.
Attributes
- Returns
-
the "black" vertex.
- Inherited from:
- Connexion
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 - Inherited from:
- Ordered
Retrieves the type of the edge (e.g., directed or undirected).
Retrieves the type of the edge (e.g., directed or undirected).
Attributes
- Returns
-
an instance of
EdgeTypethat describes whether the edge is directed (one-way) or undirected (two-way). - Inherited from:
- Edge
Retrieves the white Vertex of this Connexion. If this is a DirectedEdge, this vertex represents the start. If this is an UndirectedEdge, white to black represents the nominal direction. Individual adjacencies can be based on a flipped version of an UndirectedEdge.
Retrieves the white Vertex of this Connexion. If this is a DirectedEdge, this vertex represents the start. If this is an UndirectedEdge, white to black represents the nominal direction. Individual adjacencies can be based on a flipped version of an UndirectedEdge.
Attributes
- Returns
-
the "white" vertex.
- Inherited from:
- Connexion