pub struct NegExpr<E> { /* private fields */ }Expand description
Unary negation expression
Implementations§
Trait Implementations§
Source§impl<E> TensorExpr for NegExpr<E>
impl<E> TensorExpr for NegExpr<E>
Source§type Scalar = <E as TensorExpr>::Scalar
type Scalar = <E as TensorExpr>::Scalar
The scalar type of the expression result
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> Copy for NegExpr<E>
Auto Trait Implementations§
impl<E> Freeze for NegExpr<E>where
E: Freeze,
impl<E> RefUnwindSafe for NegExpr<E>where
E: RefUnwindSafe,
impl<E> Send for NegExpr<E>where
E: Send,
impl<E> Sync for NegExpr<E>where
E: Sync,
impl<E> Unpin for NegExpr<E>where
E: Unpin,
impl<E> UnsafeUnpin for NegExpr<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for NegExpr<E>where
E: UnwindSafe,
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