pub trait Arithmetic<Op, Rhs = Self> {
type Output;
// Required method
fn eval(self, rhs: Rhs) -> Self::Output;
}Expand description
Trait for arithmetic operations.
Required Associated Types§
Required Methods§
Implementations on Foreign Types§
Source§impl<Op> Arithmetic<Op> for PrimitiveDatumwhere
for<'a, 'a> &'a PrimitiveScalar: Arithmetic<Op, &'a PrimitiveScalar, Output = PrimitiveScalar> + Arithmetic<Op, PrimitiveVector, Output = PrimitiveDatum>,
for<'a, 'a> PrimitiveVector: Arithmetic<Op, &'a PrimitiveVector, Output = PrimitiveVector> + Arithmetic<Op, &'a PrimitiveScalar, Output = PrimitiveDatum>,
impl<Op> Arithmetic<Op> for PrimitiveDatumwhere
for<'a, 'a> &'a PrimitiveScalar: Arithmetic<Op, &'a PrimitiveScalar, Output = PrimitiveScalar> + Arithmetic<Op, PrimitiveVector, Output = PrimitiveDatum>,
for<'a, 'a> PrimitiveVector: Arithmetic<Op, &'a PrimitiveVector, Output = PrimitiveVector> + Arithmetic<Op, &'a PrimitiveScalar, Output = PrimitiveDatum>,
type Output = PrimitiveDatum
fn eval(self, rhs: PrimitiveDatum) -> Self::Output
Source§impl<Op> Arithmetic<Op, &PrimitiveScalar> for &PrimitiveScalar
impl<Op> Arithmetic<Op, &PrimitiveScalar> for &PrimitiveScalar
type Output = PrimitiveScalar
fn eval(self, rhs: &PrimitiveScalar) -> Self::Output
Source§impl<Op> Arithmetic<Op, &PrimitiveScalar> for PrimitiveVector
Vector on LHS, Scalar on RHS - modifies vector in place.
Returns a scalar if the input scalar is null.
impl<Op> Arithmetic<Op, &PrimitiveScalar> for PrimitiveVector
Vector on LHS, Scalar on RHS - modifies vector in place. Returns a scalar if the input scalar is null.
type Output = PrimitiveDatum
fn eval(self, rhs: &PrimitiveScalar) -> Self::Output
Source§impl<Op> Arithmetic<Op, &PrimitiveVector> for PrimitiveVector
impl<Op> Arithmetic<Op, &PrimitiveVector> for PrimitiveVector
type Output = PrimitiveVector
fn eval(self, rhs: &PrimitiveVector) -> Self::Output
Source§impl<Op> Arithmetic<Op, PrimitiveVector> for &PrimitiveScalar
Scalar on LHS, owned Vector on RHS - modifies vector in place.
Returns a scalar if the input scalar is null.
impl<Op> Arithmetic<Op, PrimitiveVector> for &PrimitiveScalar
Scalar on LHS, owned Vector on RHS - modifies vector in place. Returns a scalar if the input scalar is null.
type Output = PrimitiveDatum
fn eval(self, rhs: PrimitiveVector) -> Self::Output
Source§impl<Op, T> Arithmetic<Op> for &Buffer<T>where
Op: Operator<T>,
Implementation that allocates a new output buffer.
impl<Op, T> Arithmetic<Op> for &Buffer<T>where
Op: Operator<T>,
Implementation that allocates a new output buffer.
Source§impl<Op, T> Arithmetic<Op> for &PScalar<T>where
T: NativePType,
Op: Operator<T>,
impl<Op, T> Arithmetic<Op> for &PScalar<T>where
T: NativePType,
Op: Operator<T>,
Source§impl<Op, T> Arithmetic<Op, &Buffer<T>> for Buffer<T>where
T: Copy,
BufferMut<T>: for<'a> Arithmetic<Op, &'a Buffer<T>, Output = Buffer<T>>,
for<'a> &'a Buffer<T>: Arithmetic<Op, &'a Buffer<T>, Output = Buffer<T>>,
Implementation that attempts to downcast to a mutable buffer and operates in-place.
impl<Op, T> Arithmetic<Op, &Buffer<T>> for Buffer<T>where
T: Copy,
BufferMut<T>: for<'a> Arithmetic<Op, &'a Buffer<T>, Output = Buffer<T>>,
for<'a> &'a Buffer<T>: Arithmetic<Op, &'a Buffer<T>, Output = Buffer<T>>,
Implementation that attempts to downcast to a mutable buffer and operates in-place.
Source§impl<Op, T> Arithmetic<Op, &Buffer<T>> for BufferMut<T>
Implementation that operates in-place over a mutable buffer.
impl<Op, T> Arithmetic<Op, &Buffer<T>> for BufferMut<T>
Implementation that operates in-place over a mutable buffer.
Source§impl<Op, T> Arithmetic<Op, &PVector<T>> for &PVector<T>where
T: NativePType,
Op: Operator<T>,
for<'a> &'a Buffer<T>: Arithmetic<Op, &'a Buffer<T>, Output = Buffer<T>>,
Implementation that allocates a new output vector.
impl<Op, T> Arithmetic<Op, &PVector<T>> for &PVector<T>where
T: NativePType,
Op: Operator<T>,
for<'a> &'a Buffer<T>: Arithmetic<Op, &'a Buffer<T>, Output = Buffer<T>>,
Implementation that allocates a new output vector.
Source§impl<Op, T> Arithmetic<Op, &PVector<T>> for PVector<T>where
T: NativePType,
Op: Operator<T>,
Implementation that attempts to downcast to a mutable vector and operates in-place.
impl<Op, T> Arithmetic<Op, &PVector<T>> for PVector<T>where
T: NativePType,
Op: Operator<T>,
Implementation that attempts to downcast to a mutable vector and operates in-place.
Source§impl<Op, T> Arithmetic<Op, &PVector<T>> for PVectorMut<T>where
T: NativePType,
Op: Operator<T>,
BufferMut<T>: for<'a> Arithmetic<Op, &'a Buffer<T>, Output = Buffer<T>>,
Implementation that operates in-place over a mutable vector.
impl<Op, T> Arithmetic<Op, &PVector<T>> for PVectorMut<T>where
T: NativePType,
Op: Operator<T>,
BufferMut<T>: for<'a> Arithmetic<Op, &'a Buffer<T>, Output = Buffer<T>>,
Implementation that operates in-place over a mutable vector.
Source§impl<Op, T> Arithmetic<Op, &T> for &Buffer<T>where
Op: Operator<T>,
Implementation that allocates a new output buffer operating against a scalar RHS value.
impl<Op, T> Arithmetic<Op, &T> for &Buffer<T>where
Op: Operator<T>,
Implementation that allocates a new output buffer operating against a scalar RHS value.
Source§impl<Op, T> Arithmetic<Op, &T> for &PVector<T>where
T: NativePType,
Op: Operator<T>,
for<'a> &'a Buffer<T>: Arithmetic<Op, &'a T, Output = Buffer<T>>,
Implementation that allocates a new output vector against a scalar RHS value.
impl<Op, T> Arithmetic<Op, &T> for &PVector<T>where
T: NativePType,
Op: Operator<T>,
for<'a> &'a Buffer<T>: Arithmetic<Op, &'a T, Output = Buffer<T>>,
Implementation that allocates a new output vector against a scalar RHS value.
Source§impl<Op, T> Arithmetic<Op, &T> for Buffer<T>where
BufferMut<T>: for<'a> Arithmetic<Op, &'a T, Output = Buffer<T>>,
for<'a> &'a Buffer<T>: Arithmetic<Op, &'a T, Output = Buffer<T>>,
Implementation that attempts to downcast to a mutable buffer and operates in-place against
a scalar RHS value.
impl<Op, T> Arithmetic<Op, &T> for Buffer<T>where
BufferMut<T>: for<'a> Arithmetic<Op, &'a T, Output = Buffer<T>>,
for<'a> &'a Buffer<T>: Arithmetic<Op, &'a T, Output = Buffer<T>>,
Implementation that attempts to downcast to a mutable buffer and operates in-place against a scalar RHS value.
Source§impl<Op, T> Arithmetic<Op, &T> for BufferMut<T>
Implementation that operates in-place over a mutable buffer against a scalar RHS value.
impl<Op, T> Arithmetic<Op, &T> for BufferMut<T>
Implementation that operates in-place over a mutable buffer against a scalar RHS value.
Source§impl<Op, T> Arithmetic<Op, &T> for PVector<T>where
T: NativePType,
Op: Operator<T>,
PVectorMut<T>: for<'a> Arithmetic<Op, &'a T, Output = PVector<T>>,
Implementation that attempts to downcast to a mutable vector and operates in-place against
a scalar RHS value.
impl<Op, T> Arithmetic<Op, &T> for PVector<T>where
T: NativePType,
Op: Operator<T>,
PVectorMut<T>: for<'a> Arithmetic<Op, &'a T, Output = PVector<T>>,
Implementation that attempts to downcast to a mutable vector and operates in-place against a scalar RHS value.
Source§impl<Op, T> Arithmetic<Op, &T> for PVectorMut<T>where
T: NativePType,
Op: Operator<T>,
BufferMut<T>: for<'a> Arithmetic<Op, &'a T, Output = Buffer<T>>,
Implementation that operates in-place over a mutable vector against a scalar RHS value.
impl<Op, T> Arithmetic<Op, &T> for PVectorMut<T>where
T: NativePType,
Op: Operator<T>,
BufferMut<T>: for<'a> Arithmetic<Op, &'a T, Output = Buffer<T>>,
Implementation that operates in-place over a mutable vector against a scalar RHS value.
Source§impl<Op, T> Arithmetic<Op, PVector<T>> for &Twhere
T: NativePType,
Op: Operator<T>,
BufferMut<T>: for<'a> Arithmetic<Op, &'a T, Output = Buffer<T>>,
for<'a> &'a Buffer<T>: Arithmetic<Op, &'a T, Output = Buffer<T>>,
Scalar LHS with owned vector RHS - modifies vector in-place.
impl<Op, T> Arithmetic<Op, PVector<T>> for &Twhere
T: NativePType,
Op: Operator<T>,
BufferMut<T>: for<'a> Arithmetic<Op, &'a T, Output = Buffer<T>>,
for<'a> &'a Buffer<T>: Arithmetic<Op, &'a T, Output = Buffer<T>>,
Scalar LHS with owned vector RHS - modifies vector in-place.