flix

0.75.3

Orbit64.V2.State

Ranking of Orbit64 V2 cube states: the digit layout of FORMAT-V2.md.

A state is a Cube of orbit coordinates in the slot convention of V1. Its rank is the mixed-radix combination of one digit per component. Parity coupled components are not stored: they are recomputed on decoding.

Type Aliases

type alias Cube = { centers = Vector[Vector[Int32]], cornerPieces = Vector[Int32], cornerTwists = Vector[Int32], frame = Int32, midgeFlips = Vector[Int32], midgePieces = Vector[Int32], rotations = Vector[Int32], wings = Vector[Vector[Int32]] }§ Source

Orbit coordinates of one cube. Components a type lacks are left empty. The caller normalizes the pose first: fixed centers of odd cubes are implicitly home and frame carries the whole-cube orientation, which must be 0 unless the type is odd and framed. rotations holds r_U r_R r_F r_D r_L r_B and frame a frame rank.

Definitions

def centerOrbits(n: Int32): List[(Int32, Int32)]§ Source

The (row, column) names of the center orbits, ordered by lowest facelet.

def count(n: Int32, model: Model, pose: Pose): BigInt§ Source

The number of states of a type.

def rank(n: Int32, model: Model, pose: Pose, cube: Cube): Result[String, BigInt]§ Source

The rank of a valid state of the type, or the reason it is invalid.

def solved(n: Int32, model: Model): Cube§ Source

The solved state of a type: every digit is zero.

def unrank(n: Int32, model: Model, pose: Pose, value: BigInt): Cube§ Source

The state with the given rank. value must be in [0, count(n, model, pose)); this is not checked here, Orbit64.V2.Codec.decode does.

def wingOrbits(n: Int32): Int32§ Source

The number of wing orbits.