package collection
Contains the base traits and objects needed to use Graph for Scala.
See also the Graph for Scala Core User Guide.
 Alphabetic
 By Inheritance
 collection
 AnyRef
 Any
 Hide All
 Show All
 Public
 All
Type Members

type
AnySet[A] = Set[A]
 Attributes
 protected[scalax]

implicit final
class
ChainingOps[A] extends AnyVal
Adds chaining methods
tap
andpipe
toAny
.Adds chaining methods
tap
andpipe
toAny
. Back ported from Scala 2.13. 
type
ExtSet[A] = Set[A] with ExtSetMethods[A]
scala.collection.Set extended by some useful methods in the context of Graph.

trait
Graph[N, E[X] <: EdgeLikeIn[X]] extends AnySet[Param[N, E]] with GraphLike[N, E, 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.
 N
the type of the nodes (vertices) in this graph.
 E
the kind of the edges in this graph.

trait
GraphBase[N, E[X] <: EdgeLikeIn[X]] extends Serializable
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 onestep 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
inheritsDirectedEdgeLike
the graph is directed, otherwise it is undirected or mixed. N
the user type of the nodes (vertices) in this graph.
 E
the kind of the edges (links) in this graph.

trait
GraphDegree[N, E[X] <: EdgeLikeIn[X]] extends AnyRef
A trait for graph degree calculations.
A trait for graph degree calculations.
 N
the user type of the nodes (vertices) in this graph.
 E
the kind of the edges (links) in this graph.

trait
GraphLike[N, E[X] <: EdgeLikeIn[X], +This[X, Y[X] <: EdgeLikeIn[X]] <: GraphLike[X, Y[X], This] with AnySet[Param[X, Y[X]]] with Graph[X, Y[X]]] extends SetLike[Param[N, E], This[N, E]] with GraphTraversal[N, E] with GraphBase[N, E] with GraphDegree[N, E]
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
inheritsDirectedEdgeLike
the graph is directed, otherwise it is undirected or mixed. N
the user type of the nodes (vertices) in this graph.
 E
the higher kinded type of the edges (links) in this graph.
 This
the higher kinded type of the graph itself.

trait
GraphTraversal[N, E[X] <: EdgeLikeIn[X]] extends GraphBase[N, E]
Graphrelated functionality such as traversals, path finding, cycle detection etc.
Graphrelated functionality such as traversals, path finding, cycle detection etc. All algorithms including breadthfirst, depthfirst, whitegrayblack 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 likemaxDepth
,subgraph
orordering
providing a finegrained control of the traversal.Traverser
s also extendscala.collection.Traversable
meaning that you can process the visited nodes and edges in a functional way. 
trait
GraphTraversalImpl[N, E[X] <: EdgeLikeIn[X]] extends GraphTraversal[N, E] with TraverserImpl[N, E] with State[N, E]
Default implementation of the functionality defined by GraphTraversal except for algorithms that are placed in TraverserImpl.

type
MSet[A] = Set[A]
 Attributes
 protected[scalax]

trait
State[N, E[X] <: EdgeLikeIn[X]] extends AnyRef
Adds bit fields to the graph and its nodes facilitating fast storage and retrieval of traversalspecific flags as a decoupled implementation trait.
Adds bit fields to the graph and its nodes facilitating fast storage and retrieval of traversalspecific 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, inwithHandle
's code block,node.visited
ornode.bit
is called with the supplied handle as an implicit parameter to set or get a node's flag. Attributes
 protected

trait
TraverserImpl[N, E[X] <: EdgeLikeIn[X]] extends AnyRef
Default implementation of the graph algorithms to maintain the functionality defined by GraphTraversal.
Value Members

val
AnyDegree: (Int) ⇒ Boolean
The default filter function for degrees to be included in degree calculation always returning true.

final
def
MSet: Set.type
 Attributes
 protected[scalax]
 Annotations
 @inline()

object
Graph extends GraphCoreCompanion[Graph] with Serializable
The main companion object for immutable graphs.
 object GraphBase extends Serializable

object
GraphEdge
Container for basic edge types to be used in the context of
Graph
.Container for basic 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,_

object
GraphPredef
This object serves as a container for several
Graph
related definitions like parametertypes and implicit conversions.This object serves as a container for several
Graph
related definitions like parametertypes and implicit conversions.You will usually simply import all its members along with the members of
InnerEdgeParam
:import scalax.collection.GraphPredef._, scalax.collection.InnerEdgeParam._

object
GraphTraversal extends Serializable
Contains traversal parameter definitions such as direction constants.
 object State
Welcome to the Graph for Scala API reference. Some suggested navigation entry points:
Graph
mutable.Graph
and its inner nodes.GraphEdge
objectedge
packageGraphPredef
object andImplicits
object.GraphTraversal
andTraverserInnerNode
.RandomGraph
.GraphGen
.