scalax.collection

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

See also the Graph for Scala Core User Guide.

Attributes

Members list

Packages

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.

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.

Attributes

Type members

Classlikes

trait AnyGraph[N, E <: Edge[N]] extends GraphLike[N, E, [N, E <: Edge[N]] =>> AnyGraph[N, E]]

Bundled functionality for mutable and immutable graphs alike.

Bundled functionality for mutable and immutable graphs alike.

Type parameters

E

the type of the edges in this graph.

N

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

Attributes

Supertypes
trait GraphLike[N, E, [N, E <: Edge[N]] =>> AnyGraph[N, E]]
trait GraphDegree[N, E, [N, E <: Edge[N]] =>> AnyGraph[N, E]]
trait GraphTraversal[N, E]
trait GraphBase[N, E, [N, E <: Edge[N]] =>> AnyGraph[N, E]]
trait Serializable
trait GraphOps[N, E, [N, E <: Edge[N]] =>> AnyGraph[N, E]]
trait OuterElems[N, E]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait Graph[N, E]
class DefaultGraphImpl[N, E]
trait Graph[N, E]
class DefaultGraphImpl[N, E]

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.

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.

Attributes

Supertypes
trait Iterable[A]
trait IterableOps[A, Iterable, Iterable[A]]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait GraphBase[N, E <: Edge[N], +CC <: ([X, Y <: Edge[X]] =>> GraphBase[X, Y, CC])] extends GraphOps[N, E, CC], OuterElems[N, E], 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.

Type parameters

E

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

N

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

Attributes

Companion
object
Supertypes
trait Serializable
trait GraphOps[N, E, CC]
trait OuterElems[N, E]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait GraphLike[N, E, CC]
trait AdjacencyListBase[N, E, CC]
trait AdjacencyListGraph[N, E, CC]
class DefaultGraphImpl[N, E]
trait AdjacencyListGraph[N, E, CC]
class DefaultGraphImpl[N, E]
trait Graph[N, E]
trait GraphLike[N, E, CC]
trait Graph[N, E]
trait AnyGraph[N, E]
trait GraphTraversal[N, E]
trait GraphTraversalImpl[N, E]
Show all
Self type
GraphBase[N, E, CC]
object GraphBase

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
GraphBase.type
trait GraphDegree[N, E <: Edge[N], +CC <: ([X, Y <: Edge[X]] =>> GraphBase[X, Y, CC])]

Mixin for degree calculations.

Mixin for degree calculations.

Type parameters

E

the type of the edges in this graph.

N

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

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait GraphLike[N, E, CC]
trait AdjacencyListBase[N, E, CC]
trait AdjacencyListGraph[N, E, CC]
class DefaultGraphImpl[N, E]
trait AdjacencyListGraph[N, E, CC]
class DefaultGraphImpl[N, E]
trait Graph[N, E]
trait GraphLike[N, E, CC]
trait Graph[N, E]
trait AnyGraph[N, E]
Show all
Self type
GraphBase[N, E, CC]
trait GraphLike[N, E <: Edge[N], +CC <: ([X, Y <: Edge[X]] =>> GraphLike[X, Y, CC] & AnyGraph[X, Y])] extends GraphBase[N, E, CC], GraphTraversal[N, E], GraphDegree[N, E, CC]

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.

Type parameters

E

the type of the edges in this graph.

N

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

This

the higher kinded type of the graph itself.

Attributes

Supertypes
trait GraphDegree[N, E, CC]
trait GraphTraversal[N, E]
trait GraphBase[N, E, CC]
trait Serializable
trait GraphOps[N, E, CC]
trait OuterElems[N, E]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait AdjacencyListBase[N, E, CC]
trait AdjacencyListGraph[N, E, CC]
class DefaultGraphImpl[N, E]
trait AdjacencyListGraph[N, E, CC]
class DefaultGraphImpl[N, E]
trait Graph[N, E]
trait GraphLike[N, E, CC]
trait Graph[N, E]
trait AnyGraph[N, E]
Show all
Self type
CC[N, E]
trait GraphOps[N, E <: Edge[N], +CC[X, Y <: Edge[X]]] extends OuterElems[N, E]

Operations common to mutable and immutable graphs.

Operations common to mutable and immutable graphs.

Attributes

Supertypes
trait OuterElems[N, E]
class Object
trait Matchable
class Any
Known subtypes
trait GraphBase[N, E, CC]
trait GraphLike[N, E, CC]
trait AdjacencyListBase[N, E, CC]
trait AdjacencyListGraph[N, E, CC]
class DefaultGraphImpl[N, E]
trait AdjacencyListGraph[N, E, CC]
class DefaultGraphImpl[N, E]
trait Graph[N, E]
trait GraphLike[N, E, CC]
trait Graph[N, E]
trait AnyGraph[N, E]
trait GraphTraversal[N, E]
trait GraphTraversalImpl[N, E]
Show all
trait GraphTraversal[N, E <: Edge[N]] extends GraphBase[N, E, [N, E <: Edge[N]] =>> GraphTraversal[N, E]]

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.

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.

Attributes

See also
Companion
object
Supertypes
trait GraphBase[N, E, [N, E <: Edge[N]] =>> GraphTraversal[N, E]]
trait Serializable
trait GraphOps[N, E, [N, E <: Edge[N]] =>> GraphTraversal[N, E]]
trait OuterElems[N, E]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait GraphLike[N, E, CC]
trait AdjacencyListBase[N, E, CC]
trait AdjacencyListGraph[N, E, CC]
class DefaultGraphImpl[N, E]
trait AdjacencyListGraph[N, E, CC]
class DefaultGraphImpl[N, E]
trait Graph[N, E]
trait GraphLike[N, E, CC]
trait Graph[N, E]
trait AnyGraph[N, E]
trait GraphTraversalImpl[N, E]
Show all
Self type

Contains traversal parameter definitions such as direction constants.

Contains traversal parameter definitions such as direction constants.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait GraphTraversalImpl[N, E <: Edge[N]] extends GraphTraversal[N, E], TraverserImpl[N, E]

Default implementation of the functionality defined by GraphTraversal except for algorithms that are placed in TraverserImpl.

Default implementation of the functionality defined by GraphTraversal except for algorithms that are placed in TraverserImpl.

Attributes

Supertypes
trait TraverserImpl[N, E]
trait GraphTraversal[N, E]
trait GraphBase[N, E, [N, E <: Edge[N]] =>> GraphTraversal[N, E]]
trait Serializable
trait GraphOps[N, E, [N, E <: Edge[N]] =>> GraphTraversal[N, E]]
trait OuterElems[N, E]
class Object
trait Matchable
class Any
Show all
Known subtypes
class DefaultGraphImpl[N, E]
class DefaultGraphImpl[N, E]
Self type
final implicit class Iterable$Enrichments(val it: Iterator.type) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
sealed trait NonEmpty[+A]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class OneOrMore[A]
class Several[A]
final case class OneOrMore[+A](head: A, tail: Iterable[A]) extends NonEmpty[A]

Collection of at least one element.

Collection of at least one element.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait NonEmpty[A]
class Object
trait Matchable
class Any
Show all
object OneOrMore

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
OneOrMore.type
sealed case class OuterEdge[N, E <: Edge[N]](edge: E) extends OuterElem[N, E]

Wraps edges to be accepted when calling Graph(...).

Wraps edges to be accepted when calling Graph(...).

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait OuterElem[N, E]
class Object
trait Matchable
class Any
Show all
sealed trait OuterElem[+N, +E <: Edge[N]]

Represents parameters that are accepted when calling Graph(...).

Represents parameters that are accepted when calling Graph(...).

Type parameters

E

the kind of the edges (links)

N

the type of the nodes (vertices)

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class OuterEdge[N, E]
class OuterNode[N]
trait OuterElems[N, E <: Edge[N]]

Represents parameters that are accepted when calling Graph(...).

Represents parameters that are accepted when calling Graph(...).

Type parameters

E

the kind of the edges (links)

N

the type of the nodes (vertices)

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Shrinkable[N, E]
trait GraphOps[N, E, CC]
trait GraphLike[N, E, CC]
trait AdjacencyListGraph[N, E, CC]
class DefaultGraphImpl[N, E]
trait Graph[N, E]
trait GraphBase[N, E, CC]
trait GraphLike[N, E, CC]
trait AdjacencyListBase[N, E, CC]
trait AdjacencyListGraph[N, E, CC]
class DefaultGraphImpl[N, E]
trait Graph[N, E]
trait AnyGraph[N, E]
trait GraphTraversal[N, E]
trait GraphTraversalImpl[N, E]
trait GraphOps[N, E, CC]
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
sealed case class OuterNode[+N](node: N) extends OuterElem[N, Nothing]

Wraps any type to be accepted when calling Graph(...).

Wraps any type to be accepted when calling Graph(...).

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait OuterElem[N, Nothing]
class Object
trait Matchable
class Any
Show all
final case class Several[+A](head: A, _2: A, more: Iterable[A]) extends NonEmpty[A]

Collection of at least two elements.

Collection of at least two elements.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait NonEmpty[A]
class Object
trait Matchable
class Any
Show all
object Several

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Several.type
object State

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
State.type
object ToString

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
ToString.type
trait TraverserImpl[N, E <: Edge[N]]

Default implementation of the graph algorithms defined in GraphTraversal.

Default implementation of the graph algorithms defined in GraphTraversal.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait GraphTraversalImpl[N, E]
class DefaultGraphImpl[N, E]
class DefaultGraphImpl[N, E]
Self type

Types

type ExtSet[A] = Set[A] & ExtSetMethods[A]

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

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

Attributes

Value members

Concrete fields

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

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

Attributes

Implicits

Implicits

final implicit def Iterable$Enrichments(it: Iterator.type): Iterable$Enrichments