pub struct BooleanInnerProductAdd;Expand description
The inner product for slices containing Boolean elements.
Uses add or checked_add to sum the elements of the RHS that
correspond to true elements of the boolean slice.
Trait Implementations§
Source§impl<Rhs: Clone, Out: FromRef<Rhs> + CheckedAdd> InnerProduct<[Boolean], Rhs, Out> for BooleanInnerProductAdd
impl<Rhs: Clone, Out: FromRef<Rhs> + CheckedAdd> InnerProduct<[Boolean], Rhs, Out> for BooleanInnerProductAdd
Source§fn inner_product<const CHECK: bool>(
lhs: &[Boolean],
rhs: &[Rhs],
zero: Out,
) -> Result<Out, InnerProductError>
fn inner_product<const CHECK: bool>( lhs: &[Boolean], rhs: &[Rhs], zero: Out, ) -> Result<Out, InnerProductError>
Boolean inner product.
Auto Trait Implementations§
impl Freeze for BooleanInnerProductAdd
impl RefUnwindSafe for BooleanInnerProductAdd
impl Send for BooleanInnerProductAdd
impl Sync for BooleanInnerProductAdd
impl Unpin for BooleanInnerProductAdd
impl UnsafeUnpin for BooleanInnerProductAdd
impl UnwindSafe for BooleanInnerProductAdd
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> 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