[−][src]Enum rlifesrc_lib::Symmetry
Symmetries of the pattern.
10 different values corresponds to 10 subgroups of the dihedral group D8.
The notation is stolen from Oscar Cunningham's Logic Life Search.
Some of the symmetries are only valid when the world is square.
Variants
C1
.
No symmetry at all.
C2
.
Symmetry under 180° rotation.
C4
.
Symmetry under 90° rotation.
D2-
.
Symmetry under reflection across the middle row.
D2|
.
Symmetry under reflection across the middle column.
D2\
.
Symmetry under reflection across the diagonal.
D2/
.
Symmetry under reflection across the antidiagonal.
D4+
.
Symmetry under reflections across the middle row and the middle column.
D4X
.
Symmetry under reflections across the diagonal and the antidiagonal.
D8
.
Symmetry under all 8 transformations.
Methods
impl Symmetry
[src]
pub fn square_world(self) -> bool
[src]
Whether the transformation requires the world to be square.
Returns true
for C4
, D2\
, D2/
, D4X
and D8
.
Trait Implementations
impl Clone for Symmetry
[src]
impl Copy for Symmetry
[src]
impl Default for Symmetry
[src]
The default symmetry is the C1
.
impl PartialEq<Symmetry> for Symmetry
[src]
impl Debug for Symmetry
[src]
impl FromStr for Symmetry
[src]
type Err = String
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl StructuralPartialEq for Symmetry
[src]
Auto Trait Implementations
impl Send for Symmetry
impl Sync for Symmetry
impl Unpin for Symmetry
impl UnwindSafe for Symmetry
impl RefUnwindSafe for Symmetry
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,