Graph

scalax.collection.mutable.Graph
See theGraph companion object
trait Graph[N, E <: Edge[N]] extends AnyGraph[N, E], GraphLike[N, E, [N, E <: Edge[N]] =>> Graph[N, E]]

The main trait for mutable graphs bundling the functionality of traits concerned with specific aspects.

Type parameters

E

the kind of the edges in this graph.

N

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

Attributes

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

Members list

Type members

Inherited classlikes

sealed abstract class AbstractTopologicalOrder[+A, +T] extends AbstractIterable[T]

Topologically ordered nodes or layers of a topological order of a graph or of an isolated graph component.

Topologically ordered nodes or layers of a topological order of a graph or of an isolated graph component.

Type parameters

A

one of NodeT, N

T

one of A or (Int, Iterable[A])

Attributes

Inherited from:
GraphTraversal
Supertypes
class AbstractIterable[T]
trait Iterable[T]
trait IterableOps[T, Iterable, Iterable[T]]
trait IterableOnce[T]
class Object
trait Matchable
class Any
Show all
Known subtypes
object BaseInnerEdge

Attributes

Inherited from:
GraphBase
Supertypes
class Object
trait Matchable
class Any
trait BaseInnerEdge extends InnerEdge, Equals

Attributes

Inherited from:
GraphBase
Supertypes
trait InnerEdge
trait InnerElem
trait Edge[NodeT]
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
trait BaseInnerNode extends Node, InnerNode

Attributes

Inherited from:
GraphBase
Supertypes
trait InnerNode
trait InnerElem
trait Node
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
abstract class Component()

Represents a component of this graph. Edges and bridges are computed lazily. Components will be instantiated by componentTraverser or strongComponentTraverser.

Represents a component of this graph. Edges and bridges are computed lazily. Components will be instantiated by componentTraverser or strongComponentTraverser.

Attributes

Inherited from:
GraphTraversal
Supertypes
class Object
trait Matchable
class Any
Known subtypes
abstract class ComponentTraverser() extends Iterable[Component]

Controls the properties of graph traversals with no specific root and allows you to produce the (weakly) connected components by a traversal or call methods like findCycle that work component-wise.

Controls the properties of graph traversals with no specific root and allows you to produce the (weakly) connected components by a traversal or call methods like findCycle that work component-wise.

Attributes

Inherited from:
GraphTraversal
Supertypes
Known subtypes
object Cycle

Attributes

Inherited from:
GraphTraversal
Supertypes
class Object
trait Matchable
class Any
trait Cycle extends Path

Represents a cycle in this graph listing the nodes and connecting edges on it with the following syntax:

Represents a cycle in this graph listing the nodes and connecting edges on it with the following syntax:

cycle ::= ''start-end-node'' { ''edge'' ''node'' } ''edge'' ''start-end-node''

All nodes and edges on the path are distinct except the start and end nodes that are equal. A cycle contains at least a start node followed by any number of consecutive pairs of an edge and a node and the end node equaling to the start node. The first element is the start node, the second is an edge with its tail being the start node and its head being the third element etc.

Attributes

Inherited from:
GraphTraversal
Supertypes
trait Path
trait Walk
class Object
trait Matchable
class Any
Show all
Known subtypes
object Degree extends DegreeFunction

Attributes

Inherited from:
GraphDegree
Supertypes
trait NodeT => Int
class Object
trait Matchable
class Any
trait DegreeFunction extends NodeT => Int

Attributes

Inherited from:
GraphDegree
Supertypes
trait NodeT => Int
class Object
trait Matchable
class Any
Known subtypes
object Degree.type
object InDegree.type
object OutDegree.type
final class DegreeOrdering(val f: DegreeFunction) extends Ordering[NodeT]

Decreasing ordering of nodes with respect to their degree.

Decreasing ordering of nodes with respect to their degree.

Attributes

Inherited from:
GraphDegree
Supertypes
trait Ordering[NodeT]
trait Equiv[NodeT]
trait Serializable
trait Comparator[NodeT]
class Object
trait Matchable
class Any
Show all

Attributes

Inherited from:
GraphDegree
Supertypes
class Object
trait Matchable
class Any
object EdgeOrdering extends Serializable

Ordering for the path dependent type EdgeT.

Ordering for the path dependent type EdgeT.

Attributes

Inherited from:
GraphBase
Supertypes
trait Serializable
class Object
trait Matchable
class Any
sealed trait EdgeOrdering extends Ordering[EdgeT]

Ordering for the path dependent type EdgeT.

Ordering for the path dependent type EdgeT.

Attributes

Inherited from:
GraphBase
Supertypes
trait Ordering[EdgeT]
trait Equiv[EdgeT]
trait Serializable
trait Comparator[EdgeT]
class Object
trait Matchable
class Any
Show all
Known subtypes
object ArityOrdering.type
object WeightOrdering.type
object None.type

Attributes

Inherited from:
GraphBase
Supertypes
trait Serializable
trait Set[EdgeT]
trait Equals
trait SetOps[EdgeT, Set, Set[EdgeT]]
trait EdgeT => Boolean
trait Iterable[EdgeT]
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Inherited from:
GraphTraversal
Supertypes
class Object
trait Matchable
class Any
trait ExtendedNodeVisitor[U] extends NodeT => U

Template for extended node visitors. While the default node visitor of the type NodeT => U passes solely the inner node being visited, extended node visitors pass the following traversal state information:

Template for extended node visitors. While the default node visitor of the type NodeT => U passes solely the inner node being visited, extended node visitors pass the following traversal state information:

  1. the inner node currently visited as with a standard node visitor
  2. the number of nodes visited so far and
  3. the current depth in terms of the underlying algorithm and
  4. a reference to a specific informer that may be pattern matched to collect even further data specific to the implementation.

Attributes

Inherited from:
GraphTraversal
Supertypes
trait NodeT => U
class Object
trait Matchable
class Any
trait Filter[T] extends T => Boolean

Attributes

Inherited from:
GraphDegree
Supertypes
trait T => Boolean
class Object
trait Matchable
class Any
trait GraphEdgeSet extends EdgeSet

Attributes

Inherited from:
GraphLike
Supertypes
trait EdgeSet
trait Serializable
trait Set[EdgeT]
trait Equals
trait SetOps[EdgeT, Set, Set[EdgeT]]
trait EdgeT => Boolean
trait Iterable[EdgeT]
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Inherited from:
GraphLike
Supertypes
trait InnerEdge
trait InnerElem
trait Edge[NodeT]
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Inherited from:
GraphLike
Supertypes
trait InnerNode
trait InnerElem
trait Node
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Inherited from:
GraphLike
Supertypes
trait GraphEdgeSet
trait EdgeSet
trait Serializable
trait Set[EdgeT]
trait SetOps[EdgeT, Set, Set[EdgeT]]
trait Shrinkable[EdgeT]
trait Builder[EdgeT, Set[EdgeT]]
trait Growable[EdgeT]
trait Clearable
trait Cloneable[Set[EdgeT]]
trait Cloneable
trait Set[EdgeT]
trait Equals
trait SetOps[EdgeT, Set, Set[EdgeT]]
trait EdgeT => Boolean
trait Iterable[EdgeT]
trait Iterable[EdgeT]
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Inherited from:
GraphLike
Supertypes
trait InnerNode
trait InnerElem
trait Node
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Inherited from:
GraphLike
Supertypes
trait GraphNodeSet
trait NodeSet
trait Set[NodeT]
trait SetOps[NodeT, Set, Set[NodeT]]
trait Shrinkable[NodeT]
trait Builder[NodeT, Set[NodeT]]
trait Growable[NodeT]
trait Clearable
trait Cloneable[Set[NodeT]]
trait Cloneable
trait Set[NodeT]
trait Equals
trait SetOps[NodeT, Set, Set[NodeT]]
trait NodeT => Boolean
trait Iterable[NodeT]
trait Iterable[NodeT]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait GraphNodeSet extends NodeSet

Attributes

Inherited from:
GraphLike
Supertypes
trait NodeSet
trait Set[NodeT]
trait Equals
trait SetOps[NodeT, Set, Set[NodeT]]
trait NodeT => Boolean
trait Iterable[NodeT]
class Object
trait Matchable
class Any
Show all
Known subtypes
object InDegree extends DegreeFunction

Attributes

Inherited from:
GraphDegree
Supertypes
trait NodeT => Int
class Object
trait Matchable
class Any
object Informer

Attributes

Inherited from:
GraphTraversal
Supertypes
class Object
trait Matchable
class Any
class InnerDiEdge(val source: NodeT, val target: NodeT, val outer: E) extends DiEdge[NodeT], EdgeT

Attributes

Inherited from:
GraphLike
Supertypes
trait InnerEdge
trait InnerElem
class DiEdge[NodeT]
trait AnyDiEdge[NodeT]
trait AnyEdge[NodeT]
trait Edge[NodeT]
trait Equals
class Object
trait Matchable
class Any
Show all
object InnerDiEdge

Attributes

Inherited from:
GraphLike
Supertypes
class Object
trait Matchable
class Any
class InnerDiHyperEdge(val sources: OneOrMore[NodeT], val targets: OneOrMore[NodeT], val outer: E) extends DiHyperEdge[NodeT], EdgeT

Attributes

Inherited from:
GraphLike
Supertypes
trait InnerEdge
trait InnerElem
class DiHyperEdge[NodeT]
trait Edge[NodeT]
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Inherited from:
GraphLike
Supertypes
class Object
trait Matchable
class Any
object InnerEdge

Attributes

Inherited from:
GraphOps
Supertypes
class Object
trait Matchable
class Any
trait InnerEdge extends InnerElem

Attributes

Inherited from:
GraphOps
Supertypes
trait InnerElem
class Object
trait Matchable
class Any
Known subtypes

Controls the properties of inner-edge graph traversals. To start a traversal call one of the graph traversal methods or any appropriate method inherited from scala.collection.Iterable on this instance.

Controls the properties of inner-edge graph traversals. To start a traversal call one of the graph traversal methods or any appropriate method inherited from scala.collection.Iterable on this instance.

Attributes

Inherited from:
GraphTraversal
Supertypes
Known subtypes
sealed trait InnerElem

Attributes

Inherited from:
GraphOps
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class InnerHyperEdge(val ends: Several[NodeT], val outer: E) extends HyperEdge[NodeT], EdgeT

Attributes

Inherited from:
GraphLike
Supertypes
trait InnerEdge
trait InnerElem
class HyperEdge[NodeT]
trait Edge[NodeT]
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Inherited from:
GraphLike
Supertypes
class Object
trait Matchable
class Any
object InnerNode

Attributes

Inherited from:
GraphOps
Supertypes
class Object
trait Matchable
class Any
trait InnerNode extends InnerElem

Attributes

Inherited from:
GraphOps
Supertypes
trait InnerElem
class Object
trait Matchable
class Any
Known subtypes

Controls the properties of inner-node down-up graph traversals. To start a traversal call one of the graph traversal methods or any appropriate method inherited from scala.collection.Iterable on this instance.

Controls the properties of inner-node down-up graph traversals. To start a traversal call one of the graph traversal methods or any appropriate method inherited from scala.collection.Iterable on this instance.

Attributes

Inherited from:
GraphTraversal
Supertypes
Known subtypes

Controls the properties of inner-node graph traversals. To start a traversal call one of the graph traversal methods or any appropriate method inherited from scala.collection.Iterable on this instance.

Controls the properties of inner-node graph traversals. To start a traversal call one of the graph traversal methods or any appropriate method inherited from scala.collection.Iterable on this instance.

Attributes

Inherited from:
GraphTraversal
Supertypes
Known subtypes
class InnerOrderedDiHyperEdge(val sources: OneOrMore[NodeT], val targets: OneOrMore[NodeT], val outer: E) extends OrderedDiHyperEdge[NodeT], EdgeT

Attributes

Inherited from:
GraphLike
Supertypes
trait InnerEdge
trait InnerElem
class OrderedDiHyperEdge[NodeT]
trait Edge[NodeT]
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Inherited from:
GraphLike
Supertypes
class Object
trait Matchable
class Any
class InnerOrderedHyperEdge(val ends: Several[NodeT], val outer: E) extends OrderedHyperEdge[NodeT], EdgeT

Attributes

Inherited from:
GraphLike
Supertypes
trait InnerEdge
trait InnerElem
class OrderedHyperEdge[NodeT]
trait Edge[NodeT]
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Inherited from:
GraphLike
Supertypes
class Object
trait Matchable
class Any
class InnerUnDiEdge(val source: NodeT, val target: NodeT, val outer: E) extends UnDiEdge[NodeT], EdgeT

Attributes

Inherited from:
GraphLike
Supertypes
trait InnerEdge
trait InnerElem
class UnDiEdge[NodeT]
trait AnyEdge[NodeT]
trait Edge[NodeT]
trait Equals
class Object
trait Matchable
class Any
Show all
object InnerUnDiEdge

Attributes

Inherited from:
GraphLike
Supertypes
class Object
trait Matchable
class Any
object IntReverseOrdering extends Ordering[Int]

Decreasing ordering of integers.

Decreasing ordering of integers.

Attributes

Inherited from:
GraphDegree
Supertypes
trait Ordering[Int]
trait Equiv[Int]
trait Serializable
trait Comparator[Int]
class Object
trait Matchable
class Any
Show all
case class Layer

Represents a topological sort layer.

Represents a topological sort layer.

Attributes

Inherited from:
GraphTraversal
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final class LayeredTopologicalOrder[+A] extends AbstractTopologicalOrder[A, (Int, Iterable[A])]

Layers of a topological order of a graph or of an isolated graph component. The layers of a topological sort can roughly be defined as follows: a. layer 0 contains all nodes having no predecessors, a. layer n contains those nodes that have only predecessors in ancestor layers with at least one of them contained in layer n - 1

Layers of a topological order of a graph or of an isolated graph component. The layers of a topological sort can roughly be defined as follows: a. layer 0 contains all nodes having no predecessors, a. layer n contains those nodes that have only predecessors in ancestor layers with at least one of them contained in layer n - 1

Type parameters

A

one of NodeT, N

Attributes

Inherited from:
GraphTraversal
Supertypes
trait Iterable[(Int, Iterable[A])]
trait IterableOnce[(Int, Iterable[A])]
class Object
trait Matchable
class Any
Show all
object NoOrdering extends Serializable

The empty ElemOrdering.

The empty ElemOrdering.

Attributes

Inherited from:
GraphBase
Supertypes
trait Serializable
class Object
trait Matchable
class Any
object Node

Attributes

Inherited from:
GraphBase
Supertypes
class Object
trait Matchable
class Any
trait Node extends Serializable

Attributes

Inherited from:
GraphBase
Supertypes
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
protected trait NodeBase extends GraphInnerNode

Attributes

Inherited from:
GraphLike
Supertypes
trait InnerNode
trait InnerElem
trait Node
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
object NodeOrdering

Attributes

Inherited from:
GraphBase
Supertypes
class Object
trait Matchable
class Any
sealed trait NodeOrdering extends Ordering[NodeT]

Ordering for the path dependent type NodeT.

Ordering for the path dependent type NodeT.

Attributes

Inherited from:
GraphBase
Supertypes
trait Ordering[NodeT]
trait Equiv[NodeT]
trait Serializable
trait Comparator[NodeT]
class Object
trait Matchable
class Any
Show all
Known subtypes
object None.type
trait NodeSet extends Set[NodeT], ExtSetMethods[NodeT]

Attributes

Inherited from:
GraphBase
Supertypes
trait Set[NodeT]
trait Equals
trait SetOps[NodeT, Set, Set[NodeT]]
trait NodeT => Boolean
trait Iterable[NodeT]
class Object
trait Matchable
class Any
Show all
Known subtypes
object OutDegree extends DegreeFunction

Attributes

Inherited from:
GraphDegree
Supertypes
trait NodeT => Int
class Object
trait Matchable
class Any
sealed case class OuterEdge(edge: E) extends OuterElem

To be mixed in by edge classes to allow passing them to Graph(...).

To be mixed in by edge classes to allow passing them to Graph(...).

Attributes

Inherited from:
OuterElems
Supertypes
trait Serializable
trait Product
trait Equals
trait OuterElem
class Object
trait Matchable
class Any
Show all
abstract class OuterEdgeTraverser extends Traverser[E, OuterEdgeTraverser]

Controls the properties of outer-edge graph traversals. To start a traversal call one of the graph traversal methods or any appropriate method inherited from scala.collection.Iterable on this instance.

Controls the properties of outer-edge graph traversals. To start a traversal call one of the graph traversal methods or any appropriate method inherited from scala.collection.Iterable on this instance.

Attributes

Inherited from:
GraphTraversal
Supertypes
trait Iterable[E]
trait IterableOps[E, Iterable, Iterable[E]]
trait IterableOnce[E]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait OuterElem

Attributes

Inherited from:
OuterElems
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class OuterEdge
class OuterNode

Controls the properties of outer-element graph traversals. To start a traversal call one of the graph traversal methods or any appropriate method inherited from scala.collection.Iterable on this instance.

Controls the properties of outer-element graph traversals. To start a traversal call one of the graph traversal methods or any appropriate method inherited from scala.collection.Iterable on this instance.

Attributes

Inherited from:
GraphTraversal
Supertypes
Known subtypes
sealed case class OuterNode(node: N) extends OuterElem

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

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

Attributes

Inherited from:
OuterElems
Supertypes
trait Serializable
trait Product
trait Equals
trait OuterElem
class Object
trait Matchable
class Any
Show all

Controls the properties of outer-node down-up graph traversals. To start a traversal call one of the graph traversal methods or any appropriate method inherited from scala.collection.Iterable on this instance.

Controls the properties of outer-node down-up graph traversals. To start a traversal call one of the graph traversal methods or any appropriate method inherited from scala.collection.Iterable on this instance.

Attributes

Inherited from:
GraphTraversal
Supertypes
trait Iterable[(Boolean, N)]
trait IterableOnce[(Boolean, N)]
class Object
trait Matchable
class Any
Show all
Known subtypes
abstract class OuterNodeTraverser extends Traverser[N, OuterNodeTraverser]

Controls the properties of outer-node graph traversals. To start a traversal call one of the graph traversal methods or any appropriate method inherited from scala.collection.Iterable on this instance.

Controls the properties of outer-node graph traversals. To start a traversal call one of the graph traversal methods or any appropriate method inherited from scala.collection.Iterable on this instance.

Attributes

Inherited from:
GraphTraversal
Supertypes
trait Iterable[N]
trait IterableOps[N, Iterable, Iterable[N]]
trait IterableOnce[N]
class Object
trait Matchable
class Any
Show all
Known subtypes
object Path extends Serializable

Attributes

Inherited from:
GraphTraversal
Supertypes
trait Serializable
class Object
trait Matchable
class Any
trait Path extends Walk

Represents a path in this graph where

Represents a path in this graph where

path ::= ''node'' { ''edge'' ''node'' }

Nodes and edges on the path are distinct. A walk/path contains at least one node followed by any number of consecutive pairs of an edge and a node. The first element is the start node, the second is an edge with its source being the start node and its target being the third element etc.

Attributes

Inherited from:
GraphTraversal
Supertypes
Known subtypes

A Builder for valid paths in this graph.

A Builder for valid paths in this graph.

Nodes and edges may be added either alternating or node by node respectively edge by edge. Either way, the builder ensures that the added elements build a valid path.

A node addition fails if either the node to be added is already contained or the node is not a direct successor of the previously added node or of the target node of the previously added edge. An edge addition fails if either the edge to be added is is already contained or the edge is not an outgoing edge from the previously added node or of the target node of the previously added edge.

It is recommended using add instead of += to track failed additions.

Attributes

Inherited from:
GraphTraversal
Supertypes
trait WalkBuilder
trait Clearable
class Object
trait Matchable
class Any
Show all
Known subtypes
abstract class StrongComponentTraverser() extends Iterable[Component]

Controls the properties of graph traversals with no specific root and allows you to produce the strongly connected components by a traversal.

Controls the properties of graph traversals with no specific root and allows you to produce the strongly connected components by a traversal.

Attributes

Inherited from:
GraphTraversal
Supertypes
Known subtypes
final class TopologicalOrder[+A] extends AbstractTopologicalOrder[A, A]

A traversable topological order of nodes of a graph or of an isolated graph component.

A traversable topological order of nodes of a graph or of an isolated graph component.

Type parameters

A

one of NodeT, N

Attributes

Inherited from:
GraphTraversal
Supertypes
class AbstractIterable[A]
trait Iterable[A]
trait IterableOps[A, Iterable, Iterable[A]]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Show all

Failure result of a topological sort with a possible hint of candidate cycle nodes.

Failure result of a topological sort with a possible hint of candidate cycle nodes.

Value parameters

candidateCycleNodes
  • If the set is not empty, at least one of the candidate nodes lies on a cycle.
  • An empty set is only returned if, in any of the components, no node without a predecessor exists so the algorithm was stopped before any cycle node could have been determined.

Attributes

Inherited from:
GraphTraversal
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait Traverser[A, +CC <: Traverser[A, CC]] extends ForeachBasedDetachingIterable[A]

Controls the properties of consecutive graph traversals starting at a root node. Provides methods to refine the properties and to invoke traversals. Instances will be created by innerNodeTraverser etc.

Controls the properties of consecutive graph traversals starting at a root node. Provides methods to refine the properties and to invoke traversals. Instances will be created by innerNodeTraverser etc.

Attributes

Inherited from:
GraphTraversal
Supertypes
trait Iterable[A]
trait IterableOps[A, Iterable, Iterable[A]]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Inherited from:
GraphTraversal
Supertypes
class Object
trait Matchable
class Any

Attributes

Inherited from:
GraphTraversal
Supertypes
trait InnerNode
trait InnerElem
trait Node
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
object Walk

Attributes

Inherited from:
GraphTraversal
Supertypes
class Object
trait Matchable
class Any
trait Walk extends Iterable[InnerElem]

Represents a walk in this graph where walk ::= ''node'' { ''edge'' ''node'' } A walk/path contains at least one node followed by any number of consecutive pairs of an edge and a node. The first element is the start node, the second is an edge with its source being the start node and its target being the third element etc.

Represents a walk in this graph where walk ::= ''node'' { ''edge'' ''node'' } A walk/path contains at least one node followed by any number of consecutive pairs of an edge and a node. The first element is the start node, the second is an edge with its source being the start node and its target being the third element etc.

Attributes

Inherited from:
GraphTraversal
Supertypes
Known subtypes
trait WalkBuilder extends Builder[InnerElem, Walk]

A Builder for valid walks in this graph.

A Builder for valid walks in this graph.

Nodes and edges may be added either alternating or node by node respectively edge by edge. Either way, the builder ensures that the added elements build a valid walk.

A node addition fails if the node to be added is not a direct successor of the previously added node or of the target node of the previously added edge. An edge addition fails if the edge to be added is not an outgoing edge from the previously added node or of the target node of the previously added edge.

It is recommended using add instead of += to track failed additions.

Attributes

Inherited from:
GraphTraversal
Supertypes
trait Clearable
class Object
trait Matchable
class Any
Show all
Known subtypes
class Weight(val value: Double, val edgeWeight: EdgeT => Double)

Stores a value and an edge weight function for use in weight-based traversals that may be defined by withMaxWeight.

Stores a value and an edge weight function for use in weight-based traversals that may be defined by withMaxWeight.

Attributes

Inherited from:
GraphTraversal
Supertypes
class Object
trait Matchable
class Any
object Weight

Attributes

Inherited from:
GraphTraversal
Supertypes
class Object
trait Matchable
class Any

Inherited types

Type alias for entries in degree maps returned by degreeSeqMap.

Type alias for entries in degree maps returned by degreeSeqMap.

Attributes

Inherited from:
GraphDegree

Attributes

Inherited from:
GraphOps

Attributes

Inherited from:
GraphLike

Attributes

Inherited from:
GraphLike

The result of a topological sort in the layered view.

The result of a topological sort in the layered view.

Attributes

Inherited from:
GraphTraversal

Attributes

Inherited from:
GraphOps

Attributes

Inherited from:
GraphLike

Attributes

Inherited from:
GraphLike
protected type ThisGraph = GraphLike.this.type

Attributes

Inherited from:
GraphLike

Value members

Concrete methods

override def empty: Graph[N, E]

Attributes

Definition Classes

Inherited methods

final def &(that: AnyGraph[N, E]): CC[N, E]

Alias for intersect.

Alias for intersect.

Attributes

Inherited from:
GraphOps
final def &=(that: AnyGraph[N, E]): GraphOps.this.type

Alias for intersectInPlace.

Alias for intersectInPlace.

Attributes

Inherited from:
GraphOps
final def &~(that: AnyGraph[N, E]): CC[N, E]

Alias for diff.

Alias for diff.

Attributes

Inherited from:
GraphOps
final def ++[N2 >: N, E2 >: E <: Edge[N2]](edges: IterableOnce[E2])(implicit e: E2 <:< Edge[N2]): CC[N2, E2]

Alias for concat(edges).

Alias for concat(edges).

Attributes

Inherited from:
GraphOps
final def ++[N2 >: N, E2 >: E <: Edge[N2]](isolatedNodes: IterableOnce[N2], edges: IterableOnce[E2])(implicit e: E2 <:< Edge[N2]): CC[N2, E2]

Alias for concat(isolatedNodes, edges).

Alias for concat(isolatedNodes, edges).

Attributes

Inherited from:
GraphOps
def ++=(nodes: Iterable[N], edges: Iterable[E]): Growable.this.type

Adds all passed nodes and edges to this graph. For a mutable Graph see also unionInPlace.

Adds all passed nodes and edges to this graph. For a mutable Graph see also unionInPlace.

Attributes

Inherited from:
Growable
def ++=(xs: Iterable[OuterElem[N, E]]): Growable.this.type

Alias for addAll(xs).

Alias for addAll(xs).

Attributes

Inherited from:
Growable
final def +=(edge: E): Growable.this.type

Alias for addOne(edge).

Alias for addOne(edge).

Attributes

Inherited from:
Growable
final def +=(node: N): Growable.this.type

Alias for addOne(node).

Alias for addOne(node).

Attributes

Inherited from:
Growable
final def --=(that: AnyGraph[N, E]): Shrinkable.this.type

Alias for diffInPlace.

Alias for diffInPlace.

Attributes

Inherited from:
Shrinkable
final def --=(edges: IterableOnce[E]): Shrinkable.this.type

Alias for removeAll(edges).

Alias for removeAll(edges).

Attributes

Inherited from:
Shrinkable
final def --=(nodes: IterableOnce[N], edges: IterableOnce[E]): Shrinkable.this.type

Alias for removeAll(nodes, edges).

Alias for removeAll(nodes, edges).

Attributes

Inherited from:
Shrinkable
final def -=(edge: E): Shrinkable.this.type

Alias for subtractOne(node).

Alias for subtractOne(node).

Attributes

Inherited from:
Shrinkable
final def -=(node: N): Shrinkable.this.type

Alias for subtractOne(node).

Alias for subtractOne(node).

Attributes

Inherited from:
Shrinkable
def add(edge: E): Boolean

Adds a single edge to this graph.

Adds a single edge to this graph.

Attributes

Returns

true if this graph has not contained edge before.

Inherited from:
GraphOps
def add(node: N): Boolean

Adds a single node to this graph.

Adds a single node to this graph.

Attributes

Returns

true if this graph has not contained node before.

Inherited from:
GraphOps
def addAll(xs: Iterable[OuterElem[N, E]]): Growable.this.type

Adds all elements produced by outer to this graph. For a graph see also unionInPlace.

Adds all elements produced by outer to this graph. For a graph see also unionInPlace.

Attributes

Inherited from:
Growable
final def addAndGet(edge: E): EdgeT

Adds the given edge if not yet present and returns it as an inner edge.

Adds the given edge if not yet present and returns it as an inner edge.

Value parameters

edge

the edge to add.

Attributes

Returns

the inner edge containing the added edge.

Inherited from:
GraphLike
final def addAndGet(node: N): NodeT

Adds the given node if not yet present and returns it as an inner node.

Adds the given node if not yet present and returns it as an inner node.

Value parameters

node

the node to add.

Attributes

Returns

inner node containing the added node.

Inherited from:
GraphLike
def addOne(edge: E): Growable.this.type

Adds a single node to this graph.

Adds a single node to this graph.

Attributes

Inherited from:
Growable
def addOne(node: N): Growable.this.type

Adds a single node to this graph.

Adds a single node to this graph.

Attributes

Inherited from:
Growable
final def anyEdgeSelector(from: NodeT, to: NodeT): Option[EdgeT]

An arbitrary edge between from and to that is available most efficiently.

An arbitrary edge between from and to that is available most efficiently.

Attributes

Inherited from:
GraphTraversal
final def apply(edge: E): Boolean

Whether the given edge is contained in this graph.

Whether the given edge is contained in this graph.

Attributes

Inherited from:
GraphOps
final def apply(node: N): Boolean

Whether the given node is contained in this graph.

Whether the given node is contained in this graph.

Attributes

Inherited from:
GraphOps
def clear(): Unit

Attributes

Inherited from:
AbstractBuilder
override def clone: CC[N, E]

Create a copy of the receiver object.

Create a copy of the receiver object.

The default implementation of the clone method is platform dependent.

Attributes

Returns

a copy of the receiver object.

Note

not specified by SLS as a member of AnyRef

Definition Classes
GraphLike -> Cloneable -> Object
Inherited from:
GraphLike
def componentTraverser(parameters: Parameters, subgraphNodes: NodePredicate, subgraphEdges: EdgePredicate, ordering: ElemOrdering, maxWeight: Option[Weight]): ComponentTraverser

Creates a ComponentTraverser responsible for invoking graph traversal methods in all (weakly) connected components of this possibly disconnected graph.

Creates a ComponentTraverser responsible for invoking graph traversal methods in all (weakly) connected components of this possibly disconnected graph.

Value parameters

maxWeight

An optional maximum weight that limits the scope of the traversal or search. If defined and the sum of edge weights between the root of the traversal and a node exceeds the given maximum, that node will no more be visited.

ordering

If a NodeOrdering or EdgeOrdering different from NoOrdering is supplied neighbor nodes will visited during the traversal according to this ordering.

parameters

The properties controlling subsequent traversals.

subgraphEdges

Restricts subsequent graph traversals to walk only along edges that hold this predicate.

subgraphNodes

Restricts subsequent graph traversals to visit only nodes holding this predicate.

Attributes

Inherited from:
GraphTraversal
def concat[N2 >: N, E2 >: E <: Edge[N2]](edges: IterableOnce[E2])(implicit e: E2 <:< Edge[N2]): CC[N2, E2]

Same as concat(isolatedNodes, edges) but with empty isolatedNodes. This method is useful if you don't need to pass any isolated node.

Same as concat(isolatedNodes, edges) but with empty isolatedNodes. This method is useful if you don't need to pass any isolated node.

Attributes

Inherited from:
GraphOps
def concat[N2 >: N, E2 >: E <: Edge[N2]](isolatedNodes: IterableOnce[N2], edges: IterableOnce[E2])(implicit e: E2 <:< Edge[N2]): CC[N2, E2]

Creates a new graph by adding all edges and isolatedNodes omitting duplicates. The new graph is upcasted if any of the arguments is an upcast of N respectively E. Use union to concatenate all nodes and edges of another graph.

Creates a new graph by adding all edges and isolatedNodes omitting duplicates. The new graph is upcasted if any of the arguments is an upcast of N respectively E. Use union to concatenate all nodes and edges of another graph.

Value parameters

edges

to be concatenated.

isolatedNodes

to be concatenated. Nodes that are implicitly defined by any edge in edges will be ignored.

Attributes

Inherited from:
GraphOps
final def contains(edge: E): Boolean

Whether the given outer edge is contained in this graph.

Whether the given outer edge is contained in this graph.

Attributes

Inherited from:
GraphLike
final def contains(node: N): Boolean

Whether the given outer node is contained in this graph.

Whether the given outer node is contained in this graph.

Attributes

Inherited from:
GraphLike
def degreeCount(implicit nodeDegree: DegreeFunction, degreeFilter: Int => Boolean): SortedMap[Int, Int]

The degree set of this graph projected onto a map. The keys of the map are the degrees in decreasing order while the values are the number of inner nodes having the degree of the corresponding key.

The degree set of this graph projected onto a map. The keys of the map are the degrees in decreasing order while the values are the number of inner nodes having the degree of the corresponding key.

Value parameters

selects

nodes to be included by their degree.

the

degree function to apply to the nodes defaulting to Degree. Non-default predefined degree functions are InDegree and OutDegree.

Attributes

Inherited from:
GraphDegree
def degreeNodeSeq(implicit nodeDegree: DegreeFunction, degreeFilter: Int => Boolean): Seq[DegreeNodeSeqEntry]

The degree sequence of this graph projected onto a sequence of tuples. The first elements of the tuples are the degrees in non-increasing order while the second elements are the corresponding inner nodes.

The degree sequence of this graph projected onto a sequence of tuples. The first elements of the tuples are the degrees in non-increasing order while the second elements are the corresponding inner nodes.

Value parameters

selects

nodes to be included by their degree.

the

degree function to apply to the nodes defaulting to Degree. Non-default predefined degree functions are InDegree and OutDegree.

Attributes

Inherited from:
GraphDegree
def degreeNodesMap(implicit nodeDegree: DegreeFunction, degreeFilter: Int => Boolean): SortedMap[Int, Set[NodeT]]

The degree set of this graph projected onto a map. The keys of the map are the degrees in decreasing order while the values are sets of the corresponding inner nodes.

The degree set of this graph projected onto a map. The keys of the map are the degrees in decreasing order while the values are sets of the corresponding inner nodes.

Value parameters

selects

nodes to be included by their degree.

the

degree function to apply to the nodes defaulting to Degree. Non-default predefined degree functions are InDegree and OutDegree.

Attributes

Inherited from:
GraphDegree
def degreeSeq(implicit nodeDegree: DegreeFunction, degreeFilter: Int => Boolean): Seq[Int]

The degree sequence of this graph, that is the non-increasing sequence of degrees over all nodes.

The degree sequence of this graph, that is the non-increasing sequence of degrees over all nodes.

Value parameters

selects

nodes to be included by their degree.

the

degree function to apply to the nodes defaulting to Degree. Non-default predefined degree functions are InDegree and OutDegree.

Attributes

Inherited from:
GraphDegree
def degreeSet(implicit nodeDegree: DegreeFunction, degreeFilter: Int => Boolean): SortedSet[Int]

The degree set of this graph, that is the decreasing set of unique degrees over all nodes. Same as degreeSeq without duplicates.

The degree set of this graph, that is the decreasing set of unique degrees over all nodes. Same as degreeSeq without duplicates.

Value parameters

selects

nodes to be included by their degree.

the

degree function to apply to the nodes defaulting to Degree. Non-default predefined degree functions are InDegree and OutDegree.

Attributes

Inherited from:
GraphDegree
final def diff(that: AnyGraph[N, E]): CC[N, E]

Computes a new graph that is the difference of this graph and that graph.

Computes a new graph that is the difference of this graph and that graph.

Attributes

Inherited from:
GraphOps
final def diffInPlace(that: AnyGraph[N, E]): Shrinkable.this.type

Removes all nodes and edges contained in that graph from this graph.

Removes all nodes and edges contained in that graph from this graph.

Attributes

Inherited from:
Shrinkable

The edge set of this Graph commonly referred to as E(G).

The edge set of this Graph commonly referred to as E(G).

Attributes

Returns

Set of all contained edges.

Inherited from:
GraphLike
final def elementCount: Int

The number of nodes and edges.

The number of nodes and edges.

Attributes

Inherited from:
GraphOps
override def equals(that: Any): Boolean

Graph instances are equal if their nodes and edges turned to outer nodes and outer edges are equal. Any TraversableOnce instance may also be equal to this graph if its set representation contains equalling outer nodes and outer edges. Thus the following expressions hold:

Graph instances are equal if their nodes and edges turned to outer nodes and outer edges are equal. Any TraversableOnce instance may also be equal to this graph if its set representation contains equalling outer nodes and outer edges. Thus the following expressions hold:

Graph(1~2, 3) == List(1~2, 3)
Graph(1~2, 3) == List(1, 2, 2, 3, 2~1)

The first test is false because of the failing nodes 1 and 2. The second is true because of duplicate elimination and undirected edge equivalence.

Attributes

Definition Classes
GraphLike -> Any
Inherited from:
GraphLike
final def filter(nodeP: NodePredicate, edgeP: EdgePredicate): CC[N, E]

Computes a new graph with nodes satisfying nodeP and edges satisfying edgeP. If both nodeP and edgeP have default values the original graph is retained.

Computes a new graph with nodes satisfying nodeP and edges satisfying edgeP. If both nodeP and edgeP have default values the original graph is retained.

Attributes

Inherited from:
GraphLike
def filterInPlace(fNode: NodePredicate, fEdge: EdgePredicate): GraphLike.this.type

Computes a new graph with nodes satisfying fNode and edges satisfying fEdge. If both fNode and fEdge have default values the original graph is retained.

Computes a new graph with nodes satisfying fNode and edges satisfying fEdge. If both fNode and fEdge have default values the original graph is retained.

Attributes

Inherited from:
GraphLike
def filterNot(nodeP: NodePredicate, edgeP: EdgePredicate): CC[N, E]

Computes a new graph without nodes satisfying nodeP and without edges satisfying ePred. If both nodeP and ePred have default values the original graph is retained.

Computes a new graph without nodes satisfying nodeP and without edges satisfying ePred. If both nodeP and ePred have default values the original graph is retained.

Attributes

Inherited from:
GraphOps
final def find(edge: E): Option[EdgeT]

Searches this graph for an inner edge that wraps an outer edge equalling to the given outer edge.

Searches this graph for an inner edge that wraps an outer edge equalling to the given outer edge.

Attributes

Inherited from:
GraphLike
final def find(node: N): Option[NodeT]

Searches this graph for an inner node that wraps an outer node equalling to the given outer node.

Searches this graph for an inner node that wraps an outer node equalling to the given outer node.

Attributes

Inherited from:
GraphLike
final def findCycle[U](implicit visitor: InnerElem => U): Option[Cycle]

Finds a cycle in this graph in any of its components and calls visitor for each inner element visited during the search. See componentTraverser for more control by means of FluentProperties.

Finds a cycle in this graph in any of its components and calls visitor for each inner element visited during the search. See componentTraverser for more control by means of FluentProperties.

Attributes

Inherited from:
GraphTraversal
final def findCycleContaining[U](node: NodeT)(implicit visitor: InnerElem => U): Option[Cycle]

Finds a cycle that contains node and calls visitor for each inner element visited during the search.

Finds a cycle that contains node and calls visitor for each inner element visited during the search.

Attributes

Inherited from:
GraphTraversal
final def flatMap[NN, EC <: (Edge)](fNode: NodeT => Seq[NN], fEdge: (EdgeT, Seq[NN], Seq[NN]) => Seq[EC[NN]])(implicit w: E <:< AnyEdge[N]): CC[NN, EC[NN]]

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

You can call this flavor only if this graph's edge type is generic. Otherwise see flatMapBound.

Type parameters

EC

The higher kind of the generic edge type parameter of this graph.

NN

The node type of the resulting graph which may be unchanged or different from this graph's node type.

Value parameters

fEdge

To apply to all edges of this graph. This function is passed the current inner edge and its ends after being mapped by fNode. Since the inner edge is passed you can also examine its context. Call outer to get the outer edge of type E.

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node.

Attributes

Returns

A new graph of possibly changed node and edge types and of any new structure depending on your edge mapper(s).

Inherited from:
GraphLike
final def flatMap[NN, EC <: (Edge)](fNode: NodeT => Seq[NN])(implicit w1: E <:< GenericMapper, w2: EC[N] =:= E, t: ClassTag[EC[NN]]): CC[NN, EC[NN]]

Creates a new graph with nodes returned by fNode and an edge structure that remains intact where possible.

Creates a new graph with nodes returned by fNode and an edge structure that remains intact where possible.

You can call this flavor only if this graph's edge type is generic. Otherwise see flatMapBound.

If this graph also contains typed edges, the typed edge's partial map function will be called to replace the ends. If the partial function is not defined, there will be an attempt to fall back to a generic edge. If that attempt also fails the edge will be dropped. So, if you have a mixed graph with generic and typed edges, prefer mapping edges directly to avoid leaving edges out.

Type parameters

EC

The higher kind of the generic edge type parameter of this graph.

NN

The node type of the resulting graph which may be unchanged or different from this graph's node type.

Value parameters

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node. If fNode returns several new nodes with none equaling to the original node, the first new node is accepted to be the result of the node transformation. For more flexibility pass your own edge mapper to the overload.

Attributes

Returns

A new graph of possibly changed node and edge types and of any new structure depending on your edge mapper(s).

Inherited from:
GraphLike
final def flatMap[NN, EC <: (Edge)](fNode: NodeT => Seq[NN], fEdge: (Seq[NN], Seq[NN]) => Seq[EC[NN]])(implicit w: E <:< AnyEdge[N]): CC[NN, EC[NN]]

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

See overload except the parameter

Value parameters

fEdge

has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.

Attributes

Inherited from:
GraphOps
final def flatMapBound[NN, EC <: Edge[NN]](fNode: NodeT => Seq[NN], fEdge: (EdgeT, Seq[NN], Seq[NN]) => Seq[EC])(implicit w: E <:< AnyEdge[N]): CC[NN, EC]

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

You can call this flavor only if this graph's edge type is typed. Otherwise see flatMap.

Type parameters

EC

The edge type parameter of this graph.

NN

The node type of the resulting graph which may be unchanged or different from this graph's node type.

Value parameters

fEdge

To apply to all edges of this graph. This function is passed the current inner edge and its ends after being mapped by fNode. Since the inner edge is passed you can also examine its context. Call outer to get the outer edge of type E.

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node.

Attributes

Returns

A new graph of possibly changed node and edge types and of any new structure depending on your edge mapper(s).

Inherited from:
GraphLike
final def flatMapBound(fNode: NodeT => Seq[N])(implicit w1: E <:< PartialMapper): CC[N, E]

Creates a new graph with nodes returned by fNode and an edge structure that remains intact where possible.

Creates a new graph with nodes returned by fNode and an edge structure that remains intact where possible.

You can call this flavor only if this graph's edge type is typed. Otherwise see flatMap.

Value parameters

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node. If fNode returns several new nodes with none equaling to the original node, the first new node is accepted to be the result of the node transformation. For more flexibility pass your own edge mapper to the overload.

Attributes

Inherited from:
GraphLike
final def flatMapBound[NN, EC <: Edge[NN]](fNode: NodeT => Seq[NN], fEdge: (Seq[NN], Seq[NN]) => Seq[EC])(implicit w: E <:< AnyEdge[N]): CC[NN, EC]

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

You can call this flavor only if this graph's edge type is typed. Otherwise see flatMap.

See overload except the parameter

Value parameters

fEdge

has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.

Attributes

Inherited from:
GraphOps
final def flatMapDiHyper[NN, EC <: (Edge)](fNode: NodeT => Seq[NN], fDiHyperEdge: (EdgeT, Seq[NN], Seq[NN]) => Seq[EC[NN]], fEdge: Option[(EdgeT, Seq[NN], Seq[NN]) => Seq[EC[NN]]])(implicit w: E <:< AnyDiHyperEdge[N]): CC[NN, EC[NN]]

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

You can call this flavor only if this graph's edge type is generic. Otherwise see flatMapDiHyperBound.

Type parameters

EC

The higher kind of the generic edge type parameter of this graph.

NN

The node type of the resulting graph which may be unchanged or different from this graph's node type.

Value parameters

fDiHyperEdge

To apply to all directed hyperedges in this graph. This function is passed the existing inner directed hyperedge and its sources and targets after being mapped by fNode. Since the inner directed hyperedge is passed you can also examine the edge context. Call outer to get the outer directed hyperedge of type E.

fEdge

To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying Some unless you know that the graph does not contain any simple edge.

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node.

Attributes

Returns

A new graph of possibly changed node and edge types and of any new structure depending on your edge mapper(s).

Inherited from:
GraphLike
final def flatMapDiHyper[NN, EC <: (Edge)](fNode: NodeT => Seq[NN], fDiHyperEdge: (Seq[NN], Seq[NN]) => Seq[EC[NN]], fEdge: Option[(Seq[NN], Seq[NN]) => Seq[EC[NN]]])(implicit w: E <:< AnyDiHyperEdge[N]): CC[NN, EC[NN]]

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

You can call this flavor only if this graph's edge type is generic. Otherwise see flatMapDiHyperBound.

See overload except the parameter

Value parameters

fDiHyperEdge

has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.

Attributes

Inherited from:
GraphOps
final def flatMapDiHyperBound[NN, EC <: Edge[NN]](fNode: NodeT => Seq[NN], fDiHyperEdge: (EdgeT, Seq[NN], Seq[NN]) => Seq[EC], fEdge: Option[(EdgeT, Seq[NN], Seq[NN]) => Seq[EC]])(implicit w: E <:< AnyDiHyperEdge[N]): CC[NN, EC]

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

You can call this flavor only if this graph's edge type is typed. Otherwise see flatMapDiHyper.

Type parameters

EC

The edge type parameter of this graph.

NN

The node type of the resulting graph which may be unchanged or different from this graph's node type.

Value parameters

fDiHyperEdge

To apply to all directed hyperedges in this graph. This function is passed the existing inner directed hyperedge and its sources and targets after being mapped by fNode. Since the inner directed hyperedge is passed you can also examine the edge context. Call outer to get the outer directed hyperedge of type E.

fEdge

To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying Some unless you know that the graph does not contain any simple edge.

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node.

Attributes

Returns

A new graph of possibly changed node and edge types and of any new structure depending on your edge mapper(s).

Inherited from:
GraphLike
final def flatMapDiHyperBound[NN, EC <: Edge[NN]](fNode: NodeT => Seq[NN], fDiHyperEdge: (Seq[NN], Seq[NN]) => Seq[EC], fEdge: Option[(Seq[NN], Seq[NN]) => Seq[EC]])(implicit w: E <:< AnyDiHyperEdge[N]): CC[NN, EC]

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

You can call this flavor only if this graph's edge type is typed. Otherwise see flatMapDiHyper.

See overload except the parameter

Value parameters

fDiHyperEdge

has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.

Attributes

Inherited from:
GraphOps
final def flatMapHyper[NN, EC <: (Edge)](fNode: NodeT => Seq[NN], fHyperEdge: (EdgeT, Seq[NN]) => Seq[EC[NN]], fDiHyperEdge: Option[(EdgeT, Seq[NN], Seq[NN]) => Seq[EC[NN]]], fEdge: Option[(EdgeT, Seq[NN], Seq[NN]) => Seq[EC[NN]]])(implicit w: E <:< AnyHyperEdge[N]): CC[NN, EC[NN]]

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

You can call this flavor only if this graph's edge type is generic. Otherwise see flatMapHyperBound.

Type parameters

EC

The higher kind of the generic edge type parameter of this graph.

NN

The node type of the resulting graph which may be unchanged or different from this graph's node type.

Value parameters

fDiHyperEdge

To apply to any directed hyperedge in this possibly mixed graph. If not present directed hyperedges will be mapped by the mandatory fDiHyperEdge. You are recommended supplying Some unless you know that the graph does not contain any directed hyperedge.

fEdge

To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying Some unless you know that the graph does not contain any simple edge.

fHyperEdge

To apply to all hyperedges in this graph. This function is passed the current inner hyperedge and its ends after being mapped by fNode. Since the inner hyperedge is passed you can also examine its context. Call outer to get the outer hyperedge of type E.

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node.

Attributes

Returns

A new graph of possibly changed node and edge types and of any new structure depending on your edge mapper(s).

Inherited from:
GraphLike
final def flatMapHyper[NN, EC <: (Edge)](fNode: NodeT => Seq[NN], fHyperEdge: Seq[NN] => Seq[EC[NN]], fDiHyperEdge: Option[(Seq[NN], Seq[NN]) => Seq[EC[NN]]], fEdge: Option[(Seq[NN], Seq[NN]) => Seq[EC[NN]]])(implicit w: E <:< AnyHyperEdge[N]): CC[NN, EC[NN]]

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

You can call this flavor only if this graph's edge type is generic. Otherwise see flatMapHyperBound.

See overload except the parameter

Value parameters

fHyperEdge

has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.

Attributes

Inherited from:
GraphOps
final def flatMapHyperBound[NN, EC <: Edge[NN]](fNode: NodeT => Seq[NN], fHyperEdge: (EdgeT, Seq[NN]) => Seq[EC], fDiHyperEdge: Option[(EdgeT, Seq[NN], Seq[NN]) => Seq[EC]], fEdge: Option[(EdgeT, Seq[NN], Seq[NN]) => Seq[EC]])(implicit w: E <:< AnyHyperEdge[N]): CC[NN, EC]

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

You can call this flavor only if this graph's edge type is typed. Otherwise see flatMapHyper.

Type parameters

EC

The edge type parameter of this graph.

NN

The node type of the resulting graph which may be unchanged or different from this graph's node type.

Value parameters

fDiHyperEdge

To apply to any directed hyperedge in this possibly mixed graph. If not present directed hyperedges will be mapped by the mandatory fDiHyperEdge. You are recommended supplying Some unless you know that the graph does not contain any directed hyperedge.

fEdge

To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying Some unless you know that the graph does not contain any simple edge.

fHyperEdge

To apply to all hyperedges in this graph. This function is passed the current inner hyperedge and its ends after being mapped by fNode. Since the inner hyperedge is passed you can also examine its context. Call outer to get the outer hyperedge of type E.

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node.

Attributes

Returns

A new graph of possibly changed node and edge types and of any new structure depending on your edge mapper(s).

Inherited from:
GraphLike
final def flatMapHyperBound[NN, EC <: Edge[NN]](fNode: NodeT => Seq[NN], fHyperEdge: Seq[NN] => Seq[EC], fDiHyperEdge: Option[(Seq[NN], Seq[NN]) => Seq[EC]], fEdge: Option[(Seq[NN], Seq[NN]) => Seq[EC]])(implicit w: E <:< AnyHyperEdge[N]): CC[NN, EC]

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

Creates a new graph with nodes and edges returned by fNode respectively fEdge.

You can call this flavor only if this graph's edge type is typed. Otherwise see flatMapHyper.

See overload except the parameter

Value parameters

fHyperEdge

has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.

Attributes

Inherited from:
GraphOps
def foldLeft[B](z: B)(opNode: (B, NodeT) => B, opEdge: (B, EdgeT) => B): B

Applies a node-specific and an edge-specific binary operator to a cumulated value. First opNode is called for all nodes than opEdge for all edges.

Applies a node-specific and an edge-specific binary operator to a cumulated value. First opNode is called for all nodes than opEdge for all edges.

Type parameters

B

the result type of the binary operator.

Value parameters

opEdge

the binary operator that is passed the cumulated value and an inner edge.

opNode

the binary operator that is passed the cumulated value and an inner node.

z

the start value that is passed to opNode the first time.

Attributes

Returns

the cumulated value.

Inherited from:
GraphLike
final def foldLeftOuter[B](z: B)(opNode: (B, N) => B, opEdge: (B, E) => B): B

Same as foldLeft except the second parameter of the binary operators.

Same as foldLeft except the second parameter of the binary operators.

Value parameters

opEdge

the binary operator that is passed the cumulated value and an outer edge.

opNode

the binary operator that is passed the cumulated value and an outer node.

Attributes

Inherited from:
GraphOps
final def get(edge: E): EdgeT

Short for find(edge).get.

Short for find(edge).get.

Attributes

Throws
NoSuchElementException

if the edge is not found.

Inherited from:
GraphLike
final def get(node: N): NodeT

Short for find(node).get.

Short for find(node).get.

Attributes

Throws
NoSuchElementException

if the node is not found.

Inherited from:
GraphLike
def innerEdgeTraverser(root: NodeT, parameters: Parameters, subgraphNodes: NodePredicate, subgraphEdges: EdgePredicate, ordering: ElemOrdering, maxWeight: Option[Weight]): InnerEdgeTraverser

Creates a InnerEdgeTraverser based on scala.collection.Iterable[EdgeT].

Creates a InnerEdgeTraverser based on scala.collection.Iterable[EdgeT].

Value parameters

ordering

If a NodeOrdering or EdgeOrdering different from NoOrdering is supplied neighbor nodes will visited during the traversal according to this ordering.

parameters

The properties controlling subsequent traversals.

root

The node where subsequent graph traversals start.

subgraphEdges

Restricts subsequent graph traversals to walk only along edges that hold this predicate.

subgraphNodes

Restricts subsequent graph traversals to visit only nodes holding this predicate.

Attributes

Inherited from:
GraphTraversal
def innerElemTraverser(root: NodeT, parameters: Parameters, subgraphNodes: NodePredicate, subgraphEdges: EdgePredicate, ordering: ElemOrdering, maxWeight: Option[Weight]): InnerElemTraverser

Creates a InnerElemTraverser based on scala.collection.Iterable[InnerElem].

Creates a InnerElemTraverser based on scala.collection.Iterable[InnerElem].

Value parameters

maxWeight

An optional maximum weight that limits the scope of the traversal or search. If defined and the sum of edge weights between the root of the traversal and a node exceeds the given maximum, that node will no more be visited.

ordering

If a NodeOrdering or EdgeOrdering different from NoOrdering is supplied neighbor nodes will visited during the traversal according to this ordering.

parameters

The properties controlling subsequent traversals.

root

The node where subsequent graph traversals start.

subgraphEdges

Restricts subsequent graph traversals to walk only along edges that hold this predicate.

subgraphNodes

Restricts subsequent graph traversals to visit only nodes holding this predicate.

Attributes

Inherited from:
GraphTraversal
def innerNodeDownUpTraverser(root: NodeT, parameters: Parameters, subgraphNodes: NodePredicate, subgraphEdges: EdgePredicate, ordering: ElemOrdering, maxWeight: Option[Weight]): InnerNodeDownUpTraverser

Creates a InnerNodeDownUpTraverser based on scala.collection.Iterable[(Boolean, NodeT)] where the Boolean parameter is true if the traversal takes place in downward and false if it takes place in upward direction.

Creates a InnerNodeDownUpTraverser based on scala.collection.Iterable[(Boolean, NodeT)] where the Boolean parameter is true if the traversal takes place in downward and false if it takes place in upward direction.

Value parameters

maxWeight

An optional maximum weight that limits the scope of the traversal or search. If defined and the sum of edge weights between the root of the traversal and a node exceeds the given maximum, that node will no more be visited.

ordering

If a NodeOrdering or EdgeOrdering different from NoOrdering is supplied neighbor nodes will visited during the traversal according to this ordering.

parameters

The properties controlling subsequent traversals. A kind different from DepthFirst will be ignored.

root

The node where subsequent graph traversals start.

subgraphEdges

Restricts subsequent graph traversals to walk only along edges that hold this predicate.

subgraphNodes

Restricts subsequent graph traversals to visit only nodes holding this predicate.

Attributes

Inherited from:
GraphTraversal
def innerNodeTraverser(root: NodeT, parameters: Parameters, subgraphNodes: NodePredicate, subgraphEdges: EdgePredicate, ordering: ElemOrdering, maxWeight: Option[Weight]): InnerNodeTraverser

Creates a InnerNodeTraverser based on scala.collection.Iterable[NodeT].

Creates a InnerNodeTraverser based on scala.collection.Iterable[NodeT].

Value parameters

maxWeight

An optional maximum weight that limits the scope of the traversal or search. If defined and the sum of edge weights between the root of the traversal and a node exceeds the given maximum, that node will no more be visited.

ordering

If a NodeOrdering or EdgeOrdering different from NoOrdering is supplied neighbor nodes will visited during the traversal according to this ordering.

parameters

The properties controlling subsequent traversals.

root

The node where subsequent graph traversals start.

subgraphEdges

Restricts subsequent graph traversals to walk only along edges that hold this predicate.

subgraphNodes

Restricts subsequent graph traversals to visit only nodes holding this predicate.

Attributes

Inherited from:
GraphTraversal
final def intersect(that: AnyGraph[N, E]): CC[N, E]

Computes the intersection between this graph and that graph.

Computes the intersection between this graph and that graph.

Attributes

Inherited from:
GraphOps
final def intersectInPlace(that: AnyGraph[N, E]): GraphOps.this.type

Shrinks this graph to its intersection with that graph.

Shrinks this graph to its intersection with that graph.

Attributes

Inherited from:
GraphOps
final def isAcyclic: Boolean

Whether this graph has no cycle.

Whether this graph has no cycle.

Attributes

Inherited from:
GraphTraversal

Whether all nodes are pairwise adjacent.

Whether all nodes are pairwise adjacent.

Attributes

Returns

true if this graph is complete, false if this graph contains any independent nodes.

Inherited from:
GraphTraversal

Whether this graph is connected if it is undirected or weakly connected if it is directed.

Whether this graph is connected if it is undirected or weakly connected if it is directed.

Attributes

Inherited from:
GraphTraversal

true if f is not equivalent to anyEdge.

true if f is not equivalent to anyEdge.

Attributes

Inherited from:
GraphBase

true if f is not equivalent to anyNode.

true if f is not equivalent to anyNode.

Attributes

Inherited from:
GraphBase
final def isCyclic: Boolean

Whether this graph has at least one cycle in any of its components.

Whether this graph has at least one cycle in any of its components.

Attributes

Inherited from:
GraphTraversal

Whether all edges of this graph are directed.

Whether all edges of this graph are directed.

Attributes

Inherited from:
GraphLike
final def isEmpty: Boolean

Whether this graph contains any node or any edge.

Whether this graph contains any node or any edge.

Attributes

Inherited from:
GraphOps

Whether this graph contains at least one hyperedge.

Whether this graph contains at least one hyperedge.

Attributes

Inherited from:
GraphLike

Whether this graph contains at least one directed and one undirected edge.

Whether this graph contains at least one directed and one undirected edge.

Attributes

Inherited from:
GraphLike

Whether this graph contains at least one multi-edge. We defnie multi-edges by a. two or more directed edges having the same source and target a. two or more undirected edges connecting the same nodes a. two or more (directed) hyperedges that, after being decomposed into (directed) edges, yield any multy-edge as stipulated above.

Whether this graph contains at least one multi-edge. We defnie multi-edges by a. two or more directed edges having the same source and target a. two or more undirected edges connecting the same nodes a. two or more (directed) hyperedges that, after being decomposed into (directed) edges, yield any multy-edge as stipulated above.

Attributes

Inherited from:
GraphLike
final def isTrivial: Boolean

true if this graph has at most 1 node.

true if this graph has at most 1 node.

Attributes

Inherited from:
GraphOps

Iterator over all inner nodes and edges.

Iterator over all inner nodes and edges.

Attributes

Inherited from:
GraphLike
final def map[NN, EC <: (Edge)](fNode: NodeT => NN, fEdge: (EdgeT, NN, NN) => EC[NN])(implicit w: E <:< AnyEdge[N]): CC[NN, EC[NN]]

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

You can call this flavor only if this graph's edge type is generic. Otherwise see mapBound.

Type parameters

EC

The higher kind of the generic edge type parameter of this graph.

NN

The node type of the resulting graph which may be unchanged or different from this graph's node type.

Value parameters

fEdge

To apply to all edges of this graph. This function is passed the current inner edge and its ends after being mapped by fNode. Since the inner edge is passed you can also examine its context. Call outer to get the outer edge of type E.

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node.

Attributes

Returns

The mapped graph with possibly changed node and edge type parameters.

Inherited from:
GraphLike
final def map[NN, EC <: (Edge)](fNode: NodeT => NN)(implicit w1: E <:< GenericMapper, w2: EC[N] =:= E, t: ClassTag[EC[NN]]): CC[NN, EC[NN]]

Creates a new graph with nodes mapped by fNode and with an untouched edge structure otherwise.

Creates a new graph with nodes mapped by fNode and with an untouched edge structure otherwise.

You can call this flavor only if this graph's edge type is generic. Otherwise see mapBound.

If this graph also contains typed edges, the typed edge's partial map function will be called to replace the ends. If the partial function is not defined, there will be an attempt to fall back to a generic edge. If that attempt also fails the edge will be dropped. So, if you have a mixed graph with generic and typed edges, prefer mapping edges directly to avoid leaving edges out.

Type parameters

EC

The higher kind of the generic edge type parameter of this graph.

NN

The node type of the resulting graph which may be unchanged or different from this graph's node type.

Value parameters

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node.

Attributes

Returns

The mapped graph with possibly changed node and edge type parameters.

Inherited from:
GraphLike
final def map[NN, EC <: (Edge)](fNode: NodeT => NN, fEdge: (NN, NN) => EC[NN])(implicit w: E <:< AnyEdge[N]): CC[NN, EC[NN]]

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

See overload except the parameter

Value parameters

fEdge

has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.

Attributes

Inherited from:
GraphOps
final def mapBound[NN, EC <: Edge[NN]](fNode: NodeT => NN, fEdge: (EdgeT, NN, NN) => EC)(implicit w: E <:< AnyEdge[N]): CC[NN, EC]

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

You can call this flavor only if this graph's edge type is typed. Otherwise see map.

Type parameters

EC

The edge type parameter of this graph.

NN

The node type of the resulting graph which may be unchanged or different from this graph's node type.

Value parameters

fEdge

To apply to all edges of this graph. This function is passed the current inner edge and its ends after being mapped by fNode. Since the inner edge is passed you can also examine its context. Call outer to get the outer edge of type E.

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node.

Attributes

Returns

The mapped graph with possibly changed node and edge type parameters.

Inherited from:
GraphLike
final def mapBound(fNode: NodeT => N)(implicit w1: E <:< PartialMapper): CC[N, E]

Creates a new graph with nodes mapped by fNode and with an untouched edge structure otherwise.

Creates a new graph with nodes mapped by fNode and with an untouched edge structure otherwise.

You can call this flavor only if this graph's edge type is typed. Otherwise see map.

Value parameters

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node.

Attributes

Returns

The mapped graph with possibly changed node and edge type parameters.

Inherited from:
GraphLike
final def mapBound[NN, EC <: Edge[NN]](fNode: NodeT => NN, fEdge: (NN, NN) => EC)(implicit w: E <:< AnyEdge[N]): CC[NN, EC]

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

See overload except the parameter

Value parameters

fEdge

has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.

Attributes

Inherited from:
GraphOps
def mapDiHyper[NN, EC <: (Edge)](fNode: NodeT => NN, fDiHyperEdge: (EdgeT, OneOrMore[NN], OneOrMore[NN]) => EC[NN], fEdge: Option[(EdgeT, NN, NN) => EC[NN]])(implicit w: E <:< AnyDiHyperEdge[N]): CC[NN, EC[NN]]

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

You can call this flavor only if this graph's edge type is generic. Otherwise see mapDiHyperBound.

Type parameters

EC

The higher kind of the generic edge type parameter of this graph.

NN

The node type of the resulting graph which may be unchanged or different from this graph's node type.

Value parameters

fDiHyperEdge

To apply to all directed hyperedges in this graph. This function is passed the existing inner directed hyperedge and its sources and targets after being mapped by fNode. Since the inner directed hyperedge is passed you can also examine the edge context. Call outer to get the outer directed hyperedge of type E.

fEdge

To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying Some unless you know that the graph does not contain any simple edge.

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node.

Attributes

Returns

The mapped graph with possibly changed node and edge type parameters.

Inherited from:
GraphLike
final def mapDiHyper[NN, EC <: (Edge)](fNode: NodeT => NN, fDiHyperEdge: (OneOrMore[NN], OneOrMore[NN]) => EC[NN], fEdge: Option[(NN, NN) => EC[NN]])(implicit w: E <:< AnyDiHyperEdge[N]): CC[NN, EC[NN]]

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

You can call this flavor only if this graph's edge type is generic. Otherwise see mapDiHyperBound.

See overload except the parameter

Value parameters

fDiHyperEdge

has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.

Attributes

Inherited from:
GraphOps
def mapDiHyperBound[NN, EC <: Edge[NN]](fNode: NodeT => NN, fDiHyperEdge: (EdgeT, OneOrMore[NN], OneOrMore[NN]) => EC, fEdge: Option[(EdgeT, NN, NN) => EC])(implicit w: E <:< AnyDiHyperEdge[N]): CC[NN, EC]

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

You can call this flavor only if this graph's edge type is typed. Otherwise see mapDiHyper.

Type parameters

EC

The edge type parameter of this graph.

NN

The node type of the resulting graph which may be unchanged or different from this graph's node type.

Value parameters

fDiHyperEdge

To apply to all directed hyperedges in this graph. This function is passed the existing inner directed hyperedge and its sources and targets after being mapped by fNode. Since the inner directed hyperedge is passed you can also examine the edge context. Call outer to get the outer directed hyperedge of type E.

fEdge

To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying Some unless you know that the graph does not contain any simple edge.

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node.

Attributes

Returns

The mapped graph with possibly changed node and edge type parameters.

Inherited from:
GraphLike
final def mapDiHyperBound[NN, EC <: Edge[NN]](fNode: NodeT => NN, fDiHyperEdge: (OneOrMore[NN], OneOrMore[NN]) => EC, fEdge: Option[(NN, NN) => EC])(implicit w: E <:< AnyDiHyperEdge[N]): CC[NN, EC]

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

You can call this flavor only if this graph's edge type is typed. Otherwise see mapDiHyper.

See overload except the parameter

Value parameters

fDiHyperEdge

has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.

Attributes

Inherited from:
GraphOps
final def mapHyper[NN, EC <: (Edge)](fNode: NodeT => NN, fHyperEdge: (EdgeT, Several[NN]) => EC[NN], fDiHyperEdge: Option[(EdgeT, OneOrMore[NN], OneOrMore[NN]) => EC[NN]], fEdge: Option[(EdgeT, NN, NN) => EC[NN]])(implicit w: E <:< AnyHyperEdge[N]): CC[NN, EC[NN]]

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

You can call this flavor only if this graph's edge type is generic. Otherwise see mapHyperBound.

Type parameters

EC

The higher kind of the generic edge type parameter of this graph.

NN

The node type of the resulting graph which may be unchanged or different from this graph's node type.

Value parameters

fDiHyperEdge

To apply to any directed hyperedge in this possibly mixed graph. If not present directed hyperedges will be mapped by the mandatory fDiHyperEdge. You are recommended supplying Some unless you know that the graph does not contain any directed hyperedge.

fEdge

To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying Some unless you know that the graph does not contain any simple edge.

fHyperEdge

To apply to all hyperedges in this graph. This function is passed the current inner hyperedge and its ends after being mapped by fNode. Since the inner hyperedge is passed you can also examine its context. Call outer to get the outer hyperedge of type E.

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node.

Attributes

Returns

The mapped graph with possibly changed node and edge type parameters.

Inherited from:
GraphLike
final def mapHyper[NN, EC <: (Edge)](fNode: NodeT => NN, fHyperEdge: Several[NN] => EC[NN], fDiHyperEdge: Option[(OneOrMore[NN], OneOrMore[NN]) => EC[NN]], fEdge: Option[(NN, NN) => EC[NN]])(implicit w: E <:< AnyHyperEdge[N]): CC[NN, EC[NN]]

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

You can call this flavor only if this graph's edge type is generic. Otherwise see mapHyperBound.

See overload except the parameter

Value parameters

fHyperEdge

has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.

Attributes

Inherited from:
GraphOps
final def mapHyperBound[NN, EC <: Edge[NN]](fNode: NodeT => NN, fHyperEdge: (EdgeT, Several[NN]) => EC, fDiHyperEdge: Option[(EdgeT, OneOrMore[NN], OneOrMore[NN]) => EC], fEdge: Option[(EdgeT, NN, NN) => EC])(implicit w: E <:< AnyHyperEdge[N]): CC[NN, EC]

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

You can call this flavor only if this graph's edge type is typed. Otherwise see mapHyper.

Type parameters

EC

The edge type parameter of this graph.

NN

The node type of the resulting graph which may be unchanged or different from this graph's node type.

Value parameters

fDiHyperEdge

To apply to any directed hyperedge in this possibly mixed graph. If not present directed hyperedges will be mapped by the mandatory fDiHyperEdge. You are recommended supplying Some unless you know that the graph does not contain any directed hyperedge.

fEdge

To apply to any directed or undirected edge in this possibly mixed graph. If not present simple edges will be mapped by the mandatory edge mapper you supply. You are recommended supplying Some unless you know that the graph does not contain any simple edge.

fHyperEdge

To apply to all hyperedges in this graph. This function is passed the current inner hyperedge and its ends after being mapped by fNode. Since the inner hyperedge is passed you can also examine its context. Call outer to get the outer hyperedge of type E.

fNode

To apply to all nodes of this graph. Since the inner node is passed you can also examine the node context. Call outer to get the value of type N of the node.

Attributes

Returns

The mapped graph with possibly changed node and edge type parameters.

Inherited from:
GraphLike
final def mapHyperBound[NN, EC <: Edge[NN]](fNode: NodeT => NN, fHyperEdge: Several[NN] => EC, fDiHyperEdge: Option[(OneOrMore[NN], OneOrMore[NN]) => EC], fEdge: Option[(NN, NN) => EC])(implicit w: E <:< AnyHyperEdge[N]): CC[NN, EC]

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

Creates a new graph with nodes and edges that are computed by the supplied mapping functions.

You can call this flavor only if this graph's edge type is typed. Otherwise see mapHyper.

See overload except the parameter

Value parameters

fHyperEdge

has a simplified signature in this overload leaving out the inner edge. This comes in handy whenever you don't need to inspect inner edges.

Attributes

Inherited from:
GraphOps
def maxDegree(implicit nodeDegree: DegreeFunction, degreeFilter: Int => Boolean): Int

The degree of the node having the highest degree or 0 if this graph is empty.

The degree of the node having the highest degree or 0 if this graph is empty.

Value parameters

selects

nodes to be included by their degree.

the

degree function to apply to the nodes defaulting to Degree. Non-default predefined degree functions are InDegree and OutDegree.

Attributes

Inherited from:
GraphDegree
def minDegree(implicit nodeDegree: DegreeFunction, degreeFilter: Int => Boolean): Int

The degree of the node having the least degree or 0 if this graph is empty.

The degree of the node having the least degree or 0 if this graph is empty.

Value parameters

selects

nodes to be included by their degree.

the

degree function to apply to the nodes defaulting to Degree. Non-default predefined degree functions are InDegree and OutDegree.

Attributes

Inherited from:
GraphDegree
protected def newDiHyperEdge(outer: E, sources: OneOrMore[NodeT], targets: OneOrMore[NodeT]): EdgeT

Attributes

Inherited from:
GraphLike
protected def newEdge(outer: E, node_1: NodeT, node_2: NodeT): EdgeT

Attributes

Inherited from:
GraphLike
final override protected def newHyperEdge(outer: E, nodes: Several[NodeT]): EdgeT

Attributes

Definition Classes
Inherited from:
GraphLike
def newPathBuilder(start: NodeT)(implicit sizeHint: Int, edgeSelector: (NodeT, NodeT) => Option[EdgeT]): PathBuilder

Instantiates a PathBuilder for this graph.

Instantiates a PathBuilder for this graph.

Value parameters

edgeSelector

Determines the edge to be selected between neighbor nodes if an edge is not supplied explicitly. This is only relevant in case of multigraphs.

sizeHint

Expected maximum number of nodes on this path.

start

The node this path starts at.

Attributes

Inherited from:
GraphTraversal
def newWalkBuilder(start: NodeT)(implicit sizeHint: Int, edgeSelector: (NodeT, NodeT) => Option[EdgeT]): WalkBuilder

Instantiates a WalkBuilder for this graph.

Instantiates a WalkBuilder for this graph.

Value parameters

edgeSelector

Determines the edge to be selected between neighbor nodes if an edge is not supplied explicitly. This is only relevant in case of multigraphs.

sizeHint

Expected maximum number of nodes on this walk.

start

The node this walk starts at.

Attributes

Inherited from:
GraphTraversal

The node (vertex) set of this Graph commonly referred to as V(G).

The node (vertex) set of this Graph commonly referred to as V(G).

Attributes

Returns

Set of all contained nodes.

Inherited from:
GraphBase
final def nonTrivial: Boolean

true if this graph has at least 2 nodes.

true if this graph has at least 2 nodes.

Attributes

Inherited from:
GraphOps
final def order: Int

The order - commonly referred to as |G| - of this graph equaling to the number of nodes.

The order - commonly referred to as |G| - of this graph equaling to the number of nodes.

Attributes

Inherited from:
GraphBase
def outerEdgeTraverser(root: NodeT, parameters: Parameters, subgraphNodes: NodePredicate, subgraphEdges: EdgePredicate, ordering: ElemOrdering, maxWeight: Option[Weight]): OuterEdgeTraverser

Creates a OuterEdgeTraverser based on scala.collection.Iterable[E[N]].

Creates a OuterEdgeTraverser based on scala.collection.Iterable[E[N]].

Value parameters

maxWeight

An optional maximum weight that limits the scope of the traversal or search. If defined and the sum of edge weights between the root of the traversal and a node exceeds the given maximum, that node will no more be visited.

ordering

If a NodeOrdering or EdgeOrdering different from NoOrdering is supplied neighbor nodes will visited during the traversal according to this ordering.

parameters

The properties controlling subsequent traversals.

root

The node where subsequent graph traversals start.

subgraphEdges

Restricts subsequent graph traversals to walk only along edges that hold this predicate.

subgraphNodes

Restricts subsequent graph traversals to visit only nodes holding this predicate.

Attributes

Inherited from:
GraphTraversal
def outerElemTraverser(root: NodeT, parameters: Parameters, subgraphNodes: NodePredicate, subgraphEdges: EdgePredicate, ordering: ElemOrdering, maxWeight: Option[Weight]): OuterElemTraverser

Creates a OuterElemTraverser based on scala.collection.Iterable[OuterElem].

Creates a OuterElemTraverser based on scala.collection.Iterable[OuterElem].

Value parameters

maxWeight

An optional maximum weight that limits the scope of the traversal or search. If defined and the sum of edge weights between the root of the traversal and a node exceeds the given maximum, that node will no more be visited.

ordering

If a NodeOrdering or EdgeOrdering different from NoOrdering is supplied neighbor nodes will visited during the traversal according to this ordering.

parameters

The properties controlling subsequent traversals.

root

The node where subsequent graph traversals start.

subgraphEdges

Restricts subsequent graph traversals to walk only along edges that hold this predicate.

subgraphNodes

Restricts subsequent graph traversals to visit only nodes holding this predicate.

Attributes

Inherited from:
GraphTraversal

Iterator over all inner nodes and edges.

Iterator over all inner nodes and edges.

Attributes

Inherited from:
GraphLike
def outerNodeDownUpTraverser(root: NodeT, parameters: Parameters, subgraphNodes: NodePredicate, subgraphEdges: EdgePredicate, ordering: ElemOrdering, maxWeight: Option[Weight]): OuterNodeDownUpTraverser

Creates a OuterNodeDownUpTraverser based on scala.collection.Iterable[(Boolean, N)] where the Boolean parameter is true if the traversal takes place in downward and false if it takes place in upward direction.

Creates a OuterNodeDownUpTraverser based on scala.collection.Iterable[(Boolean, N)] where the Boolean parameter is true if the traversal takes place in downward and false if it takes place in upward direction.

Value parameters

ordering

If a NodeOrdering or EdgeOrdering different from NoOrdering is supplied neighbor nodes will visited during the traversal according to this ordering.

parameters

The properties controlling subsequent traversals. A kind different from DepthFirst will be ignored.

root

The node where subsequent graph traversals start.

subgraphEdges

Restricts subsequent graph traversals to walk only along edges that hold this predicate.

subgraphNodes

Restricts subsequent graph traversals to visit only nodes holding this predicate.

Attributes

Inherited from:
GraphTraversal
def outerNodeTraverser(root: NodeT, parameters: Parameters, subgraphNodes: NodePredicate, subgraphEdges: EdgePredicate, ordering: ElemOrdering, maxWeight: Option[Weight]): OuterNodeTraverser

Creates a OuterNodeTraverser based on scala.collection.Iterable[N].

Creates a OuterNodeTraverser based on scala.collection.Iterable[N].

Value parameters

maxWeight

An optional maximum weight that limits the scope of the traversal or search. If defined and the sum of edge weights between the root of the traversal and a node exceeds the given maximum, that node will no more be visited.

ordering

If a NodeOrdering or EdgeOrdering different from NoOrdering is supplied neighbor nodes will visited during the traversal according to this ordering.

parameters

The properties controlling subsequent traversals.

root

The node where subsequent graph traversals start.

subgraphEdges

Restricts subsequent graph traversals to walk only along edges that hold this predicate.

subgraphNodes

Restricts subsequent graph traversals to visit only nodes holding this predicate.

Attributes

Inherited from:
GraphTraversal
final def remove(edge: E): Boolean

Removes a single edge from this graph.

Removes a single edge from this graph.

Attributes

Returns

whether the edge existed before

Inherited from:
GraphLike
final def remove(node: N): Boolean

Removes a single node from this graph.

Removes a single node from this graph.

Attributes

Returns

whether the node existed before.

Inherited from:
GraphLike
final def removeAll(edges: IterableOnce[E]): Shrinkable.this.type

Removes all edges from this graph.

Removes all edges from this graph.

Attributes

Inherited from:
Shrinkable
final def removeAll(nodes: IterableOnce[N], edges: IterableOnce[E]): Shrinkable.this.type

Removes all nodes and edges from this graph.

Removes all nodes and edges from this graph.

Attributes

Inherited from:
Shrinkable
protected def removedAll(isolatedNodes: IterableOnce[N], edges: IterableOnce[E]): CC[N, E]

Attributes

Inherited from:
GraphOps
def render(style: Style, nodeSeparator: String, edgeSeparator: String, nodeEdgeSetSeparator: String, withInnerPrefix: Boolean)(implicit ordNode: NodeOrdering, ordEdge: EdgeOrdering): String

Sorts all nodes of this graph by ordNode followed by all edges sorted by ordEdge and concatenates their string representation nodeSeparator and edgeSeparator respectively.

Sorts all nodes of this graph by ordNode followed by all edges sorted by ordEdge and concatenates their string representation nodeSeparator and edgeSeparator respectively.

Value parameters

nodeEdgeSetSeparator

to separate the node set from the edge set.

ordEdge

the edge ordering defaulting to defaultEdgeOrdering.

ordNode

the node ordering defaulting to defaultNodeOrdering.

withInnerPrefix

whether the node set and edge set should be prefixed.

Attributes

Inherited from:
ToString (hidden)

Attributes

Inherited from:
Cloneable
final def size: Int

The size - commonly referred to as |E| - of this graph equaling to the number of edges.

The size - commonly referred to as |E| - of this graph equaling to the number of edges.

Attributes

Inherited from:
GraphBase
def strongComponentTraverser(parameters: Parameters, subgraphNodes: NodePredicate, subgraphEdges: EdgePredicate, ordering: ElemOrdering, maxWeight: Option[Weight]): StrongComponentTraverser

Value parameters

maxWeight

An optional maximum weight that limits the scope of the traversal or search. If defined and the sum of edge weights between the root of the traversal and a node exceeds the given maximum, that node will no more be visited.

ordering

If a NodeOrdering or EdgeOrdering different from NoOrdering is supplied neighbor nodes will visited during the traversal according to this ordering.

parameters

The properties controlling subsequent traversals.

subgraphEdges

Restricts subsequent graph traversals to walk only along edges that hold this predicate.

subgraphNodes

Restricts subsequent graph traversals to visit only nodes holding this predicate.

Attributes

Inherited from:
GraphTraversal
final def subtractOne(edge: E): GraphLike.this.type

Removes a single edge from this graph.

Removes a single edge from this graph.

Attributes

Inherited from:
GraphLike
final def subtractOne(node: N): GraphLike.this.type

Removes a single node from this graph.

Removes a single node from this graph.

Attributes

Inherited from:
GraphLike

Iterable over all nodes and edges.

Iterable over all nodes and edges.

Attributes

Inherited from:
GraphLike

Iterable over all nodes and edges.

Iterable over all nodes and edges.

Attributes

Inherited from:
GraphLike
override def toString: String

Sorts nodes and edges as long as this Graph has at most 100 elements. See also def render.

Sorts nodes and edges as long as this Graph has at most 100 elements. See also def render.

Attributes

Definition Classes
ToString -> Any
Inherited from:
ToString (hidden)
final def topologicalSort[U](implicit visitor: InnerElem => U): TopologicalSort

Sorts this graph topologically. Hooks are ignored.

Sorts this graph topologically. Hooks are ignored.

Value parameters

visitor

called for each inner node or inner edge visited during the sort. See componentTraverser for more control by means of FluentProperties.

Attributes

Inherited from:
GraphTraversal
final def topologicalSortByComponent[U](implicit visitor: InnerElem => U): Iterable[TopologicalSort]

Sorts every isolated component of this graph topologically. Hooks are ignored.

Sorts every isolated component of this graph topologically. Hooks are ignored.

Value parameters

visitor

called for each inner node or inner edge visited during the sort. See componentTraverser for more control by means of FluentProperties.

Attributes

Inherited from:
GraphTraversal
def totalDegree(implicit nodeDegree: DegreeFunction, degreeFilter: Int => Boolean): Int

The total degree of this graph equaling to the sum of the degrees over all nodes or 0 if this graph is empty.

The total degree of this graph equaling to the sum of the degrees over all nodes or 0 if this graph is empty.

Value parameters

degreeFilter

selects nodes to be included by their degree.

nodeDegree

the degree function to apply to the nodes defaulting to Degree. Non-default predefined degree functions are InDegree and OutDegree.

Attributes

Inherited from:
GraphDegree

The Sum of the weight of all edges.

The Sum of the weight of all edges.

Attributes

Inherited from:
GraphBase
final def union[N2 >: N, E2 >: E <: Edge[N2]](that: AnyGraph[N2, E2]): CC[N2, E2]

Computes the union between this graph and that graph.

Computes the union between this graph and that graph.

Attributes

Inherited from:
GraphOps
final def unionInPlace(that: AnyGraph[N, E]): GraphOps.this.type

Adds all elements in other to this Growable.

Adds all elements in other to this Growable.

Attributes

Inherited from:
GraphOps
def upsert(edge: E): Boolean

If an inner edge equaling to edge is present in this graph, it is replaced by edge, otherwise edge will be inserted. This is useful if non-key parts of an immutable edge are to be modified.

If an inner edge equaling to edge is present in this graph, it is replaced by edge, otherwise edge will be inserted. This is useful if non-key parts of an immutable edge are to be modified.

Attributes

Returns

true if edge has been inserted, false if it has been replaced.

Inherited from:
AbstractBuilder
final def |(that: AnyGraph[N, E]): CC[N, E]

Alias for union.

Alias for union.

Attributes

Inherited from:
GraphOps
final def |=(that: AnyGraph[N, E]): GraphOps.this.type

Alias for unionInPlace.

Alias for unionInPlace.

Attributes

Inherited from:
GraphOps

Inherited fields

final val anyEdge: EdgePredicate

Default edge filter letting path all edges (non-filter).

Default edge filter letting path all edges (non-filter).

Attributes

Inherited from:
GraphBase
final val anyNode: NodePredicate

Default node filter letting traverse all nodes (non-filter).

Default node filter letting traverse all nodes (non-filter).

Attributes

Inherited from:
GraphBase
val companion: Factory[[N, E <: Edge[N]] =>> Graph[N, E]]

The companion object of CC.

The companion object of CC.

Attributes

Inherited from:
GraphLike

Attributes

Inherited from:
GraphBase

Attributes

Inherited from:
GraphBase
final val noEdge: EdgePredicate

Edge predicate always returning false.

Edge predicate always returning false.

Attributes

Inherited from:
GraphBase
final val noNode: NodePredicate

Node predicate always returning false.

Node predicate always returning false.

Attributes

Inherited from:
GraphBase

Implicits

Inherited implicits

implicit def config: GraphConfig

Attributes

Inherited from:
GraphLike