RepeatStep

overflowdb.traversal.RepeatStep$
object RepeatStep

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

class FifoWorklist[A] extends Worklist[A]

queue based worklist for RepeatBehaviour.SearchAlgorithm.BreadthFirst

queue based worklist for RepeatBehaviour.SearchAlgorithm.BreadthFirst

Attributes

Graph
Supertypes
trait Worklist[A]
class Object
trait Matchable
class Any
class LifoWorklist[A] extends Worklist[A]

stack based worklist for RepeatBehaviour.SearchAlgorithm.DepthFirst

stack based worklist for RepeatBehaviour.SearchAlgorithm.DepthFirst

Attributes

Graph
Supertypes
trait Worklist[A]
class Object
trait Matchable
class Any
trait Worklist[A]

stores work still to do. depending on the underlying collection type, the behaviour of the repeat step changes

stores work still to do. depending on the underlying collection type, the behaviour of the repeat step changes

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class FifoWorklist[A]
class LifoWorklist[A]
case class WorklistItem[A](traversal: Iterator[A], depth: Int)

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[A](repeatTraversal: Iterator[A] => Iterator[A], behaviour: RepeatBehaviour[A]): A => Iterator[A]

Attributes

See also:

Traversal.repeat for a detailed overview Implementation note: using recursion results in nicer code, but uses the JVM stack, which only has enough space for ~10k steps. So instead, this uses a programmatic Stack which is semantically identical. The RepeatTraversalTests cover this case.