pub struct CubeSurfacePoint<const BIG_LUTS: bool>(pub CubeSurfacePoint);Expand description
A helper wrapper-type around a CubeSurfacePoint that operates using
look-up tables.
A luts::CubeSurfacePoint::<false> only has LUTs 48
bytes long, but might need more than one look-up for each operation. A
luts::CubeSurfacePoint::<true>, in contrast, has LUTs up to 2304 bytes
long, but only ever needs one look-up per operation.
Tuple Fields§
§0: CubeSurfacePointImplementations§
Source§impl<const BIG_LUTS: bool> CubeSurfacePoint<BIG_LUTS>
impl<const BIG_LUTS: bool> CubeSurfacePoint<BIG_LUTS>
Sourcepub const REFERENCE_POINT: Self
pub const REFERENCE_POINT: Self
Please refer to the ordinary
REFERENCE_POINT.
Sourcepub const fn direction(self) -> Direction
pub const fn direction(self) -> Direction
Please refer to the function of the same name in CubeSurfacePoint.
Source§impl CubeSurfacePoint<false>
impl CubeSurfacePoint<false>
Sourcepub const fn one_right_angle_cw(self) -> Self
pub const fn one_right_angle_cw(self) -> Self
Please refer to the function of the same name in the basic CubeSurfacePoint.
Sourcepub const fn one_right_angle_acw(self) -> Self
pub const fn one_right_angle_acw(self) -> Self
Please refer to the function of the same name in the basic CubeSurfacePoint.
Sourcepub const fn beside(self) -> Self
pub const fn beside(self) -> Self
Please refer to the function of the same name in the basic CubeSurfacePoint.
Sourcepub const fn opposite(self) -> Self
pub const fn opposite(self) -> Self
Please refer to the function of the same name in the basic CubeSurfacePoint.
Sourcepub const fn opposite_then_beside(self) -> Self
pub const fn opposite_then_beside(self) -> Self
Please refer to the function of the same name in the basic CubeSurfacePoint.
Sourcepub const fn flip_sign_of_2(self) -> Self
pub const fn flip_sign_of_2(self) -> Self
Please refer to the function of the same name in the basic CubeSurfacePoint.
Sourcepub const fn flip_2_and_3(self) -> Self
pub const fn flip_2_and_3(self) -> Self
Please refer to the function of the same name in the basic CubeSurfacePoint.
Sourcepub const fn n_right_angles<const CLOCKWISE: bool>(self, angle: u8) -> Self
pub const fn n_right_angles<const CLOCKWISE: bool>(self, angle: u8) -> Self
Please refer to the function of the same name
in CubeSurfacePoint.
Sourcepub const fn n_right_angles_acw(self, angle: u8) -> Self
pub const fn n_right_angles_acw(self, angle: u8) -> Self
Please refer to the function of the same name
in CubeSurfacePoint.
Sourcepub const fn n_right_angles_cw(self, angle: u8) -> Self
pub const fn n_right_angles_cw(self, angle: u8) -> Self
Please refer to the function of the same name
in CubeSurfacePoint.
Source§impl CubeSurfacePoint<true>
impl CubeSurfacePoint<true>
Sourcepub const fn one_right_angle_cw(self) -> Self
pub const fn one_right_angle_cw(self) -> Self
Please refer to the function of the same name in the basic CubeSurfacePoint.
Sourcepub const fn one_right_angle_acw(self) -> Self
pub const fn one_right_angle_acw(self) -> Self
Please refer to the function of the same name in the basic CubeSurfacePoint.
Sourcepub const fn beside(self) -> Self
pub const fn beside(self) -> Self
Please refer to the function of the same name in the basic CubeSurfacePoint.
Sourcepub const fn opposite(self) -> Self
pub const fn opposite(self) -> Self
Please refer to the function of the same name in the basic CubeSurfacePoint.
Sourcepub const fn opposite_then_beside(self) -> Self
pub const fn opposite_then_beside(self) -> Self
Please refer to the function of the same name in the basic CubeSurfacePoint.
Sourcepub const fn flip_sign_of_2(self) -> Self
pub const fn flip_sign_of_2(self) -> Self
Please refer to the function of the same name in the basic CubeSurfacePoint.
Sourcepub const fn flip_2_and_3(self) -> Self
pub const fn flip_2_and_3(self) -> Self
Please refer to the function of the same name in the basic CubeSurfacePoint.
Sourcepub const fn n_right_angles_cw(self, angle: u8) -> Self
pub const fn n_right_angles_cw(self, angle: u8) -> Self
Please refer to the function of the same name
in CubeSurfacePoint.
Sourcepub const fn n_right_angles_acw(self, angle: u8) -> Self
pub const fn n_right_angles_acw(self, angle: u8) -> Self
Please refer to the function of the same name
in CubeSurfacePoint.
Trait Implementations§
Source§impl<const BIG_LUTS: bool> Clone for CubeSurfacePoint<BIG_LUTS>
impl<const BIG_LUTS: bool> Clone for CubeSurfacePoint<BIG_LUTS>
Source§fn clone(&self) -> CubeSurfacePoint<BIG_LUTS>
fn clone(&self) -> CubeSurfacePoint<BIG_LUTS>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<const BIG_LUTS: bool> Debug for CubeSurfacePoint<BIG_LUTS>
impl<const BIG_LUTS: bool> Debug for CubeSurfacePoint<BIG_LUTS>
Source§impl Div for CubeSurfacePoint<false>
Extracts the rotation that must occur so that the divisor point ends
up coinciding with self, ie the dividend.
impl Div for CubeSurfacePoint<false>
Extracts the rotation that must occur so that the divisor point ends
up coinciding with self, ie the dividend.
Source§impl Div for CubeSurfacePoint<true>
Extracts the rotation that must occur so that the divisor point ends
up coinciding with self, ie the dividend.
impl Div for CubeSurfacePoint<true>
Extracts the rotation that must occur so that the divisor point ends
up coinciding with self, ie the dividend.
Source§impl<const BIG_LUTS: bool> From<CubeSurfacePoint<BIG_LUTS>> for CubeSurfacePoint
impl<const BIG_LUTS: bool> From<CubeSurfacePoint<BIG_LUTS>> for CubeSurfacePoint
Source§fn from(x: CubeSurfacePoint<BIG_LUTS>) -> Self
fn from(x: CubeSurfacePoint<BIG_LUTS>) -> Self
Source§impl From<CubeSurfacePoint<false>> for Rotation
impl From<CubeSurfacePoint<false>> for Rotation
Source§fn from(corresponding_point: CubeSurfacePoint<false>) -> Self
fn from(corresponding_point: CubeSurfacePoint<false>) -> Self
Source§impl From<CubeSurfacePoint<true>> for Rotation
impl From<CubeSurfacePoint<true>> for Rotation
Source§fn from(corresponding_point: CubeSurfacePoint<true>) -> Self
fn from(corresponding_point: CubeSurfacePoint<true>) -> Self
Source§impl<const BIG_LUTS: bool> From<CubeSurfacePoint> for CubeSurfacePoint<BIG_LUTS>
impl<const BIG_LUTS: bool> From<CubeSurfacePoint> for CubeSurfacePoint<BIG_LUTS>
Source§impl From<Rotation> for CubeSurfacePoint<false>
impl From<Rotation> for CubeSurfacePoint<false>
Source§impl From<Rotation> for CubeSurfacePoint<true>
impl From<Rotation> for CubeSurfacePoint<true>
Source§impl Mul<CubeSurfacePoint<false>> for Rotation
Rotates a copy of a given CubeSurfacePoint according to self.
impl Mul<CubeSurfacePoint<false>> for Rotation
Rotates a copy of a given CubeSurfacePoint according to self.
Source§impl Mul<CubeSurfacePoint<true>> for Rotation
Rotates a copy of a given CubeSurfacePoint according to self.
impl Mul<CubeSurfacePoint<true>> for Rotation
Rotates a copy of a given CubeSurfacePoint according to self.
Source§impl Mul<ImproperRotation> for CubeSurfacePoint<false>
Rotates a copy of self according to an ImproperRotation.
Switches Geometric Group.
impl Mul<ImproperRotation> for CubeSurfacePoint<false>
Rotates a copy of self according to an ImproperRotation.
Switches Geometric Group.
Source§type Output = CubeSurfacePoint<false>
type Output = CubeSurfacePoint<false>
Although the Geometric Group does change, CubeSurfacePoint does
not change its data-type depending on Geometric Group. Thus the
data-type remains the same.
Source§fn mul(self, x: ImproperRotation) -> Self
fn mul(self, x: ImproperRotation) -> Self
The rotation happens Elementary-Reflection-by-Elementary-Reflection as usual, but each Elementary Reflection is performed with a LUT.
Source§impl Mul<ImproperRotation> for CubeSurfacePoint<true>
Rotates a copy of self according to an ImproperRotation. Switches
Geometric Group.
impl Mul<ImproperRotation> for CubeSurfacePoint<true>
Rotates a copy of self according to an ImproperRotation. Switches
Geometric Group.
Source§type Output = CubeSurfacePoint<true>
type Output = CubeSurfacePoint<true>
Although the Geometric Group does change, CubeSurfacePoint does not
change its data-type depending on Geometric Group. Thus the data-type
remains the same.
Source§fn mul(self, x: ImproperRotation) -> Self
fn mul(self, x: ImproperRotation) -> Self
The ImproperRotation is not examined bit-by-bit. Instead, a
look-up on a 2-D LUT produces the result directly.
While this could have been implemented using smaller LUTs than the
ones
used for Mul<Rotation>, it was deemed a useless middle solution.
Source§impl Mul<ProperRotation> for CubeSurfacePoint<false>
Rotates a copy of self according to a ProperRotation.
Maintains Geometric Group.
impl Mul<ProperRotation> for CubeSurfacePoint<false>
Rotates a copy of self according to a ProperRotation.
Maintains Geometric Group.
Source§type Output = CubeSurfacePoint<false>
type Output = CubeSurfacePoint<false>
The Geometric Group doesn’t change. Even if it did, this data-type is group-agnostic.
Source§fn mul(self, x: ProperRotation) -> Self
fn mul(self, x: ProperRotation) -> Self
The rotation happens Elementary-Reflection-by-Elementary-Reflection as usual, but each Elementary Reflection is performed with a LUT.
Source§impl Mul<ProperRotation> for CubeSurfacePoint<true>
Rotates a copy of self according to a ProperRotation.
Maintains Geometric Group.
impl Mul<ProperRotation> for CubeSurfacePoint<true>
Rotates a copy of self according to a ProperRotation.
Maintains Geometric Group.
Source§type Output = CubeSurfacePoint<true>
type Output = CubeSurfacePoint<true>
The Geometric Group doesn’t change. Even if it did, this data-type is group-agnostic.
Source§fn mul(self, x: ProperRotation) -> Self
fn mul(self, x: ProperRotation) -> Self
The ProperRotation is not examined bit-by-bit. Instead, a look-up
on a 2-D LUT produces the result directly.
While this could have been implemented using smaller LUTs than the
ones used for Mul<Rotation>, it was deemed a useless middle
solution.
Source§impl Mul<Rotation> for CubeSurfacePoint<false>
Rotates a copy of self according to a Rotation.
impl Mul<Rotation> for CubeSurfacePoint<false>
Rotates a copy of self according to a Rotation.
Source§type Output = CubeSurfacePoint<false>
type Output = CubeSurfacePoint<false>
We use the most general data-type possible, so the output does not change.
Source§impl Mul<Rotation> for CubeSurfacePoint<true>
Rotates a copy of self according to a Rotation.
impl Mul<Rotation> for CubeSurfacePoint<true>
Rotates a copy of self according to a Rotation.
Source§impl MulAssign<ImproperRotation> for CubeSurfacePoint<false>
Rotates self according to a ImproperRotation. Switches Geometric
Group.
impl MulAssign<ImproperRotation> for CubeSurfacePoint<false>
Rotates self according to a ImproperRotation. Switches Geometric
Group.
Source§fn mul_assign(&mut self, x: ImproperRotation)
fn mul_assign(&mut self, x: ImproperRotation)
The data-type remains the same, despite the Geometric Group changing. Thus, the result can be directly assigned.
The ImproperRotation is not examined bit-by-bit. Instead, a
look-up on a 2-D LUT produces the result directly.
While this could have been implemented using smaller LUTs than the
ones
used for Mul<Rotation>, it was deemed a useless middle solution.
Source§impl MulAssign<ImproperRotation> for CubeSurfacePoint<true>
Rotates self according to an ImproperRotation. Switches Geometric
Group.
impl MulAssign<ImproperRotation> for CubeSurfacePoint<true>
Rotates self according to an ImproperRotation. Switches Geometric
Group.
Source§fn mul_assign(&mut self, x: ImproperRotation)
fn mul_assign(&mut self, x: ImproperRotation)
The data-type remains the same, despite the Geometric Group changing. Thus, the result can be directly assigned.
The ImproperRotation is not examined bit-by-bit. Instead, a
look-up on a 2-D LUT produces the result directly.
While this could have been implemented using smaller LUTs than the
ones
used for Mul<Rotation>, it was deemed a useless middle solution.
Source§impl MulAssign<ProperRotation> for CubeSurfacePoint<false>
Rotates self according to a ProperRotation. Maintains Geometric
Group.
impl MulAssign<ProperRotation> for CubeSurfacePoint<false>
Rotates self according to a ProperRotation. Maintains Geometric
Group.
Source§fn mul_assign(&mut self, x: ProperRotation)
fn mul_assign(&mut self, x: ProperRotation)
Neither the Geometric Group nor the data-type change, so the result can be directly assigned.
The ProperRotation is not examined bit-by-bit. Instead, a
look-up on a 2-D LUT produces the result directly.
While this could have been implemented using smaller LUTs than the
ones
used for Mul<Rotation>, it was deemed a useless middle solution.
Source§impl MulAssign<ProperRotation> for CubeSurfacePoint<true>
Rotates self according to a ProperRotation. Maintains Geometric
Group.
impl MulAssign<ProperRotation> for CubeSurfacePoint<true>
Rotates self according to a ProperRotation. Maintains Geometric
Group.
Source§fn mul_assign(&mut self, x: ProperRotation)
fn mul_assign(&mut self, x: ProperRotation)
Neither the Geometric Group nor the data-type change, so the result can be directly assigned.
The ProperRotation is not examined bit-by-bit. Instead, a
look-up on a 2-D LUT produces the result directly.
While this could have been implemented using smaller LUTs than the
ones
used for Mul<Rotation>, it was deemed a useless middle solution.
Source§impl MulAssign<Rotation> for CubeSurfacePoint<false>
Rotates self according to a Rotation.
impl MulAssign<Rotation> for CubeSurfacePoint<false>
Rotates self according to a Rotation.
Source§fn mul_assign(&mut self, rot: Rotation)
fn mul_assign(&mut self, rot: Rotation)
We use the most general data-type possible, so the output does not change. Thus, it can be directly assigned.
The rotation happens Elementary-Reflection-by-Elementary-Reflection as usual, but each Elementary Reflection is performed with a LUT.
Source§impl MulAssign<Rotation> for CubeSurfacePoint<true>
Rotates self according to a Rotation.
impl MulAssign<Rotation> for CubeSurfacePoint<true>
Rotates self according to a Rotation.
Source§fn mul_assign(&mut self, rot: Rotation)
fn mul_assign(&mut self, rot: Rotation)
We use the most general data-type possible, so the output does not change. Thus, it can be directly assigned.
The Rotation is not examined bit-by-bit. Instead, a look-up on a
2-D LUT produces the result directly.
Source§impl OctahedrallySymmetricPoint for CubeSurfacePoint<false>
impl OctahedrallySymmetricPoint for CubeSurfacePoint<false>
Source§type OtherGroup = CubeSurfacePoint<false>
type OtherGroup = CubeSurfacePoint<false>
self belongs.Source§fn beside(self) -> Self::OtherGroup
fn beside(self) -> Self::OtherGroup
Source§fn opposite(self) -> Self::OtherGroup
fn opposite(self) -> Self::OtherGroup
Source§fn opposite_then_beside(self) -> Self
fn opposite_then_beside(self) -> Self
self.opposite().beside(). Also available
with the words swapped, as the order doesn’t matter. Read moreSource§fn one_right_angle_cw(self) -> Self
fn one_right_angle_cw(self) -> Self
self, as viewed from the face on which both are located.Source§fn one_right_angle_acw(self) -> Self
fn one_right_angle_acw(self) -> Self
self, as viewed from the face on which both are located.Source§fn flip_sign_of_2(self) -> Self::OtherGroup
fn flip_sign_of_2(self) -> Self::OtherGroup
Source§fn flip_2_and_3(self) -> Self
fn flip_2_and_3(self) -> Self
Source§fn n_right_angles_cw(self, angle: u8) -> Self
fn n_right_angles_cw(self, angle: u8) -> Self
self, as viewed from the face on which both are located.Source§fn n_right_angles_acw(self, angle: u8) -> Self
fn n_right_angles_acw(self, angle: u8) -> Self
self, as viewed from the face on which both are located.Source§fn odd_ones(self) -> bool
fn odd_ones(self) -> bool
Source§fn even_ones(self) -> bool
fn even_ones(self) -> bool
Self::odd_ones by definition.Source§fn n_right_angles<const CLOCKWISE: bool>(self, angle: u8) -> Self
fn n_right_angles<const CLOCKWISE: bool>(self, angle: u8) -> Self
self, as viewed from the face on which both are located.Source§fn beside_then_opposite(self) -> Self
fn beside_then_opposite(self) -> Self
CubeSurfacePoint::opposite_then_beside. Read moreSource§fn flip_1_and_3(self) -> Self
fn flip_1_and_3(self) -> Self
CubeSurfacePoint::opposite_then_beside. Read moreSource§fn flip_sign_of_1(self) -> Self::OtherGroup
fn flip_sign_of_1(self) -> Self::OtherGroup
CubeSurfacePoint::besideSource§fn flip_sign_of_3(self) -> Self::OtherGroup
fn flip_sign_of_3(self) -> Self::OtherGroup
CubeSurfacePoint::oppositeSource§fn flip_1_and_2(self) -> Self
fn flip_1_and_2(self) -> Self
Source§impl OctahedrallySymmetricPoint for CubeSurfacePoint<true>
impl OctahedrallySymmetricPoint for CubeSurfacePoint<true>
Source§type OtherGroup = CubeSurfacePoint<true>
type OtherGroup = CubeSurfacePoint<true>
self belongs.Source§fn beside(self) -> Self::OtherGroup
fn beside(self) -> Self::OtherGroup
Source§fn opposite(self) -> Self::OtherGroup
fn opposite(self) -> Self::OtherGroup
Source§fn opposite_then_beside(self) -> Self
fn opposite_then_beside(self) -> Self
self.opposite().beside(). Also available
with the words swapped, as the order doesn’t matter. Read moreSource§fn one_right_angle_cw(self) -> Self
fn one_right_angle_cw(self) -> Self
self, as viewed from the face on which both are located.Source§fn one_right_angle_acw(self) -> Self
fn one_right_angle_acw(self) -> Self
self, as viewed from the face on which both are located.Source§fn flip_sign_of_2(self) -> Self::OtherGroup
fn flip_sign_of_2(self) -> Self::OtherGroup
Source§fn flip_2_and_3(self) -> Self
fn flip_2_and_3(self) -> Self
Source§fn n_right_angles_cw(self, angle: u8) -> Self
fn n_right_angles_cw(self, angle: u8) -> Self
self, as viewed from the face on which both are located.Source§fn n_right_angles_acw(self, angle: u8) -> Self
fn n_right_angles_acw(self, angle: u8) -> Self
self, as viewed from the face on which both are located.Source§fn odd_ones(self) -> bool
fn odd_ones(self) -> bool
Source§fn even_ones(self) -> bool
fn even_ones(self) -> bool
Self::odd_ones by definition.Source§fn n_right_angles<const CLOCKWISE: bool>(self, angle: u8) -> Self
fn n_right_angles<const CLOCKWISE: bool>(self, angle: u8) -> Self
self, as viewed from the face on which both are located.Source§fn beside_then_opposite(self) -> Self
fn beside_then_opposite(self) -> Self
CubeSurfacePoint::opposite_then_beside. Read moreSource§fn flip_1_and_3(self) -> Self
fn flip_1_and_3(self) -> Self
CubeSurfacePoint::opposite_then_beside. Read moreSource§fn flip_sign_of_1(self) -> Self::OtherGroup
fn flip_sign_of_1(self) -> Self::OtherGroup
CubeSurfacePoint::besideSource§fn flip_sign_of_3(self) -> Self::OtherGroup
fn flip_sign_of_3(self) -> Self::OtherGroup
CubeSurfacePoint::opposite