pub enum FreeInv<T: Eq> {
Id(T),
Inv(T),
}Expand description
Wraps a type T and symbolically inverts elements.
Used for constructing FreeGroup
Variants§
Implementations§
Source§impl<T: Eq> FreeInv<T>
impl<T: Eq> FreeInv<T>
Sourcepub fn is_inv(&self) -> bool
pub fn is_inv(&self) -> bool
Returns true if self is inverted
use free_algebra::FreeInv::*;
assert!(Inv('a').is_inv());
assert!(!Id('a').is_inv());Sourcepub fn is_id(&self) -> bool
pub fn is_id(&self) -> bool
Returns true if self is non-inverted
use free_algebra::FreeInv::*;
assert!(Id('a').is_id());
assert!(!Inv('a').is_id());Trait Implementations§
Source§impl<T: Eq> AsMut<T> for FreeInv<T>
Provides a mutable reference to this type’s inner T
impl<T: Eq> AsMut<T> for FreeInv<T>
Provides a mutable reference to this type’s inner T
Note that this does not convey any information regarding the state of inversion
Source§impl<T: Eq> AsRef<T> for FreeInv<T>
Provides a reference to this type’s inner T
impl<T: Eq> AsRef<T> for FreeInv<T>
Provides a reference to this type’s inner T
Note that this does not convey any information regarding the state of inversion
Source§impl<T: Eq> MonoidRule<FreeInv<T>> for InvRule
impl<T: Eq> MonoidRule<FreeInv<T>> for InvRule
impl<T: Eq> AssociativeMonoidRule<FreeInv<T>> for InvRule
impl<T: Copy + Eq> Copy for FreeInv<T>
impl<T: Eq + Eq> Eq for FreeInv<T>
impl<T: Eq> StructuralPartialEq for FreeInv<T>
Auto Trait Implementations§
impl<T> Freeze for FreeInv<T>where
T: Freeze,
impl<T> RefUnwindSafe for FreeInv<T>where
T: RefUnwindSafe,
impl<T> Send for FreeInv<T>where
T: Send,
impl<T> Sync for FreeInv<T>where
T: Sync,
impl<T> Unpin for FreeInv<T>where
T: Unpin,
impl<T> UnwindSafe for FreeInv<T>where
T: UnwindSafe,
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