pub struct Dyadic<T> { /* private fields */ }Expand description
Finally a dyadic number (Mono + … + Mono) / Bin Dyadic(Set(), Bin::lit(0)) = Dyadic(Set(Mono::lit(0)), Bin::lit(0)) = 0
Implementations§
Source§impl<T: Ord> Dyadic<T>
impl<T: Ord> Dyadic<T>
pub fn lit(i: i32) -> Self
pub fn var(v: T) -> Self
pub fn bin(b: Bin<T>) -> Self
pub fn unit_add() -> Self
pub fn unit_mul() -> Self
pub fn neg(self) -> Self
pub fn double(self) -> Selfwhere
T: Clone,
pub fn half(self) -> Selfwhere
T: Clone,
pub fn div_bin(&self, other: &Bin<T>) -> Selfwhere
T: Clone,
Trait Implementations§
Source§impl<T: Ord + Clone> AddAssign<Bin<T>> for Dyadic<T>
impl<T: Ord + Clone> AddAssign<Bin<T>> for Dyadic<T>
Source§fn add_assign(&mut self, other: Bin<T>)
fn add_assign(&mut self, other: Bin<T>)
Performs the
+= operation. Read moreSource§impl<T: Ord + Clone> AddAssign<Mono<T>> for Dyadic<T>
Addition of dyadic numbers
impl<T: Ord + Clone> AddAssign<Mono<T>> for Dyadic<T>
Addition of dyadic numbers
Source§fn add_assign(&mut self, other: Mono<T>)
fn add_assign(&mut self, other: Mono<T>)
Performs the
+= operation. Read moreSource§impl<T: Ord + Clone> AddAssign<i32> for Dyadic<T>
impl<T: Ord + Clone> AddAssign<i32> for Dyadic<T>
Source§fn add_assign(&mut self, other: i32)
fn add_assign(&mut self, other: i32)
Performs the
+= operation. Read moreSource§impl<T: Ord + Clone> AddAssign for Dyadic<T>
impl<T: Ord + Clone> AddAssign for Dyadic<T>
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+= operation. Read moreSource§impl<T: Ord> DivAssign<Bin<T>> for Dyadic<T>
Division of dyadic numbers by binary powers
impl<T: Ord> DivAssign<Bin<T>> for Dyadic<T>
Division of dyadic numbers by binary powers
Source§fn div_assign(&mut self, other: Bin<T>)
fn div_assign(&mut self, other: Bin<T>)
Performs the
/= operation. Read moreSource§impl<T: Ord + Clone> MulAssign<Bin<T>> for Dyadic<T>
impl<T: Ord + Clone> MulAssign<Bin<T>> for Dyadic<T>
Source§fn mul_assign(&mut self, other: Bin<T>)
fn mul_assign(&mut self, other: Bin<T>)
Performs the
*= operation. Read moreSource§impl<T: Ord + Clone> MulAssign<Mono<T>> for Dyadic<T>
Multiplication of dyadic numbers
impl<T: Ord + Clone> MulAssign<Mono<T>> for Dyadic<T>
Multiplication of dyadic numbers
Source§fn mul_assign(&mut self, other: Mono<T>)
fn mul_assign(&mut self, other: Mono<T>)
Performs the
*= operation. Read moreSource§impl<T: Ord + Clone> MulAssign<i32> for Dyadic<T>
impl<T: Ord + Clone> MulAssign<i32> for Dyadic<T>
Source§fn mul_assign(&mut self, other: i32)
fn mul_assign(&mut self, other: i32)
Performs the
*= operation. Read moreSource§impl<T: Ord + Clone> MulAssign for Dyadic<T>
impl<T: Ord + Clone> MulAssign for Dyadic<T>
Source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*= operation. Read moreSource§impl<'a, D, A, T> Pretty<'a, D, A> for Dyadic<T>
Pretty printing, display and Arbitrary for Dyadic
impl<'a, D, A, T> Pretty<'a, D, A> for Dyadic<T>
Pretty printing, display and Arbitrary for Dyadic
Source§fn pretty(self, allocator: &'a D) -> DocBuilder<'a, D, A>
fn pretty(self, allocator: &'a D) -> DocBuilder<'a, D, A>
Converts
self into a documentSource§impl<T: Ord + Clone> SubAssign<Bin<T>> for Dyadic<T>
impl<T: Ord + Clone> SubAssign<Bin<T>> for Dyadic<T>
Source§fn sub_assign(&mut self, other: Bin<T>)
fn sub_assign(&mut self, other: Bin<T>)
Performs the
-= operation. Read moreSource§impl<T: Ord + Clone> SubAssign<Mono<T>> for Dyadic<T>
Subtraction of dyadic numbers
impl<T: Ord + Clone> SubAssign<Mono<T>> for Dyadic<T>
Subtraction of dyadic numbers
Source§fn sub_assign(&mut self, other: Mono<T>)
fn sub_assign(&mut self, other: Mono<T>)
Performs the
-= operation. Read moreSource§impl<T: Ord + Clone> SubAssign<i32> for Dyadic<T>
impl<T: Ord + Clone> SubAssign<i32> for Dyadic<T>
Source§fn sub_assign(&mut self, other: i32)
fn sub_assign(&mut self, other: i32)
Performs the
-= operation. Read moreSource§impl<T: Ord + Clone> SubAssign for Dyadic<T>
impl<T: Ord + Clone> SubAssign for Dyadic<T>
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-= operation. Read moreimpl<T: Eq> Eq for Dyadic<T>
impl<T> StructuralPartialEq for Dyadic<T>
Auto Trait Implementations§
impl<T> Freeze for Dyadic<T>
impl<T> RefUnwindSafe for Dyadic<T>where
T: RefUnwindSafe,
impl<T> Send for Dyadic<T>where
T: Send,
impl<T> Sync for Dyadic<T>where
T: Sync,
impl<T> Unpin for Dyadic<T>
impl<T> UnwindSafe for Dyadic<T>where
T: RefUnwindSafe,
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