pub enum KleinElement {
Identity,
A,
B,
C,
}Expand description
Klein four-group: V₄ = {e, a, b, c} with every element its own inverse.
Used in the product construction of G₂.
§Examples
use atlas_embeddings::foundations::primitives::KleinElement;
let a = KleinElement::A;
let b = KleinElement::B;
// Group operation
let c = a.multiply(b);
assert_eq!(c, KleinElement::C);
// Every element is its own inverse
assert_eq!(a.multiply(a), KleinElement::Identity);Variants§
Implementations§
Trait Implementations§
Source§impl Clone for KleinElement
impl Clone for KleinElement
Source§fn clone(&self) -> KleinElement
fn clone(&self) -> KleinElement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KleinElement
impl Debug for KleinElement
Source§impl Hash for KleinElement
impl Hash for KleinElement
Source§impl PartialEq for KleinElement
impl PartialEq for KleinElement
impl Copy for KleinElement
impl Eq for KleinElement
impl StructuralPartialEq for KleinElement
Auto Trait Implementations§
impl Freeze for KleinElement
impl RefUnwindSafe for KleinElement
impl Send for KleinElement
impl Sync for KleinElement
impl Unpin for KleinElement
impl UnwindSafe for KleinElement
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