pub struct BinaryExpr<L, R, Op> { /* private fields */ }Expand description
Binary operation expression
Represents a binary operation between two expressions
Implementations§
Source§impl<L, R, Op> BinaryExpr<L, R, Op>
impl<L, R, Op> BinaryExpr<L, R, Op>
Trait Implementations§
Source§impl<L, R> Add<R> for BinaryExpr<L, R, AddOp>
impl<L, R> Add<R> for BinaryExpr<L, R, AddOp>
Source§impl<L: Clone, R: Clone, Op: Clone> Clone for BinaryExpr<L, R, Op>
impl<L: Clone, R: Clone, Op: Clone> Clone for BinaryExpr<L, R, Op>
Source§fn clone(&self) -> BinaryExpr<L, R, Op>
fn clone(&self) -> BinaryExpr<L, R, Op>
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<L, R> Div<R> for BinaryExpr<L, R, DivOp>
impl<L, R> Div<R> for BinaryExpr<L, R, DivOp>
Source§impl<L, R> Mul<R> for BinaryExpr<L, R, MulOp>
impl<L, R> Mul<R> for BinaryExpr<L, R, MulOp>
Source§impl<L, R> Sub<R> for BinaryExpr<L, R, SubOp>
impl<L, R> Sub<R> for BinaryExpr<L, R, SubOp>
Source§impl<L, R> TensorExpr for BinaryExpr<L, R, AddOp>
impl<L, R> TensorExpr for BinaryExpr<L, R, AddOp>
Source§type Scalar = <L as TensorExpr>::Scalar
type Scalar = <L 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
Source§impl<L, R> TensorExpr for BinaryExpr<L, R, DivOp>
impl<L, R> TensorExpr for BinaryExpr<L, R, DivOp>
Source§type Scalar = <L as TensorExpr>::Scalar
type Scalar = <L 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
Source§impl<L, R> TensorExpr for BinaryExpr<L, R, MulOp>
impl<L, R> TensorExpr for BinaryExpr<L, R, MulOp>
Source§type Scalar = <L as TensorExpr>::Scalar
type Scalar = <L 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
Source§impl<L, R> TensorExpr for BinaryExpr<L, R, SubOp>
impl<L, R> TensorExpr for BinaryExpr<L, R, SubOp>
Source§type Scalar = <L as TensorExpr>::Scalar
type Scalar = <L 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<L: Copy, R: Copy, Op: Copy> Copy for BinaryExpr<L, R, Op>
Auto Trait Implementations§
impl<L, R, Op> Freeze for BinaryExpr<L, R, Op>
impl<L, R, Op> RefUnwindSafe for BinaryExpr<L, R, Op>
impl<L, R, Op> Send for BinaryExpr<L, R, Op>
impl<L, R, Op> Sync for BinaryExpr<L, R, Op>
impl<L, R, Op> Unpin for BinaryExpr<L, R, Op>
impl<L, R, Op> UnsafeUnpin for BinaryExpr<L, R, Op>where
L: UnsafeUnpin,
R: UnsafeUnpin,
impl<L, R, Op> UnwindSafe for BinaryExpr<L, R, Op>
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