SymmetryOps

io.github.scala_tessella.ring_seq.SymmetryOps
See theSymmetryOps companion trait
object SymmetryOps extends IndexingOps

Attributes

Companion
trait
Graph
Supertypes
trait IndexingOps
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

sealed trait AxisLocation

A location on the circular sequence where a symmetry axis can pass through.

A location on the circular sequence where a symmetry axis can pass through.

  • Vertex: The axis passes directly through the element at this index.
  • Edge: The axis passes between the elements at these indices.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Edge
class Vertex
sealed abstract case class Edge(i: Index, j: Index) extends AxisLocation

The location between two consecutive elements of a circular sequence.

The location between two consecutive elements of a circular sequence.

The invariant j == (i + 1) mod n is enforced — direct construction is forbidden. Use Edge.apply to build instances; pattern matching with case Edge(i, j) => ... still works.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait AxisLocation
class Object
trait Matchable
class Any
Show all
object Edge

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Edge.type
case class Vertex(i: Index) extends AxisLocation

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait AxisLocation
class Object
trait Matchable
class Any
Show all

Inherited types

type Index = Int

For improved readability, the index of a Seq.

For improved readability, the index of a Seq.

Attributes

Inherited from:
IndexingOps
type IndexO = Int

For improved readability, the index of a circular Seq.

For improved readability, the index of a circular Seq.

Attributes

Note

any value is a valid index, provided that Seq is not empty

Inherited from:
IndexingOps

Extensions

Inherited extensions

extension [A, CC <: (SeqOps)](ring: CC[A])
def applyO(i: IndexO): A

Gets the element at some circular index.

Gets the element at some circular index.

Value parameters

i

IndexO

Attributes

Throws
java.lang.ArithmeticException

if Seq is empty

Example
Seq(0, 1, 2).applyO(3) // 0
Inherited from:
IndexingOps

Normalize a given index of a circular Seq

Normalize a given index of a circular Seq

Value parameters

i

IndexO

Attributes

Inherited from:
IndexingOps