Edge

io.github.scala_tessella.ring_seq.SymmetryOps.Edge
See theEdge companion class
object Edge

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Edge.type

Members list

Value members

Concrete methods

def apply(i: Index, n: Int): Edge

Constructs the edge between consecutive elements of a circular sequence of size n, starting at circular index i. The endpoint j = ((i mod n) + 1) mod n is computed.

Constructs the edge between consecutive elements of a circular sequence of size n, starting at circular index i. The endpoint j = ((i mod n) + 1) mod n is computed.

Value parameters

i

circular index of the first endpoint (any IndexO, will be normalized to [0, n))

n

the ring size; must be positive

Attributes

Throws
IllegalArgumentException

if n <= 0