Attributes
- Companion
- trait
- Graph
-
- Supertypes
- Self type
-
SymmetryOps.type
Members list
Type members
Classlikes
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 Objecttrait Matchableclass Any
- Known subtypes
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 Serializabletrait Producttrait Equalstrait AxisLocationclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait AxisLocationclass Objecttrait Matchableclass AnyShow all
Inherited types
For improved readability, the index of a Seq.
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
Seqis not empty - Inherited from:
- IndexingOps
Extensions
Inherited extensions
Gets the element at some circular index.
Gets the element at some circular index.
Value parameters
- i
Attributes
- Throws
-
java.lang.ArithmeticException
if
Seqis empty - Example
-
Seq(0, 1, 2).applyO(3) // 0 - Inherited from:
- IndexingOps
Normalize a given index of a circular Seq
Finds the circular index of the first element equal to a given value, searching circularly from a given circular index (the circular version of indexOf).
Finds the circular index of the first element equal to a given value, searching circularly from a given circular index (the circular version of indexOf).
The whole ring is searched, wrapping past the end back to the start.
Value parameters
- elem
-
the element value to search for
- from
Attributes
- Returns
-
the Index in
[0, size)of the first element found at or after circular index ''from'', or -1 if the element is not in the sequence. - Example
-
Seq(0, 1, 2).indexOfO(0, 1) // 0 - Inherited from:
- IndexingOps
Optionally gets the element at some circular index (the circular version of lift).
Optionally gets the element at some circular index (the circular version of lift).
Since every circular index is valid on a non-empty sequence, this returns None only when the sequence is empty.
Value parameters
- i
Attributes
- Example
-
Seq(0, 1, 2).liftO(3) // Some(0) Seq.empty[Int].liftO(0) // None - Inherited from:
- IndexingOps