pub struct MapExpr<E, F, S> { /* private fields */ }Expand description
Map expression - applies a function to each element
Trait Implementations§
Source§impl<E, F, S> TensorExpr for MapExpr<E, F, S>
impl<E, F, S> TensorExpr for MapExpr<E, F, S>
Source§fn eval(&self, index: usize) -> Self::Scalar
fn eval(&self, index: usize) -> Self::Scalar
Evaluate the expression at the given linear index Read more
Source§fn map<F, S>(self, f: F) -> MapExpr<Self, F, S>
fn map<F, S>(self, f: F) -> MapExpr<Self, F, S>
Map this expression to a new expression by applying a function
Source§fn reduce<F>(&self, init: Self::Scalar, f: F) -> Self::Scalar
fn reduce<F>(&self, init: Self::Scalar, f: F) -> Self::Scalar
Reduce this expression to a single value
Source§fn max(&self) -> Option<Self::Scalar>where
Self::Scalar: PartialOrd,
fn max(&self) -> Option<Self::Scalar>where
Self::Scalar: PartialOrd,
Find the maximum element in the expression
Source§fn min(&self) -> Option<Self::Scalar>where
Self::Scalar: PartialOrd,
fn min(&self) -> Option<Self::Scalar>where
Self::Scalar: PartialOrd,
Find the minimum element in the expression
Source§fn apply_to_slice(&self, output: &mut [Self::Scalar])
fn apply_to_slice(&self, output: &mut [Self::Scalar])
Apply the expression to a mutable slice Read more
impl<E: Copy, F: Copy, S: Copy> Copy for MapExpr<E, F, S>
Auto Trait Implementations§
impl<E, F, S> Freeze for MapExpr<E, F, S>
impl<E, F, S> RefUnwindSafe for MapExpr<E, F, S>
impl<E, F, S> Send for MapExpr<E, F, S>
impl<E, F, S> Sync for MapExpr<E, F, S>
impl<E, F, S> Unpin for MapExpr<E, F, S>
impl<E, F, S> UnsafeUnpin for MapExpr<E, F, S>where
E: UnsafeUnpin,
F: UnsafeUnpin,
impl<E, F, S> UnwindSafe for MapExpr<E, F, S>
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