scalax.collection

GraphTraversal

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

Graph-related functionality such as traversal, path finding, cycle detection etc. All algorithms including breadth-first, depth-first, white-gray-black search and Dijkstra's algorithm are tail recursive.

Before starting a traversal a Traverser such as InnerNodeTraverser is instantiated explicitly or implicitly. It holds settings like maxDepth, subgraph or ordering providing a fine-grained control of the traversal. Traversers also extend scala.collection.Traversable meaning that you can process the visited nodes and edges in a functional way.

Self Type
GraphTraversal[N, E]
See also

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

Linear Supertypes
GraphBase[N, E], Serializable, Serializable, AnyRef, Any
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. GraphTraversal
  2. GraphBase
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
Implicitly
  1. by anyToNode
  2. by CollectionsHaveToParArray
  3. by EdgeAssoc
  4. by any2stringadd
  5. by StringFormat
  6. by Ensuring
  7. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract class Component extends Properties

    Represents a component of this graph by a lazy implementation.

  2. abstract class ComponentTraverser extends FluentProperties[ComponentTraverser] with Properties with Traversable[Component]

    Controls the properties of consecutive graph traversals with no specific root.

  3. trait Cycle extends Path

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

  4. trait Edge extends Serializable

    Definition Classes
    GraphBase
  5. class EdgeBase extends InnerEdgeParam[N, E, NodeT, E] with InnerEdge

    Definition Classes
    GraphBase
  6. sealed trait EdgeOrdering extends Ordering[EdgeT] with ElemOrdering

    Definition Classes
    GraphBase
  7. trait EdgeSet extends Set[EdgeT] with ExtSetMethods[EdgeT] with Serializable

    Definition Classes
    GraphBase
  8. abstract type EdgeSetT <: EdgeSet

    Definition Classes
    GraphBase
  9. abstract type EdgeT <: InnerEdgeParam[N, E, NodeT, E] with InnerEdge with Serializable

    Definition Classes
    GraphBase
  10. sealed trait ElemOrdering extends AnyRef

    Base trait for graph Orderings.

  11. trait ExtendedNodeVisitor extends (NodeT) ⇒ VisitorReturn with (NodeT, Int, Int, ⇒ NodeInformer) ⇒ VisitorReturn

    Template for extended node visitors.

  12. abstract class FluentProperties[+This <: FluentProperties[This]] extends AnyRef

    Properties and methods for creating modified properties in a fluent-interface manner.

  13. trait InnerEdge extends Iterable[NodeT] with InnerEdgeParam[N, E, NodeT, E] with Edge with InnerElem

    Definition Classes
    GraphBase
  14. abstract class InnerEdgeTraverser extends Traverser[EdgeT, InnerEdgeTraverser]

    Controls the properties of inner-edge graph traversals.

  15. sealed trait InnerElem extends AnyRef

    Definition Classes
    GraphBase
  16. abstract class InnerElemTraverser extends Traverser[InnerElem, InnerElemTraverser]

    Controls the properties of inner-element graph traversals.

  17. trait InnerNode extends InnerNodeParam[N] with Node with InnerElem

    Definition Classes
    GraphBase
  18. abstract class InnerNodeDownUpTraverser extends Traverser[(Boolean, NodeT), InnerNodeDownUpTraverser]

    Controls the properties of inner-node down-up graph traversals.

  19. abstract class InnerNodeTraverser extends Traverser[NodeT, InnerNodeTraverser]

    Controls the properties of inner-node graph traversals.

  20. sealed class NoOrdering extends ElemOrdering

    The empty ElemOrdering.

  21. trait Node extends Serializable

    Definition Classes
    GraphBase
  22. abstract class NodeBase extends InnerNode

    Attributes
    protected
    Definition Classes
    GraphBase
  23. sealed trait NodeOrdering extends Ordering[NodeT] with ElemOrdering

    Ordering for the path dependent type NodeT.

  24. trait NodeSet extends Set[NodeT] with ExtSetMethods[NodeT] with Serializable

    Definition Classes
    GraphBase
  25. abstract type NodeSetT <: NodeSet

    Definition Classes
    GraphBase
  26. abstract type NodeT <: TraverserInnerNode

    Definition Classes
    GraphTraversalGraphBase
  27. abstract class OuterEdgeTraverser extends Traverser[E[N], OuterEdgeTraverser]

    Controls the properties of outer-edge graph traversals.

  28. trait OuterElemTraverser extends Traverser[OuterElem[N, E], OuterElemTraverser]

    Controls the properties of outer-element graph traversals.

  29. abstract class OuterNodeDownUpTraverser extends Traverser[(Boolean, N), OuterNodeDownUpTraverser]

    Controls the properties of outer-node down-up graph traversals.

  30. abstract class OuterNodeTraverser extends Traverser[N, OuterNodeTraverser]

    Controls the properties of outer-node graph traversals.

  31. trait Path extends Walk

    Represents a path in this graph where

  32. trait Properties extends AnyRef

    Properties controlling traversals.

  33. abstract class Traverser[A, +This <: Traverser[A, This]] extends TraverserMethods[A, This] with Properties with Traversable[A]

    Controls the properties of consecutive graph traversals starting at a root node.

  34. trait TraverserInnerNode extends InnerNode

  35. abstract class TraverserMethods[A, +This <: TraverserMethods[A, This]] extends FluentProperties[This]

    The root-related methods Traverser will inherit.

  36. trait Walk extends Traversable[InnerElem]

    Represents a walk in this graph where

  37. trait ZeroWalk extends AnyRef

    Attributes
    protected
  38. abstract class Traversal extends AnyRef

    Abstract class for functional traversals.

Abstract Value Members

  1. abstract def componentTraverser(parameters: Parameters = Parameters(), subgraphNodes: (NodeT) ⇒ Boolean = anyNode, subgraphEdges: (EdgeT) ⇒ Boolean = anyEdge, ordering: ElemOrdering = noOrdering): ComponentTraverser

    Creates a ComponentTraverser responsible for invoking graph traversal methods that cover all components of this possibly disconnected graph.

    Creates a ComponentTraverser responsible for invoking graph traversal methods that cover all components of this possibly disconnected graph.

    parameters

    The properties controlling subsequent traversals.

    subgraphNodes

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

    subgraphEdges

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

    ordering

    If a NodeOrdering or EdgeOrdering different from noOrdering is supplied neighbor nodes will be sorted during the traversal. Thus it is guaranteed that the smaller an element's ranking the sooner it will be processed. In case of EdgeOrdering it is guaranteed that the smaller an edge's ranking the sooner its relevant end(s) will be processed.

  2. abstract def edges: EdgeSetT

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

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

    returns

    Set of all contained edges.

    Definition Classes
    GraphBase
  3. abstract def innerEdgeTraverser(root: NodeT, parameters: Parameters = Parameters(), subgraphNodes: (NodeT) ⇒ Boolean = anyNode, subgraphEdges: (EdgeT) ⇒ Boolean = anyEdge, ordering: ElemOrdering = noOrdering): InnerEdgeTraverser

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

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

    root

    The node where subsequent graph traversals start.

    parameters

    The properties controlling subsequent traversals.

    subgraphNodes

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

    subgraphEdges

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

    ordering

    If a NodeOrdering or EdgeOrdering different from noOrdering is supplied neighbor nodes will be sorted during the traversal. Thus it is guaranteed that the smaller an element's ranking the sooner it will be processed. In case of EdgeOrdering it is guaranteed that the smaller an edge's ranking the sooner its relevant end(s) will be processed.

  4. abstract def innerElemTraverser(root: NodeT, parameters: Parameters = Parameters(), subgraphNodes: (NodeT) ⇒ Boolean = anyNode, subgraphEdges: (EdgeT) ⇒ Boolean = anyEdge, ordering: ElemOrdering = noOrdering): InnerElemTraverser

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

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

    root

    The node where subsequent graph traversals start.

    parameters

    The properties controlling subsequent traversals.

    subgraphNodes

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

    subgraphEdges

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

    ordering

    If a NodeOrdering or EdgeOrdering different from noOrdering is supplied neighbor nodes will be sorted during the traversal. Thus it is guaranteed that the smaller an element's ranking the sooner it will be processed. In case of EdgeOrdering it is guaranteed that the smaller an edge's ranking the sooner its relevant end(s) will be processed.

  5. abstract def innerNodeDownUpTraverser(root: NodeT, parameters: Parameters = Parameters(), subgraphNodes: (NodeT) ⇒ Boolean = anyNode, subgraphEdges: (EdgeT) ⇒ Boolean = anyEdge, ordering: ElemOrdering = noOrdering): InnerNodeDownUpTraverser

    Creates a InnerNodeDownUpTraverser based on scala.collection.Traversable[(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.Traversable[(Boolean, NodeT)] where the Boolean parameter is true if the traversal takes place in downward and false if it takes place in upward direction.

    root

    The node where subsequent graph traversals start.

    parameters

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

    subgraphNodes

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

    subgraphEdges

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

    ordering

    If a NodeOrdering or EdgeOrdering different from noOrdering is supplied neighbor nodes will be sorted during the traversal. Thus it is guaranteed that the smaller an element's ranking the sooner it will be processed. In case of EdgeOrdering it is guaranteed that the smaller an edge's ranking the sooner its relevant end(s) will be processed.

  6. abstract def innerNodeTraverser(root: NodeT, parameters: Parameters = Parameters(), subgraphNodes: (NodeT) ⇒ Boolean = anyNode, subgraphEdges: (EdgeT) ⇒ Boolean = anyEdge, ordering: ElemOrdering = noOrdering): InnerNodeTraverser

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

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

    root

    The node where subsequent graph traversals start.

    parameters

    The properties controlling subsequent traversals.

    subgraphNodes

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

    subgraphEdges

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

    ordering

    If a NodeOrdering or EdgeOrdering different from noOrdering is supplied neighbor nodes will be sorted during the traversal. Thus it is guaranteed that the smaller an element's ranking the sooner it will be processed. In case of EdgeOrdering it is guaranteed that the smaller an edge's ranking the sooner its relevant end(s) will be processed.

  7. abstract def isDirected: Boolean

    Definition Classes
    GraphBase
  8. abstract def isHyper: Boolean

    Definition Classes
    GraphBase
  9. abstract def newEdge(innerEdge: E[NodeT]): EdgeT

    Attributes
    protected
    Definition Classes
    GraphBase
  10. abstract def newNode(n: N): NodeT

    Attributes
    protected
    Definition Classes
    GraphBase
  11. abstract def nodes: NodeSetT

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

    returns

    Set of all contained nodes.

    Definition Classes
    GraphBase
  12. abstract def outerEdgeTraverser(root: NodeT, parameters: Parameters = Parameters(), subgraphNodes: (NodeT) ⇒ Boolean = anyNode, subgraphEdges: (EdgeT) ⇒ Boolean = anyEdge, ordering: ElemOrdering = noOrdering): OuterEdgeTraverser

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

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

    root

    The node where subsequent graph traversals start.

    parameters

    The properties controlling subsequent traversals.

    subgraphNodes

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

    subgraphEdges

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

    ordering

    If a NodeOrdering or EdgeOrdering different from noOrdering is supplied neighbor nodes will be sorted during the traversal. Thus it is guaranteed that the smaller an element's ranking the sooner it will be processed. In case of EdgeOrdering it is guaranteed that the smaller an edge's ranking the sooner its relevant end(s) will be processed.

  13. abstract def outerElemTraverser(root: NodeT, parameters: Parameters = Parameters(), subgraphNodes: (NodeT) ⇒ Boolean = anyNode, subgraphEdges: (EdgeT) ⇒ Boolean = anyEdge, ordering: ElemOrdering = noOrdering): OuterElemTraverser

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

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

    root

    The node where subsequent graph traversals start.

    parameters

    The properties controlling subsequent traversals.

    subgraphNodes

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

    subgraphEdges

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

    ordering

    If a NodeOrdering or EdgeOrdering different from noOrdering is supplied neighbor nodes will be sorted during the traversal. Thus it is guaranteed that the smaller an element's ranking the sooner it will be processed. In case of EdgeOrdering it is guaranteed that the smaller an edge's ranking the sooner its relevant end(s) will be processed.

  14. abstract def outerNodeDownUpTraverser(root: NodeT, parameters: Parameters = Parameters(), subgraphNodes: (NodeT) ⇒ Boolean = anyNode, subgraphEdges: (EdgeT) ⇒ Boolean = anyEdge, ordering: ElemOrdering = noOrdering): OuterNodeDownUpTraverser

    Creates a OuterNodeDownUpTraverser based on scala.collection.Traversable[(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.Traversable[(Boolean, N)] where the Boolean parameter is true if the traversal takes place in downward and false if it takes place in upward direction.

    root

    The node where subsequent graph traversals start.

    parameters

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

    subgraphNodes

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

    subgraphEdges

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

    ordering

    If a NodeOrdering or EdgeOrdering different from noOrdering is supplied neighbor nodes will be sorted during the traversal. Thus it is guaranteed that the smaller an element's ranking the sooner it will be processed. In case of EdgeOrdering it is guaranteed that the smaller an edge's ranking the sooner its relevant end(s) will be processed.

  15. abstract def outerNodeTraverser(root: NodeT, parameters: Parameters = Parameters(), subgraphNodes: (NodeT) ⇒ Boolean = anyNode, subgraphEdges: (EdgeT) ⇒ Boolean = anyEdge, ordering: ElemOrdering = noOrdering): OuterNodeTraverser

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

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

    root

    The node where subsequent graph traversals start.

    parameters

    The properties controlling subsequent traversals.

    subgraphNodes

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

    subgraphEdges

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

    ordering

    If a NodeOrdering or EdgeOrdering different from noOrdering is supplied neighbor nodes will be sorted during the traversal. Thus it is guaranteed that the smaller an element's ranking the sooner it will be processed. In case of EdgeOrdering it is guaranteed that the smaller an edge's ranking the sooner its relevant end(s) will be processed.

  16. abstract def newTraversal(direction: Direction = Successors, nodeFilter: (NodeT) ⇒ Boolean = anyNode, edgeFilter: (EdgeT) ⇒ Boolean = anyEdge, nodeVisitor: (NodeT) ⇒ VisitorReturn = noNodeAction, edgeVisitor: (EdgeT) ⇒ Unit = noEdgeAction, ordering: ElemOrdering = noOrdering): Traversal

    Creates a Traversal instance allowing subsequent traversals with constant filters and visitors.

    Creates a Traversal instance allowing subsequent traversals with constant filters and visitors.

    direction

    Determines which connected nodes the traversal has to follow. The default value is Successors.

    nodeFilter

    Predicate to filter the nodes to be visited during traversal. The default value is anyNode, that is no filtering. A return of true signals that the traversal is to be canceled.

    edgeFilter

    Predicate to filter the edges to be visited during traversal. The default value is anyEdge meaning that no filtering takes place.

    nodeVisitor

    Function to be called on visiting a node for the first time during a traversal. It can mutate the node or carry out any other side effect. The default value is the empty function noNodeAction. Alternatively, an instance of ExtendedNodeVisitor may be passed to obtain additional state information such as the current depth. The concrete type of the last argument, the informer depends on the underlying implementation so you need to match against it. Concerning this method please match against scalax.collection.GraphTraversalImpl.DfsInformer or scalax.collection.GraphTraversalImpl.BfsInformer depending on the breadthFirst argument.

    edgeVisitor

    Function to be called on visiting an edge. It can mutate the node or carry out any other side effect. The default value is the empty function noEdgeAction.

    ordering

    If a NodeOrdering or EdgeOrdering different from noOrdering is supplied neighbor nodes will be sorted during the traversal. Thus it is guaranteed that the smaller an element's ranking the sooner it will be processed. In case of EdgeOrdering it is guaranteed that the smaller an edge's ranking the sooner its relevant end(s) will be processed.

    Annotations
    @deprecated
    Deprecated

    (Since version 1.8.0) use one of Traverser factory methods instead.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to any2stringadd[GraphTraversal[N, E]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (GraphTraversal[N, E], B)

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to ArrowAssoc[GraphTraversal[N, E]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  6. object Edge extends Serializable

    Definition Classes
    GraphBase
  7. object EdgeOrdering extends Serializable

    Ordering for the path dependent type EdgeT.

  8. object EdgeT

    Definition Classes
    GraphBase
  9. object ExtendedNodeVisitor

  10. object InnerEdge extends Serializable

    Definition Classes
    GraphBase
  11. object InnerNode extends Serializable

    Definition Classes
    GraphBase
  12. object Node extends Serializable

    Definition Classes
    GraphBase
  13. object NodeOrdering extends Serializable

    Definition Classes
    GraphBase
  14. object Path

  15. object TraverserInnerNode extends Serializable

  16. object Walk

  17. final val anyEdge: (EdgeT) ⇒ Boolean

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

  18. final val anyNode: (NodeT) ⇒ Boolean

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

  19. final lazy val anyOrdering: AnyOrdering[N]

    Attributes
    protected
    Definition Classes
    GraphBase
  20. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  21. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final lazy val defaultEdgeOrdering: EdgeOrdering

    Definition Classes
    GraphBase
  23. final lazy val defaultNodeOrdering: NodeOrdering

    Definition Classes
    GraphBase
  24. final def defaultPathSize: Int

    Attributes
    protected
    Annotations
    @inline()
  25. implicit final def edgeToEdgeCont(e: E[N]): E[NodeT]

    Attributes
    protected
    Definition Classes
    GraphBase
    Annotations
    @inline()
  26. def ensuring(cond: (GraphTraversal[N, E]) ⇒ Boolean, msg: ⇒ Any): GraphTraversal[N, E]

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to Ensuring[GraphTraversal[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  27. def ensuring(cond: (GraphTraversal[N, E]) ⇒ Boolean): GraphTraversal[N, E]

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to Ensuring[GraphTraversal[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  28. def ensuring(cond: Boolean, msg: ⇒ Any): GraphTraversal[N, E]

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to Ensuring[GraphTraversal[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  29. def ensuring(cond: Boolean): GraphTraversal[N, E]

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to Ensuring[GraphTraversal[N, E]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  30. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  32. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  33. final def findCycle(visitor: (InnerElem) ⇒ Unit): Option[Cycle]

    Finds a cycle in this graph and calls visitor for each inner element visited during the search.

    Finds a cycle in this graph and calls visitor for each inner element visited during the search. Use componentTraverser to pass non-default arguments.

    Annotations
    @inline()
  34. final def findCycle: Option[Cycle]

    Finds a cycle in this graph.

    Finds a cycle in this graph. Use componentTraverser to pass non-default arguments.

    Annotations
    @inline()
  35. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to StringFormat[GraphTraversal[N, E]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  36. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  37. def graphSize: Int

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

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

    Method size is reserved for the number of nodes and edges because Graph is also SetLike with set elements being nodes or edges.

    Definition Classes
    GraphBase
  38. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  39. def initialize(nodes: Iterable[N], edges: Iterable[E[N]]): Unit

    Populates this graph with nodes and edges.

    Populates this graph with nodes and edges.

    The implementing class will typically have a constructor with the same parameters which is invoked by from of the companion object.

    nodes

    The isolated (and optionally any other) outer nodes that the node set of this graph is to be populated with.

    edges

    The outer edges that the edge set of this graph is to be populated with. Nodes being the end of any of these edges will be added to the node set.

    Attributes
    protected
    Definition Classes
    GraphBase
  40. final def isAcyclic: Boolean

    Whether this graph has no cycle.

    Whether this graph has no cycle.

    Annotations
    @inline()
  41. def isComplete: Boolean

    Whether all nodes are pairwise adjacent.

    Whether all nodes are pairwise adjacent.

    returns

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

  42. def isConnected: Boolean

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

  43. final def isCustomEdgeFilter(f: (EdgeT) ⇒ Boolean): Boolean

    true if f is not equivalent to anyEdge.

    true if f is not equivalent to anyEdge.

    Annotations
    @inline()
  44. final def isCustomEdgeVisitor(v: (EdgeT) ⇒ Unit): Boolean

    true if v is not equivalent to noEdgeAction.

    true if v is not equivalent to noEdgeAction.

    Annotations
    @inline()
  45. final def isCustomNodeFilter(f: (NodeT) ⇒ Boolean): Boolean

    true if f is not equivalent to anyNode.

    true if f is not equivalent to anyNode.

    Annotations
    @inline()
  46. final def isCustomNodeUpVisitor(v: (NodeT) ⇒ Unit): Boolean

    true if v is not equivalent to noNodeUpAction.

    true if v is not equivalent to noNodeUpAction.

    Annotations
    @inline()
  47. final def isCustomNodeVisitor(v: (NodeT) ⇒ VisitorReturn): Boolean

    true if v is not equivalent to noNodeAction.

    true if v is not equivalent to noNodeAction.

    Annotations
    @inline()
  48. final def isCyclic: Boolean

    Whether this graph has at least one cycle.

    Whether this graph has at least one cycle.

    Annotations
    @inline()
  49. def isDefined: Boolean

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to OuterNode[GraphTraversal[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    Param
  50. def isEdge: Boolean

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to OuterNode[GraphTraversal[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    NodeParam
  51. def isIn: Boolean

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to OuterNode[GraphTraversal[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    InParamParam
  52. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  53. def isNode: Boolean

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to OuterNode[GraphTraversal[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    NodeParam
  54. def isOut: Boolean

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to OuterNode[GraphTraversal[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    InParamParam
  55. final def isTrivial: Boolean

    true if this graph has at most 1 node.

    true if this graph has at most 1 node.

    Definition Classes
    GraphBase
    Annotations
    @inline()
  56. val n1: GraphTraversal[N, E]

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to EdgeAssoc[GraphTraversal[N, E]] performed by method EdgeAssoc in scalax.collection.GraphPredef.
    Definition Classes
    EdgeAssoc
  57. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  58. final val noEdgeAction: (EdgeT) ⇒ Unit

    Default edge visitor doing nothing (non-visitor).

  59. final val noNode: (NodeT) ⇒ Boolean

    Node predicate always returning false.

  60. final val noNodeAction: (NodeT) ⇒ GraphTraversal.VisitorReturn.Value

    Default node visitor doing nothing (non-visitor).

  61. final val noNodeUpAction: (NodeT) ⇒ Unit

    Default node-up visitor doing nothing (non-visitor).

  62. final val noOrdering: NoOrdering

    Definition Classes
    GraphBase
  63. final def nonTrivial: Boolean

    true if this graph has at least 2 nodes.

    true if this graph has at least 2 nodes.

    Definition Classes
    GraphBase
    Annotations
    @inline()
  64. final def notify(): Unit

    Definition Classes
    AnyRef
  65. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  66. 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.

    Definition Classes
    GraphBase
  67. def stringPrefix: String

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to OuterNode[GraphTraversal[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    NodeParam
  68. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  69. def toParArray: ParArray[T]

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to CollectionsHaveToParArray[GraphTraversal[N, E], T] performed by method CollectionsHaveToParArray in scala.collection.parallel. This conversion will take place only if an implicit value of type (GraphTraversal[N, E]) ⇒ GenTraversableOnce[T] is in scope.
    Definition Classes
    CollectionsHaveToParArray
  70. def toString(): String

    Definition Classes
    AnyRef → Any
  71. def totalWeight: Long

    Definition Classes
    GraphBase
  72. val value: GraphTraversal[N, E]

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to OuterNode[GraphTraversal[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Definition Classes
    OuterNodeNodeParam
  73. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  74. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  75. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  76. def ~[N >: N1, N2 <: N](n2: N2): UnDiEdge[N]

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to EdgeAssoc[GraphTraversal[N, E]] performed by method EdgeAssoc in scalax.collection.GraphPredef.
    Definition Classes
    EdgeAssoc
    Annotations
    @inline()
  77. def ~>[N >: N1, N2 <: N](n2: N2): DiEdge[N]

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to EdgeAssoc[GraphTraversal[N, E]] performed by method EdgeAssoc in scalax.collection.GraphPredef.
    Definition Classes
    EdgeAssoc
    Annotations
    @inline()
  78. def [B](y: B): (GraphTraversal[N, E], B)

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to ArrowAssoc[GraphTraversal[N, E]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. def toString(): String

    Implicit information
    This member is added by an implicit conversion from GraphTraversal[N, E] to OuterNode[GraphTraversal[N, E]] performed by method anyToNode in scalax.collection.GraphPredef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (graphTraversal: OuterNode[GraphTraversal[N, E]]).toString()
    Definition Classes
    NodeParam → AnyRef → Any

Deprecated Value Members

  1. def findCycle(nodeFilter: (NodeT) ⇒ Boolean = anyNode, edgeFilter: (EdgeT) ⇒ Boolean = anyEdge, maxDepth: Int = 0, nodeVisitor: (NodeT) ⇒ VisitorReturn = noNodeAction, edgeVisitor: (EdgeT) ⇒ Unit = noEdgeAction, ordering: ElemOrdering = noOrdering): Option[Cycle]

    Finds a cycle in this graph taking optional filters and visitors into account.

    Finds a cycle in this graph taking optional filters and visitors into account., if any.

    nodeFilter

    Predicate to filter the nodes to be visited during traversal. The default value is anyNode, that is no filtering. A return of true signals that the traversal is to be canceled.

    edgeFilter

    Predicate to filter the edges to be visited during traversal. The default value is anyEdge meaning that no filtering takes place.

    maxDepth

    A positive value limiting the number of layers for Bfs respectively the number of consecutive child visits before siblings are visited for Dfs. 0, the default value, indicates that the traversal should have an unlimited depth meaning that it will be continued until either it's canceled or all nodes have been visited.

    nodeVisitor

    Function to be called on visiting a node for the first time during a traversal. It can mutate the node or carry out any other side effect. The default value is the empty function noNodeAction. Alternatively, an instance of ExtendedNodeVisitor may be passed to obtain additional state information such as the current depth. The concrete type of the last argument, the informer depends on the underlying implementation so you need to match against it. Concerning this method please match against scalax.collection.GraphTraversalImpl.WgbInformer.

    edgeVisitor

    Function to be called on visiting an edge. It can mutate the node or carry out any other side effect. The default value is the empty function noEdgeAction.

    ordering

    If a NodeOrdering or EdgeOrdering different from noOrdering is supplied neighbor nodes will be sorted during the traversal. Thus it is guaranteed that the smaller an element's ranking the sooner it will be processed. In case of EdgeOrdering it is guaranteed that the smaller an edge's ranking the sooner its relevant end(s) will be processed.

    returns

    A cycle or None if either

    1. there exists no cycle in this graph or
    2. there exists a cycle in this graph but due to the given filtering conditions or a Cancel return by a visitor this cycle had to be disregarded.
    Annotations
    @deprecated
    Deprecated

    (Since version 1.8.0) Use componentTraverser instead.

Inherited from GraphBase[N, E]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion anyToNode from GraphTraversal[N, E] to OuterNode[GraphTraversal[N, E]]

Inherited by implicit conversion CollectionsHaveToParArray from GraphTraversal[N, E] to CollectionsHaveToParArray[GraphTraversal[N, E], T]

Inherited by implicit conversion EdgeAssoc from GraphTraversal[N, E] to EdgeAssoc[GraphTraversal[N, E]]

Inherited by implicit conversion any2stringadd from GraphTraversal[N, E] to any2stringadd[GraphTraversal[N, E]]

Inherited by implicit conversion StringFormat from GraphTraversal[N, E] to StringFormat[GraphTraversal[N, E]]

Inherited by implicit conversion Ensuring from GraphTraversal[N, E] to Ensuring[GraphTraversal[N, E]]

Inherited by implicit conversion ArrowAssoc from GraphTraversal[N, E] to ArrowAssoc[GraphTraversal[N, E]]

Ungrouped