pub struct Pattern {
pub values: Vec<Ternary>,
}Expand description
A ternary pattern: a sequence of ternary values.
Fields§
§values: Vec<Ternary>Implementations§
Source§impl Pattern
impl Pattern
pub fn new(values: Vec<Ternary>) -> Self
Sourcepub fn symmetry(&self) -> f64
pub fn symmetry(&self) -> f64
Compute symmetry score: how well the pattern mirrors around its center. Returns 0.0 (no symmetry) to 1.0 (perfect symmetry).
Sourcepub fn complexity(&self) -> f64
pub fn complexity(&self) -> f64
Compute complexity: ratio of transitions between different values.
Trait Implementations§
impl Eq for Pattern
impl StructuralPartialEq for Pattern
Auto Trait Implementations§
impl Freeze for Pattern
impl RefUnwindSafe for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnsafeUnpin for Pattern
impl UnwindSafe for Pattern
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more