Expand description
Coordinate system helpers for Clay codes
Clay codes use a 3D coordinate system (x, y, z) where:
- x: position within y-section (0 to q-1)
- y: y-section index (0 to t-1)
- z: layer/plane index (0 to α-1)
Key concepts:
- y-section: Nodes with the same y-coordinate
- Companion layer: For vertex (x, y, z), its companion is at layer z_sw
- Intersection Score (IS): Count of erased “red” vertices in a layer
- Plane vector: The z-coordinates that make up layer z (base-q representation)
Functions§
- get_
companion_ layer - Get the companion (swap) layer for a given vertex
- get_
max_ iscore - Get the maximum intersection score for a set of erased chunks
- get_
plane_ vector - Get the plane (layer) vector for a given z
- get_z_y
- Get the z_y value (y-th digit of z in base q)
- is_
unpaired - Check if a vertex is unpaired (red) in its layer
- node_
to_ xy - Convert node index to (x, y) coordinates
- set_
planes_ sequential_ decoding_ order - Set the decoding order for planes based on intersection score
- xy_
to_ node - Convert (x, y) coordinates to node index