Packages

  • package root

    Welcome to the Graph for Scala API reference.

    Welcome to the Graph for Scala API reference. Some suggested navigation entry points:

    Definition Classes
    root
  • package scalax
    Definition Classes
    root
  • package collection

    Contains the base traits and objects needed to use Graph for Scala.

    Contains the base traits and objects needed to use Graph for Scala.

    See also the Graph for Scala Core User Guide.

    Definition Classes
    scalax
  • package config
  • package edge

    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.

  • package generator

    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.

  • package generic
  • package immutable
  • package mutable
  • ChainingOps
  • Compat
  • ForeachBasedDetachingIterable
  • Graph
  • GraphBase
  • GraphDegree
  • GraphEdge
  • GraphLike
  • GraphPredef
  • GraphTraversal
  • GraphTraversalImpl
  • State
  • TraverserImpl
p

scalax

collection

package collection

Contains the base traits and objects needed to use Graph for Scala.

See also the Graph for Scala Core User Guide.

Linear Supertypes
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. collection
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package config
  2. package edge

    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.

  3. package generator

    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.

  4. package generic
  5. package immutable
  6. package mutable

Type Members

  1. type AnySet[A] = Set[A]
    Attributes
    protected[scalax]
  2. implicit final class ChainingOps[A] extends AnyVal

    Adds chaining methods tap and pipe to Any.

    Adds chaining methods tap and pipe to Any. Back ported from Scala 2.13.

  3. type ExtSet[A] = Set[A] with ExtSetMethods[A]

    scala.collection.Set extended by some useful methods in the context of Graph.

  4. trait ForeachBasedDetachingIterable[+A] extends Iterable[A]

    Substitute for Scala 2.12 Traversable to continue support for collections that cannot implement hasNext/next easily.

    Substitute for Scala 2.12 Traversable to continue support for collections that cannot implement hasNext/next easily. The methods of Scala 2.13's IterableOnce are implemented in terms of foreach.

    All methods with a collection result detach from this Iterable to Vector. This makes sense whenever the foreach implementation - causes significant computation overhead or - is not valid for arbitrary subcollections.

  5. 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.

  6. 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 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.

    N

    the user type of the nodes (vertices) in this graph.

    E

    the kind of the edges (links) in this graph.

  7. 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.

  8. trait GraphLike[N, E[+X] <: EdgeLikeIn[X], +This[NN, EE[+XX] <: EdgeLikeIn[XX]] <: GraphLike[NN, EE[XX], This] with AnySet[Param[NN, EE[XX]]] with Graph[NN, EE[XX]]] extends GraphAsSet[N, E, [NN, EE[+XX]]This[NN, EE]] 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 inherits DiHyperEdgeLike 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.

  9. trait GraphTraversal[N, E[+X] <: EdgeLikeIn[X]] extends GraphBase[N, E]

    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. Traversers also extend scala.collection.Iterable meaning that you can process the visited nodes and edges in a functional way.

    See also

    http://www.scala-graph.org/guides/core-traversing

  10. 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.

  11. type IterableOnce[A] = scala.collection.IterableOnce[A]
    Attributes
    protected[scalax]
  12. type MSet[A] = Set[A]
    Attributes
    protected[scalax]
  13. trait State[N, E[+X] <: EdgeLikeIn[X]] extends AnyRef

    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.

    Attributes
    protected
  14. trait TraverserImpl[N, E[+X] <: EdgeLikeIn[X]] extends AnyRef

    Default implementation of the graph algorithms defined in GraphTraversal.

Value Members

  1. val AnyDegree: (Int) => Boolean

    The default filter function for degrees to be included in degree calculation always returning true.

  2. final def MSet: Set
    Attributes
    protected[scalax]
    Annotations
    @inline()
  3. final def mkIterable[A](it: => Iterator[A]): Iterable[A]
    Attributes
    protected[scalax]
    Annotations
    @inline()
  4. object Compat
  5. object Graph extends GraphCoreCompanion[Graph] with Serializable

    The main companion object for immutable graphs.

  6. object GraphBase extends Serializable
  7. 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,_
  8. object GraphPredef

    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._
  9. object GraphTraversal extends Serializable

    Contains traversal parameter definitions such as direction constants.

  10. object State

Inherited from AnyRef

Inherited from Any

Ungrouped