scala.collection.Set extended by some useful methods in the context of Graph.
The main trait for immutable graphs bundling the functionality of traits concerned with specific aspects.
The main trait for immutable graphs bundling the functionality of traits concerned with specific aspects.
the type of the nodes (vertices) in this graph.
the kind of the edges in this graph.
Base template trait for graphs.
Base template trait for graphs.
This trait provides the common structure and base operations for immutable graphs
independently of their representation. Base operations also cover one-step traversals.
For unlimited traversals see trait GraphTraversal
.
Users of Graph usually don't interact directly with this trait but with
trait Graph
instead which inherits the functionality provided by this trait.
If E
inherits DirectedEdgeLike
the graph is directed, otherwise it is undirected or mixed.
the user type of the nodes (vertices) in this graph.
the kind of the edges (links) in this graph.
A trait for graph degree calculations.
A trait for graph degree calculations.
the user type of the nodes (vertices) in this graph.
the kind of the edges (links) in this graph.
A template trait for graphs.
A template trait for graphs.
This trait provides the common structure and operations of immutable graphs independently of their representation.
If E
inherits DirectedEdgeLike
the graph is directed, otherwise it is undirected or mixed.
the user type of the nodes (vertices) in this graph.
the higher kinded type of the edges (links) in this graph.
the higher kinded type of the graph itself.
Graph-related functionality such as traversals, path finding, cycle detection etc.
Graph-related functionality such as traversals, path finding, cycle detection etc. All algorithms including breadth-first, depth-first, white-gray-black search and Dijkstra's algorithm are tail recursive.
Before starting a traversal a Traverser
such as scalax.collection.GraphTraversal#InnerNodeTraverser
is instantiated explicitly or implicitly. It holds settings like maxDepth
, subgraph
or ordering
providing a fine-grained control of the traversal. Traverser
s also extend
scala.collection.Traversable
meaning that you can process the visited nodes and edges
in a functional way.
Default implementation of the functionality defined by GraphTraversal except for algorithms that are placed in TraverserImpl.
Adds bit fields to the graph and its nodes facilitating fast storage and retrieval of traversal-specific flags as a decoupled implementation trait.
Adds bit fields to the graph and its nodes facilitating fast storage and retrieval of
traversal-specific flags as a decoupled implementation trait. These flags are often used
to keep track of visited nodes.
Traversals (algorithms) acquire handles by calling withHandle
. Then,
in withHandle
's code block, node.visited
or node.bit
is called with the supplied
handle as an implicit parameter to set or get a node's flag.
Default implementation of the graph algorithms to maintain the functionality defined by GraphTraversal.
The default filter function for degrees to be included in degree calculation always returning true.
The main companion object for immutable graphs.
This object serves as a container for all edge-types to be used in the context of Graph
.
This object serves as a container for all edge-types to be used in the context of Graph
.
You will usually simply import all its members along with the members of Param:
import scalax.collection.GraphPredef._, scalax.collection.GraphEdge,_
This object serves as a container for several Graph
-related definitions like
parameter-types and implicit conversions.
This object serves as a container for several Graph
-related definitions like
parameter-types and implicit conversions.
You will usually simply import all its members along with the members of InnerEdgeParam
:
import scalax.collection.GraphPredef._, scalax.collection.InnerEdgeParam._
Contains traversal parameter definitions such as direction constants.
Predefined edges.
Predefined edges.
While basic edge types are defined in the object GraphEdge
,
the predefined edges in this package cover the following categories
(prefixes, shortcuts):
weighted (W, %
), key-weighted (Wk, %#
),
labeled (L, +
), key-labeled (Lk, +#
),
weighted and labeled (WL, %+
), key-weighted and labeled (WkL, %#+
),
weighted and key-labeled (WLk, %+#
) and key-weighted and key-labeled (WkLk, %#+#
).
These predefined edges provide alternatives for any edge extension taking the burden from the user to implement his/her custom edge class - but baring the disadvantage that user edge attributes must be part of a label class as opposed to being part of the edge class directly. It may also serve as a source for looking up how to implement custom edge classes.
This package helps you to create random graphs with predefined metrics.
This package helps you to create random graphs with predefined metrics. It is not only possible to create random graph instances but also Scalacheck generators.
Contains the base traits and objects needed to use Graph for Scala.
See also the Graph for Scala Core User Guide.