pub struct ScalarProduct;Expand description
The inner product for vectors of length 1 (a.k.a. scalars).
Uses mul_by_scalar to multiply the only components of vectors
to get the result.
Trait Implementations§
Source§impl Clone for ScalarProduct
impl Clone for ScalarProduct
Source§fn clone(&self) -> ScalarProduct
fn clone(&self) -> ScalarProduct
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 ScalarProduct
impl Debug for ScalarProduct
Source§impl<Lhs, Rhs, Out> InnerProduct<Lhs, Rhs, Out> for ScalarProduct
impl<Lhs, Rhs, Out> InnerProduct<Lhs, Rhs, Out> for ScalarProduct
Source§fn inner_product<const CHECK: bool>(
lhs: &Lhs,
point: &[Rhs],
_zero: Out,
) -> Result<Out, InnerProductError>
fn inner_product<const CHECK: bool>( lhs: &Lhs, point: &[Rhs], _zero: Out, ) -> Result<Out, InnerProductError>
A scalar inner product. Assumes Lhs is a scalar type
and always asserts that point has only one component.
Auto Trait Implementations§
impl Freeze for ScalarProduct
impl RefUnwindSafe for ScalarProduct
impl Send for ScalarProduct
impl Sync for ScalarProduct
impl Unpin for ScalarProduct
impl UnsafeUnpin for ScalarProduct
impl UnwindSafe for ScalarProduct
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more