Cycle

scalax.collection.GraphTraversal.Cycle
See theCycle companion object
trait Cycle extends Path

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

Companion
object
Graph
Supertypes
trait Path
trait Walk
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

Value members

Concrete methods

override def endNode: NodeT

Attributes

Definition Classes
final def sameAs(that: Cycle): Boolean

Semantically compares this cycle with that cycle. While == returns true only if the cycles contain the same elements in the same order, this comparison returns also true if the elements of that cycle can be shifted and optionally reversed such that their elements have the same order. For instance, given

Semantically compares this cycle with that cycle. While == returns true only if the cycles contain the same elements in the same order, this comparison returns also true if the elements of that cycle can be shifted and optionally reversed such that their elements have the same order. For instance, given

c1 = Cycle(1-2-3-1)
c2 = Cycle(2-3-1-2)
c3 = Cycle(2-1-3-2)

the following expressions hold:

`c1 != c2`, `c1 != c3` but
`c1 sameAs c2` and `c1 sameAs c3`

Attributes

final def sameElements(that: Iterable[_]): Boolean

Same as sameAs but also comparing this cycle with any Iterable.

Same as sameAs but also comparing this cycle with any Iterable.

Attributes

Inherited methods

final def ++[B >: InnerElem](suffix: IterableOnce[B]): Iterable[B]

Attributes

Inherited from:
IterableOps
final def addString(b: StringBuilder): b.type

Attributes

Inherited from:
IterableOnceOps
final def addString(b: StringBuilder, sep: String): b.type

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOps
final def containingGraph: this.type

The Graph instance that contains this walk.

The Graph instance that contains this walk.

Attributes

Inherited from:
Walk

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: InnerElem](xs: Array[B]): Int

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
override def empty: Iterable[InnerElem]

Attributes

Definition Classes
Inherited from:
IterableFactoryDefaults

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOps
def flatten[B](implicit asIterable: InnerElem => IterableOnce[B]): Iterable[B]

Attributes

Inherited from:
IterableOps
def fold[A1 >: InnerElem](z: A1)(op: (A1, A1) => A1): A1

Attributes

Inherited from:
IterableOnceOps
def foldLeft[B](z: B)(op: (B, InnerElem) => B): B

Attributes

Inherited from:
IterableOnceOps
def foldRight[B](z: B)(op: (InnerElem, B) => B): B

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps
def foreach[U](f: InnerElem => U): Unit

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableFactoryDefaults

Attributes

Inherited from:
IterableOps
def groupMap[K, B](key: InnerElem => K)(f: InnerElem => B): Map[K, Iterable[B]]

Attributes

Inherited from:
IterableOps
def groupMapReduce[K, B](key: InnerElem => K)(f: InnerElem => B)(reduce: (B, B) => B): Map[K, B]

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOnceOps
override def isTraversableAgain: Boolean

Attributes

Definition Classes
Inherited from:
IterableOps
override def isValid: Boolean

Returns whether the nodes and edges on this path are valid with respect to this graph. This optional check is sane if there is reasonable doubt about the correctness of some algorithm results.

Returns whether the nodes and edges on this path are valid with respect to this graph. This optional check is sane if there is reasonable doubt about the correctness of some algorithm results.

Attributes

Definition Classes
Path -> Walk
Inherited from:
Path

Attributes

Inherited from:
Iterable
override def iterator: Iterator[InnerElem]

Attributes

Definition Classes
Inherited from:
Walk
def knownSize: Int

Attributes

Inherited from:
IterableOnce

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
def lazyZip[B](that: Iterable[B]): LazyZip2[InnerElem, B, Iterable.this.type]

Attributes

Inherited from:
Iterable
def length: Int

The number of edges on this path/walk.

The number of edges on this path/walk.

Attributes

Inherited from:
Walk
def map[B](f: InnerElem => B): Iterable[B]

Attributes

Inherited from:
IterableOps
def max[B >: InnerElem](implicit ord: Ordering[B]): InnerElem

Attributes

Inherited from:
IterableOnceOps
def maxBy[B](f: InnerElem => B)(implicit ord: Ordering[B]): InnerElem

Attributes

Inherited from:
IterableOnceOps
def maxByOption[B](f: InnerElem => B)(implicit ord: Ordering[B]): Option[InnerElem]

Attributes

Inherited from:
IterableOnceOps
def maxOption[B >: InnerElem](implicit ord: Ordering[B]): Option[InnerElem]

Attributes

Inherited from:
IterableOnceOps
def min[B >: InnerElem](implicit ord: Ordering[B]): InnerElem

Attributes

Inherited from:
IterableOnceOps
def minBy[B](f: InnerElem => B)(implicit ord: Ordering[B]): InnerElem

Attributes

Inherited from:
IterableOnceOps
def minByOption[B](f: InnerElem => B)(implicit ord: Ordering[B]): Option[InnerElem]

Attributes

Inherited from:
IterableOnceOps
def minOption[B >: InnerElem](implicit ord: Ordering[B]): Option[InnerElem]

Attributes

Inherited from:
IterableOnceOps
final def mkString: String

Attributes

Inherited from:
IterableOnceOps
final def mkString(sep: String): String

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableFactoryDefaults

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOps
def partitionMap[A1, A2](f: InnerElem => Either[A1, A2]): (Iterable[A1], Iterable[A2])

Attributes

Inherited from:
IterableOps
def product[B >: InnerElem](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
def reduce[B >: InnerElem](op: (B, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeft[B >: InnerElem](op: (B, InnerElem) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeftOption[B >: InnerElem](op: (B, InnerElem) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceOption[B >: InnerElem](op: (B, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceRight[B >: InnerElem](op: (InnerElem, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceRightOption[B >: InnerElem](op: (InnerElem, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
protected def reversed: Iterable[InnerElem]

Attributes

Inherited from:
IterableOnceOps
def scan[B >: InnerElem](z: B)(op: (B, B) => B): Iterable[B]

Attributes

Inherited from:
IterableOps
def scanLeft[B](z: B)(op: (B, InnerElem) => B): Iterable[B]

Attributes

Inherited from:
IterableOps
def scanRight[B](z: B)(op: (InnerElem, B) => B): Iterable[B]

Attributes

Inherited from:
IterableOps
override def size: Int

The number of nodes and edges on this path/walk.

The number of nodes and edges on this path/walk.

Attributes

Definition Classes
Inherited from:
Walk

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
final def sizeIs: SizeCompareOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Definition Classes
Inherited from:
IterableOps
def stepper[S <: Stepper[_]](implicit shape: StepperShape[InnerElem, S]): S

Attributes

Inherited from:
IterableOnce
def sum[B >: InnerElem](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
override def tapEach[U](f: InnerElem => U): Iterable[InnerElem]

Attributes

Definition Classes
Inherited from:
IterableOps
def to[C1](factory: Factory[InnerElem, C1]): C1

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps
final def toBuffer[B >: InnerElem]: Buffer[B]

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOnceOps
def toMap[K, V](implicit ev: InnerElem <:< (K, V)): Map[K, V]

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
Walk

Attributes

Inherited from:
IterableOnceOps
def toSet[B >: InnerElem]: Set[B]

Attributes

Inherited from:
IterableOnceOps
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Iterable -> Any
Inherited from:
Iterable

Attributes

Inherited from:
IterableOnceOps

Attributes

Inherited from:
IterableOps
def unzip[A1, A2](implicit asPair: InnerElem => (A1, A2)): (Iterable[A1], Iterable[A2])

Attributes

Inherited from:
IterableOps
def unzip3[A1, A2, A3](implicit asTriple: InnerElem => (A1, A2, A3)): (Iterable[A1], Iterable[A2], Iterable[A3])

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
final def weight[T : Numeric](f: EdgeT => T): T

The cumulated weight of all edges on this path/walk.

The cumulated weight of all edges on this path/walk.

Value parameters

f

The weight function overriding edge weights.

Attributes

Inherited from:
Walk
final def weight: Double

The cumulated weight of all edges on this path/walk.

The cumulated weight of all edges on this path/walk.

Attributes

Inherited from:
Walk

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps
def zipAll[A1 >: InnerElem, B](that: Iterable[B], thisElem: A1, thatElem: B): Iterable[(A1, B)]

Attributes

Inherited from:
IterableOps

Attributes

Inherited from:
IterableOps

Inherited and Abstract methods

All edges of this path/walk in proper order.

All edges of this path/walk in proper order.

Attributes

Inherited from:
Walk

All nodes on this path/walk in proper order.

All nodes on this path/walk in proper order.

Attributes

Inherited from:
Walk

Attributes

Inherited from:
Walk

Deprecated and Inherited methods

Attributes

Deprecated
[Since version 2.13.0] Use ++ instead of ++: for collections of type Iterable
Inherited from:
IterableOps
final def /:[B](z: B)(op: (B, InnerElem) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldLeft instead of /:
Inherited from:
IterableOnceOps
final def :\[B](z: B)(op: (InnerElem, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldRight instead of :\\
Inherited from:
IterableOnceOps
def aggregate[B](z: => B)(seqop: (B, InnerElem) => B, combop: (B, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] For sequential collections, prefer `foldLeft(z)(seqop)`. For parallel collections, use `ParIterableLike#aggregate`.
Inherited from:
IterableOnceOps

Attributes

Deprecated
[Since version 2.13.0] Use iterableFactory instead
Inherited from:
IterableOps
final def copyToBuffer[B >: InnerElem](dest: Buffer[B]): Unit

Attributes

Deprecated
[Since version 2.13.0] Use `dest ++= coll` instead
Inherited from:
IterableOnceOps

Attributes

Deprecated
[Since version 2.13.0] Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)
Inherited from:
IterableOnceOps
final def repr: Iterable[InnerElem]

Attributes

Deprecated
[Since version 2.13.0] Use coll instead of repr in a collection implementation, use the collection value itself from the outside
Inherited from:
IterableOps
def seq: Iterable.this.type

Attributes

Deprecated
[Since version 2.13.0] Iterable.seq always returns the iterable itself
Inherited from:
Iterable
final def toIterable: Iterable.this.type

Attributes

Deprecated
[Since version 2.13.7] toIterable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
Iterable

Attributes

Deprecated
[Since version 2.13.0] Use .iterator instead of .toIterator
Inherited from:
IterableOnceOps
final def toStream: Stream[InnerElem]

Attributes

Deprecated
[Since version 2.13.0] Use .to(LazyList) instead of .toStream
Inherited from:
IterableOnceOps

Attributes

Deprecated
[Since version 2.13.0] toTraversable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
IterableOps

Attributes

Deprecated
[Since version 2.13.0] Use .view.slice(from, until) instead of .view(from, until)
Inherited from:
IterableOps