com.phasmidsoftware.gryphon.core
This package object contains definitions and type aliases used across the core package. NOTE: maybe this is not strictly necessary in Scala 3 but it's helpful to have definitions in one place.
Attributes
Members list
Type members
Classlikes
An abstract implementation of the Bag trait that uses a Seq to store elements. This class provides a collection-like structure where elements can be added, and iteration over the stored elements is supported.
An abstract implementation of the Bag trait that uses a Seq to store elements. This class provides a collection-like structure where elements can be added, and iteration over the stored elements is supported.
Type parameters
- X
-
the type of elements contained within the
AbstractBag[X]. The type is covariant to allowListBag[A]to be used asListBag[B]ifAis a subtype ofB.
Value parameters
- xs
-
a sequence of elements of type
X, representing the contents of thisListBag.
Attributes
- Supertypes
- Known subtypes
-
class ListBag[X]
An abstract base class for graph implementations backed by a VertexMap.
An abstract base class for graph implementations backed by a VertexMap.
Type parameters
- V
-
the type of the vertex attributes (invariant).
Value parameters
- vertexMap
-
the
VertexMapholding the vertices of this graph.
Attributes
- Supertypes
- Known subtypes
Abstract base class providing common implementations for unordered collections. Concrete subclasses (Unordered_Bag and Unordered_Set) differ in their underlying storage and duplicate-handling behaviour.
Abstract base class providing common implementations for unordered collections. Concrete subclasses (Unordered_Bag and Unordered_Set) differ in their underlying storage and duplicate-handling behaviour.
Type parameters
- T
-
the type of elements contained in the collection (covariant).
Value parameters
- elements
-
the underlying storage, accessed via
IterableOnce.
Attributes
- Supertypes
- Known subtypes
-
class Unordered_Bag[T]class Unordered_Set[T]
Base class for all concrete vertex implementations.
Base class for all concrete vertex implementations.
Type parameters
- V
-
the type of the vertex attribute.
Value parameters
- adjacencies
-
the collection of adjacencies.
- attribute
-
the data associated with this vertex.
Attributes
- Supertypes
- Known subtypes
-
class SimpleVertex[V]
Hierarchical trait defining the behavior of an "adjacency." An adjacency is a relationship between two adjacent vertices in a graph structure.
Hierarchical trait defining the behavior of an "adjacency." An adjacency is a relationship between two adjacent vertices in a graph structure.
Adjacencies are the fundamental building blocks of a graph structure because from any given vertex, it is only possible to traverse to the vertices that are adjacent to it.
The discovered flag has been removed from Adjacency and its 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 underlying vertex attribute type.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class AdjacencyVertex[V]
Represents an adjacency in the form of an edge within a graph structure. In the case of an undirected edge, flipped indicates which direction is used.
Represents an adjacency in the form of an edge within a graph structure. In the case of an undirected edge, flipped indicates which direction is used.
Type parameters
- E
-
the type of the edge attributes.
- V
-
the type of the vertex attributes.
Value parameters
- connexion
-
the edge instance containing vertex connection and attribute information.
- flipped
-
true if the nominal direction of the edge is reversed.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Adjacency[V]class Objecttrait Matchableclass AnyShow all
Represents an adjacency defined purely by a vertex (no associated edge).
Represents an adjacency defined purely by a vertex (no associated edge).
Type parameters
- V
-
the type of the vertex attribute.
Value parameters
- vertex
-
the vertex associated with this adjacency.
Attributes
Companion object for AdjacencyVertex.
Companion object for AdjacencyVertex.
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
AdjacencyVertex.type
Hierarchical trait defining a (single) attribute of type A.
Hierarchical trait defining a (single) attribute of type A.
Used as a base trait by Vertex and Edge to expose their defining attribute.
Type parameters
- A
-
an attribute
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class OrderedEdge[V]trait OrderedAttribute[A]trait Vertex[V]class AbstractVertex[V]class SimpleVertex[V]Show all
A type-class trait defining a mechanism to associate an attribute of type A with an entity of type T.
A type-class trait defining a mechanism to associate an attribute of type A with an entity of type T.
The Attributed trait provides an abstraction to retrieve an attribute from a given object. It is intended to be mixed into types that need to support mapping an item to its associated attribute.
Type parameters
- A
-
the type of the attribute that can be retrieved from the entity.
- T
-
the type of the entity with which the attribute is associated.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
A trait representing a collection of elements in an unordered bag-like structure, a multi-set in other words. This collection allows duplicates and provides operations for adding elements, checking membership, and querying its properties such as size and emptiness.
A trait representing a collection of elements in an unordered bag-like structure, a multi-set in other words. This collection allows duplicates and provides operations for adding elements, checking membership, and querying its properties such as size and emptiness.
Type parameters
- X
-
the type of elements contained in the bag. As a covariant type parameter,
Xallows subtypes of the specified type to be used in the bag.
Attributes
- Companion
- object
- Supertypes
-
trait IterableOnce[X]class Objecttrait Matchableclass Any
- Known subtypes
-
class AbstractBag[X]class ListBag[X]
Provides factory methods for creating instances of Bag.
Provides factory methods for creating instances of Bag.
A Bag is an unordered collection that allows duplicate elements. This object serves as the companion object to the Bag type, offering utility functions to create empty or populated Bag instances.
Attributes
Trait to model the capability of answering connectivity queries over a set of objects.
Trait to model the capability of answering connectivity queries over a set of objects.
A type implementing Connected[V] can determine whether any two objects of type V belong to the same connected component.
Note the distinction from Connexion[V], which models a specific edge between exactly two vertices. Connected[V] is a higher-level oracle over the whole structure.
Typical implementations: ConnectivityLazy, WeightedUnionFind, ConnectedComponents.
Type parameters
- V
-
the underlying object type.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class ConnectivityOptimized[V]class ConnectivityASP[V]class ConnectivityLazy[V]trait Connectivity[V]Show all
A trait representing a connection between two vertices in a graph structure. This trait is designed to generalize the concept of a connexion between exactly two vertices in a graph. The vertices are called white and black in order to avoid any suggestion of an order. NOTE: if you're curious why I use the archaic spelling "Connexion", see https://en.wikipedia.org/wiki/Connexion_(graph_theory)
A trait representing a connection between two vertices in a graph structure. This trait is designed to generalize the concept of a connexion between exactly two vertices in a graph. The vertices are called white and black in order to avoid any suggestion of an order. NOTE: if you're curious why I use the archaic spelling "Connexion", see https://en.wikipedia.org/wiki/Connexion_(graph_theory)
Type parameters
- V
-
the type representing the vertices connected by this edge. It could be any user-defined type that models a vertex.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Trait to model the behavior of directed acyclic graph.
Trait to model the behavior of directed acyclic graph.
Type parameters
- E
-
the edge-attribute type.
- V
-
the (key) vertex-attribute type.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass AbstractGraph[V]trait Graph[V]trait Traversable[V]class Objecttrait Matchableclass AnyShow all
The Directed object represents a directed edge type in a graph, where the edge has a specific direction (one-way). It extends the EdgeType trait and implements the oneWay method, which always returns true to indicate that the edge is directed.
The Directed object represents a directed edge type in a graph, where the edge has a specific direction (one-way). It extends the EdgeType trait and implements the oneWay method, which always returns true to indicate that the edge is directed.
Attributes
- Supertypes
- Self type
-
Directed.type
Defines an abstraction for an edge in a graph structure that connects two vertices. An Edge may be directed or undirected, and it carries an attribute of type E.
Defines an abstraction for an edge in a graph structure that connects two vertices. An Edge may be directed or undirected, and it carries an attribute of type E.
The connection is established between two vertices of type V, referred to as white and black. The type (directionality) of the edge, as well as whether it allows traversal in one or both directions, is given by the edgeType field.
Type parameters
- E
-
the type of the attribute associated with the edge.
- V
-
the type of the vertices connected by the edge.
Attributes
- Supertypes
- Known subtypes
-
class OrderedEdge[V]
A trait for graphs that carry both vertices and edges, supporting edge-based operations.
A trait for graphs that carry both vertices and edges, supporting edge-based operations.
Type parameters
- E
-
the type of the edge attributes.
- V
-
the type of the vertex attributes.
Attributes
- Supertypes
- Known subtypes
Represents a graph structure defined by a sequence of edges. Each edge connects two vertices of type V and contains an attribute of type E. The EdgeList class allows for operations on the edges of the graph, such as transforming them into a sequence of triplets.
Represents a graph structure defined by a sequence of edges. Each edge connects two vertices of type V and contains an attribute of type E. The EdgeList class allows for operations on the edges of the graph, such as transforming them into a sequence of triplets.
CONSIDER eliminate this type.
The graph is also associated with a type parameter Z, which can be used to define additional properties or characteristics of the graph or edges, such as edge types.
Type parameters
- E
-
the type of the attributes associated with the edges.
- V
-
the type of the vertices in the graph.
- Z
-
a type parameter to describe additional properties, such as the nature of the edges.
Value parameters
- edges
-
a sequence of edges that define the connections in the graph. Each edge connects a source vertex (
white) and a target vertex (black), and may carry an associated attribute (attribute) and type (edgeType).
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A trait representing a traversable structure that encompasses both vertices and edges.
A trait representing a traversable structure that encompasses both vertices and edges.
Type parameters
- E
-
the type of the attribute associated with an edge.
- V
-
the type of the vertices.
Attributes
- Supertypes
- Known subtypes
The EdgeType object provides utilities and definitions for working with edge types in a graph, including traits and implicit parsers. Edge types include Directed, Undirected, and Undefined.
The EdgeType object provides utilities and definitions for working with edge types in a graph, including traits and implicit parsers. Edge types include Directed, Undirected, and Undefined.
It includes a companion object for parsing strings into EdgeType instances using the ParseableEdgeType trait. This allows for flexible and structured parsing of textual representations of edge types into their corresponding instances.
Attributes
A trait representing the type of an edge, indicating whether it is directed or undirected. Or something else? It provides a method to determine if the edge is one-way, and a toString method for human-readable representation of the edge type.
A trait representing the type of an edge, indicating whether it is directed or undirected. Or something else? It provides a method to determine if the edge is one-way, and a toString method for human-readable representation of the edge type.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
A trait representing a graph structure defined by its edges. The Edges trait provides an abstraction for accessing the sequence of graph edges without requiring direct knowledge of the underlying graph implementation.
A trait representing a graph structure defined by its edges. The Edges trait provides an abstraction for accessing the sequence of graph edges without requiring direct knowledge of the underlying graph implementation.
NOTE: this is not polymorphic in Z like EdgeList CONSIDER making them similar.
Type parameters
- E
-
the type of attributes associated with the edges in the graph.
- V
-
the type of attributes associated with the vertices in the graph.
Attributes
- Supertypes
- Known subtypes
-
An abstract class that extends the functionality of GraphNeighboursTraversal by incorporating an evaluable mechanism for the vertices of the graph. This class allows the evaluation of graph vertices to produce a value of type T through the provided fulfillment function.
An abstract class that extends the functionality of GraphNeighboursTraversal by incorporating an evaluable mechanism for the vertices of the graph. This class allows the evaluation of graph vertices to produce a value of type T through the provided fulfillment function.
Type parameters
- R
-
The type representing the result of the traversal operation.
- T
-
The type produced when a vertex is evaluated.
- V
-
The type representing a vertex in the graph.
Value parameters
- fulfill
-
A function that maps a vertex of type
Vto a value of typeT. - traversable
-
A traversable collection of vertices of type
Vrepresenting the graph.
Attributes
- Supertypes
A trait representing an abstract graph structure composed of vertices.
A trait representing an abstract graph structure composed of vertices.
All traversal methods delegate to the VertexMap which in turn uses the Visitor V1.2.0 typeclass engine (Traversal.dfs / Traversal.bfs). The mutable discovered flag pattern has been removed throughout; visited-node tracking is handled by the immutable VisitedSet[V] inside the engine.
Type parameters
- V
-
the type representing the vertex attributes (invariant).
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
class AbstractGraph[V]
Attributes
- Supertypes
-
trait Producttrait Equalsclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Represents an abstract class for implementing traversal mechanisms on a given traversable structure. The common feature of subclasses is that they all delegate to the graphNeighbours method for the GraphNeighbours typeclass.
Represents an abstract class for implementing traversal mechanisms on a given traversable structure. The common feature of subclasses is that they all delegate to the graphNeighbours method for the GraphNeighbours typeclass.
Type parameters
- R
-
the type representing the result of the traversal
- V
-
the type of the vertices in the traversable structure
Value parameters
- random
-
an implicit random number generator used in the traversal logic
- traversable
-
the traversable structure containing the vertices
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
A concrete implementation of the Bag trait that uses a Seq to store elements. This class provides a collection-like structure where elements can be added, and iteration over the stored elements is supported.
A concrete implementation of the Bag trait that uses a Seq to store elements. This class provides a collection-like structure where elements can be added, and iteration over the stored elements is supported.
Type parameters
- X
-
the type of elements contained within the
ListBag. The type is covariant to allowListBag[A]to be used asListBag[B]ifAis a subtype ofB.
Value parameters
- xs
-
a sequence of elements of type
X, representing the contents of thisListBag.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass AbstractBag[X]trait Bag[X]trait IterableOnce[X]class Objecttrait Matchableclass AnyShow all
A trait that represents an ordered edge in a graph structure.
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
- Supertypes
A trait that extends Attribute to enable comparison between attributes of type A and others of compatible types.
A trait that extends Attribute to enable comparison between attributes of type A and others of compatible types.
Type parameters
- A
-
the type of the attribute that this trait represents. Must be comparable using Scala's
Ordering.
Attributes
- Supertypes
A trait that defines a structure for managing pairs of vertices with an associated value.
A trait that defines a structure for managing pairs of vertices with an associated value.
The purpose of Pairs is to represent relationships or connections between pairs of vertices of type V, with an additional associated value of type Z for each pair.
Type parameters
- V
-
the type of the vertices in the pairs.
- Z
-
the type of the additional value associated with each pair of vertices.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Provides a utility for constructing a ProtoConnexions instance from a sequence of string ts.
Provides a utility for constructing a ProtoConnexions instance from a sequence of string ts.
This object contains methods to parse input data and generate graph-like structures where vertices are connected by edges derived from parsed values.
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ProtoConnexions.type
Represents a collection of directed connections between vertices, where each connection is associated with an additional attribute of type Z. The connections are stored as a sequence of tuples (V, V, Z), where the first element is the source vertex, the second is the target vertex, and the third is the associated attribute.
Represents a collection of directed connections between vertices, where each connection is associated with an additional attribute of type Z. The connections are stored as a sequence of tuples (V, V, Z), where the first element is the source vertex, the second is the target vertex, and the third is the associated attribute.
Type parameters
- V
-
the type of the vertices in the connections.
- Z
-
the type of the additional attribute associated with each connection.
Value parameters
- pairs
-
a sequence of tuples representing the connections. Each tuple consists of a source vertex, a target vertex, and an additional attribute of type
Z.
Attributes
- Constructor
-
Creates an instance of
ProtoConnexionsinitialized with a sequence of(V, V, Z)tuples. - Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Companion object for RelaxableVertex, providing factory methods.
Companion object for RelaxableVertex, providing factory methods.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
RelaxableVertex.type
A vertex that additionally carries an optional relaxable property maybeR, used in Dijkstra-style shortest-path algorithms.
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
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass AbstractVertex[V]trait Vertex[V]trait Attribute[V]class Objecttrait Matchableclass AnyShow all
A trait representing a serializable graph structure.
A trait representing a serializable graph structure.
SerializableGraph provides the capability to serialize and traverse through its triplets, where each triplet represents an edge or vertex pair in the graph. Each triplet consists of two vertices (source and target) and an edge attribute connecting them (if any).
Type parameters
- E
-
the type associated with the edges in the graph.
- V
-
the type associated with the vertices in the graph.
- Z
-
the generic type for edge type.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Object providing factory methods for creating instances of the SerializableGraph trait.
Object providing factory methods for creating instances of the SerializableGraph trait.
The SerializableGraph represents a graph structure that can be serialized and traversed. This companion object includes methods to construct graphs from sequences of edges or vertex pairs.
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
SerializableGraph.type
A plain vertex carrying only an attribute and adjacencies. Replaces the old DiscoverableVertex now that the discovered flag has been removed.
A plain vertex carrying only an attribute and adjacencies. Replaces the old DiscoverableVertex now that the discovered flag has been removed.
Type parameters
- V
-
the type of the vertex attribute.
Value parameters
- adjacencies
-
the collection of adjacencies.
- attribute
-
the data associated with this vertex.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass AbstractVertex[V]trait Vertex[V]trait Attribute[V]class Objecttrait Matchableclass AnyShow all
Trait to define the behavior of a graph-like structure which can be traversed by dfs, dfsAll, and bfs.
Trait to define the behavior of a graph-like structure which can be traversed by dfs, dfsAll, and bfs.
The traversal engine is provided by Visitor V1.2.0. The mutable discovered flag pattern has been replaced by the immutable VisitedSet[V] typeclass. Callers continue to pass a Visitor in and receive an updated Visitor back; the new typeclass machinery is an implementation detail.
Type parameters
- V
-
the underlying key (attribute) type for a vertex.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Represents a triplet structure consisting of two vertices, an optional attribute, and an edge type.
Represents a triplet structure consisting of two vertices, an optional attribute, and an edge type.
Type parameters
- E
-
the type of the optional attribute associated with the edge.
- V
-
the type of the vertices (white and black).
- Z
-
the type representing the edge type.
Value parameters
- edgeType
-
the type of the edge, providing further classification or relationship information.
- from
-
the starting vertex of the triplet.
- maybeAttribute
-
an optional attribute that provides additional metadata for the edge.
- to
-
the ending vertex of the triplet.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A case class representing a collection of graph triplets.
A case class representing a collection of graph triplets.
Each triplet in the collection encapsulates information about two vertices and their connecting edge (if one exists) in a graph structure. This class extends the SerializableGraph trait, allowing it to support serialization and traversal of the contained triplets.
Type parameters
- E
-
the type associated with the edges in the triplets.
- V
-
the type associated with the vertices in the triplets.
- Z
-
the auxiliary type used within the triplet or graph structure.
Value parameters
- triplets
-
the sequence of triplets representing the graph structure.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Represents the "Undefined" edge type in a graph.
Represents the "Undefined" edge type in a graph.
The Undefined edge type is considered undirected, as determined by the oneWay method, which always returns false. This implies that there is no specific directionality for edges of this type.
This object provides a concrete implementation of the EdgeType trait, overriding the oneWay method to indicate the lack of directionality.
Attributes
- Supertypes
- Self type
-
Undefined.type
The Undirected object represents an undirected edge type in a graph. It extends the EdgeType trait and overrides the oneWay method to indicate that edges of this type are not one-way.
The Undirected object represents an undirected edge type in a graph. It extends the EdgeType trait and overrides the oneWay method to indicate that edges of this type are not one-way.
Attributes
- Supertypes
- Self type
-
Undirected.type
A trait representing an abstract data type for unordered collections of elements.
A trait representing an abstract data type for unordered collections of elements.
Type parameters
- T
-
the type of elements contained within this collection (covariant). This trait provides the foundation for implementing unordered data structures by defining fundamental operations such as checking for containment, iterating over elements, and adding new elements. Implementations of this trait must ensure that the order of elements is not relevant or preserved.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Companion object for the Unordered_Bag class providing factory methods to create instances of Unordered with unordered collections of elements.
Companion object for the Unordered_Bag class providing factory methods to create instances of Unordered with unordered collections of elements.
This object includes utility methods for creating empty unordered bags, bags from sequences, and bags initialized with varargs.
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
Unordered_Bag.type
A case class representing an unordered collection of elements in the form of a Set.
A case class representing an unordered collection of elements in the form of a Set.
Type parameters
- T
-
the type of the elements contained in the set.
Value parameters
- elements
-
a set of elements of type
Tforming the basis of the adjacency set. This class extends theUnorderedtrait, providing a concrete implementation for unordered data structures. TheUnordered_Setis immutable, meaning that any operation resulting in modification (such as adding a new element) will return a new instance ofUnordered_Setwithout changing the original instance.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass AbstractUnordered[T]trait Unordered[T]class Objecttrait Matchableclass AnyShow all
A case class representing an unordered collection of elements in the form of a Set.
A case class representing an unordered collection of elements in the form of a Set.
Type parameters
- T
-
the type of the elements contained in the set.
Value parameters
- elements
-
a set of elements of type
Tforming the basis of the adjacency set. This class extends theUnorderedtrait, providing a concrete implementation for unordered data structures. TheUnordered_Setis immutable, meaning that any operation resulting in modification (such as adding a new element) will return a new instance ofUnordered_Setwithout changing the original instance.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass AbstractUnordered[T]trait Unordered[T]class Objecttrait Matchableclass AnyShow all
A companion object for Unordered_Set, providing factory methods to create instances of unordered collections.
A companion object for Unordered_Set, providing factory methods to create instances of unordered collections.
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
Unordered_Set.type
Represents a vertex in a graph, containing an attribute of type V and a collection of adjacencies denoting its connections to other vertices.
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
- Supertypes
- Known subtypes
Represents a mapping of vertex attributes to their corresponding vertices within a graph. Provides functionality to manage and traverse vertices via DFS and BFS using the Visitor V1.2.0 typeclass engine.
Represents a mapping of vertex attributes to their corresponding vertices within a graph. Provides functionality to manage and traverse vertices via DFS and BFS using the Visitor V1.2.0 typeclass engine.
The mutable discovered flag pattern has been removed; visited-node tracking is now handled entirely by the immutable VisitedSet[V] inside the traversal engine.
Type parameters
- V
-
the type representing the vertex attributes (invariant).
Value parameters
- map
-
a mapping from vertex attributes to their associated Vertex instances.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Traversable[V]class Objecttrait Matchableclass AnyShow all
A case class representing a specific instance of a Connexion between two vertices in a graph.
A case class representing a specific instance of a Connexion between two vertices in a graph.
This class extends the Connexion trait, providing a concrete representation of a connexion between two vertices, identified as white and black. These terms are used to distinguish the two vertices in an abstract way, without implying any ordering or directional meaning.
Type parameters
- V
-
the type of the vertices forming the connection. This parameter allows flexibility to support any user-defined type representing a vertex.
Value parameters
- black
-
the second vertex in the connection, referred to as
black. - white
-
the first vertex in the connection, referred to as
white.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Connexion[V]class Objecttrait Matchableclass AnyShow all
A case class representing a list of vertex pairs in a graph.
A case class representing a list of vertex pairs in a graph.
CONSIDER eliminate this class.
This class provides a concrete implementation of SerializableGraph and Pairs, enabling functionalities such as accessing the pairs of vertices and transforming these pairs into triplets. Each triplet includes the source vertex, target vertex, and a unit value indicating the absence of an explicit edge attribute.
Type parameters
- V
-
the type of attributes associated with the vertices in the graph.
Value parameters
- pairs
-
a sequence of tuples, where each tuple contains two vertices representing a connection or relationship in the graph.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Types
Type alias for an unordered collection of adjacencies for a given vertex type.
Type alias for an unordered collection of adjacencies for a given vertex type.
NOTE: when AdjacencyEdge is used, an Unordered_Set is appropriate (no duplicate edges). When AdjacencyVertex is used, use Unordered_Bag (duplicate vertices are possible).
//@tparam V the type of the vertex attribute.
Attributes
Attributes
Attributes
A type alias representing a connection-like structure composed of three elements: an edge of type E and two vertices of type V.
A type alias representing a connection-like structure composed of three elements: an edge of type E and two vertices of type V.
This alias is typically used to describe relationships or connections in graphs or other data structures where a single edge connects two vertices.
// @tparam E the type representing the edge attribute. // @tparam V the type representing the vertex attribute.
Attributes
Value members
Concrete methods
Creates an empty Adjacencies instance backed by an Unordered_Bag.
Creates an empty Adjacencies instance backed by an Unordered_Bag.
Attributes
Creates an empty Adjacencies instance backed by an Unordered_Set.
Creates an empty Adjacencies instance backed by an Unordered_Set.