pub struct ArrayExpr<'a, T: Copy> { /* private fields */ }Expand description
Array reference expression
Wraps a slice for use in expression templates
Implementations§
Trait Implementations§
Source§impl<'a, T: Copy> TensorExpr for ArrayExpr<'a, T>
impl<'a, T: Copy> TensorExpr for ArrayExpr<'a, T>
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<'a, T: Copy + Copy> Copy for ArrayExpr<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for ArrayExpr<'a, T>
impl<'a, T> RefUnwindSafe for ArrayExpr<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for ArrayExpr<'a, T>where
T: Sync,
impl<'a, T> Sync for ArrayExpr<'a, T>where
T: Sync,
impl<'a, T> Unpin for ArrayExpr<'a, T>
impl<'a, T> UnsafeUnpin for ArrayExpr<'a, T>
impl<'a, T> UnwindSafe for ArrayExpr<'a, 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
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