Skip to main content

AddMulOperation

Struct AddMulOperation 

Source
pub struct AddMulOperation<T>
where T: DotProduct + One,
{ _marker: PhantomData<fn() -> T>, }
Expand description

$+,\times$

Fields§

§_marker: PhantomData<fn() -> T>

Trait Implementations§

Source§

impl<T> SemiRing for AddMulOperation<T>
where T: DotProduct + One,

Source§

type T = T

Source§

type Additive = AdditiveOperation<T>

Source§

type Multiplicative = MultiplicativeOperation<T>

Source§

fn try_matrix_product(a: &[Vec<T>], b: &[Vec<T>]) -> Option<Vec<Vec<T>>>

Source§

fn dot_product(x: &[Self::T], y: &[Self::T]) -> Self::T

Source§

fn add_scaled_assign(x: &mut [Self::T], y: &[Self::T], a: &Self::T)

Source§

fn zero() -> Self::T

additive identity: $0$
Source§

fn is_zero(x: &Self::T) -> bool
where Self::T: PartialEq,

Source§

fn one() -> Self::T

multiplicative identity: $1$
Source§

fn is_one(x: &Self::T) -> bool
where Self::T: PartialEq,

Source§

fn add(x: &Self::T, y: &Self::T) -> Self::T

additive operaion: $+$
Source§

fn mul(x: &Self::T, y: &Self::T) -> Self::T

multiplicative operaion: $+$
Source§

fn add_assign(x: &mut Self::T, y: &Self::T)

Source§

fn mul_assign(x: &mut Self::T, y: &Self::T)

Auto Trait Implementations§

§

impl<T> Freeze for AddMulOperation<T>
where PhantomData<fn() -> T>: Freeze,

§

impl<T> RefUnwindSafe for AddMulOperation<T>
where PhantomData<fn() -> T>: RefUnwindSafe,

§

impl<T> Send for AddMulOperation<T>
where PhantomData<fn() -> T>: Send,

§

impl<T> Sync for AddMulOperation<T>
where PhantomData<fn() -> T>: Sync,

§

impl<T> Unpin for AddMulOperation<T>
where PhantomData<fn() -> T>: Unpin,

§

impl<T> UnsafeUnpin for AddMulOperation<T>
where PhantomData<fn() -> T>: UnsafeUnpin,

§

impl<T> UnwindSafe for AddMulOperation<T>
where PhantomData<fn() -> T>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<F> Field for F

Source§

fn inv(x: &Self::T) -> Self::T

multiplicative inverse: $-$
Source§

fn div(x: &Self::T, y: &Self::T) -> Self::T

multiplicative right inversed operaion: $-$
Source§

fn div_assign(x: &mut Self::T, y: &Self::T)

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<R> Ring for R
where R: SemiRing, <R as SemiRing>::Additive: Invertible,

Source§

fn neg(x: &Self::T) -> Self::T

additive inverse: $-$
Source§

fn sub(x: &Self::T, y: &Self::T) -> Self::T

additive right inversed operaion: $-$
Source§

fn sub_assign(x: &mut Self::T, y: &Self::T)

Source§

impl<T> ToArrayVecScalar for T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.