pub enum Arithmetic {
Show 29 variants
Add(BinaryOperator),
Fma(FmaOperator),
Sub(BinaryOperator),
Mul(BinaryOperator),
Div(BinaryOperator),
Abs(UnaryOperator),
Exp(UnaryOperator),
Log(UnaryOperator),
Log1p(UnaryOperator),
Cos(UnaryOperator),
Sin(UnaryOperator),
Tanh(UnaryOperator),
Powf(BinaryOperator),
Sqrt(UnaryOperator),
Round(UnaryOperator),
Floor(UnaryOperator),
Ceil(UnaryOperator),
Erf(UnaryOperator),
Recip(UnaryOperator),
Clamp(ClampOperator),
Modulo(BinaryOperator),
Neg(UnaryOperator),
Max(BinaryOperator),
Min(BinaryOperator),
Remainder(BinaryOperator),
Magnitude(UnaryOperator),
Normalize(UnaryOperator),
Dot(BinaryOperator),
MulHi(BinaryOperator),
}
Expand description
Arithmetic operations
Variants§
Add(BinaryOperator)
Fma(FmaOperator)
Sub(BinaryOperator)
Mul(BinaryOperator)
Div(BinaryOperator)
Abs(UnaryOperator)
Exp(UnaryOperator)
Log(UnaryOperator)
Log1p(UnaryOperator)
Cos(UnaryOperator)
Sin(UnaryOperator)
Tanh(UnaryOperator)
Powf(BinaryOperator)
Sqrt(UnaryOperator)
Round(UnaryOperator)
Floor(UnaryOperator)
Ceil(UnaryOperator)
Erf(UnaryOperator)
Recip(UnaryOperator)
Clamp(ClampOperator)
Modulo(BinaryOperator)
Neg(UnaryOperator)
Max(BinaryOperator)
Min(BinaryOperator)
Remainder(BinaryOperator)
Magnitude(UnaryOperator)
Normalize(UnaryOperator)
Dot(BinaryOperator)
MulHi(BinaryOperator)
Trait Implementations§
Source§impl Clone for Arithmetic
impl Clone for Arithmetic
Source§fn clone(&self) -> Arithmetic
fn clone(&self) -> Arithmetic
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 Debug for Arithmetic
impl Debug for Arithmetic
Source§impl<'de> Deserialize<'de> for Arithmetic
impl<'de> Deserialize<'de> for Arithmetic
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Arithmetic
impl Display for Arithmetic
Source§impl From<<Arithmetic as OperationReflect>::OpCode> for OpCode
impl From<<Arithmetic as OperationReflect>::OpCode> for OpCode
Source§fn from(value: <Arithmetic as OperationReflect>::OpCode) -> Self
fn from(value: <Arithmetic as OperationReflect>::OpCode) -> Self
Converts to this type from the input type.
Source§impl From<Arithmetic> for Operation
impl From<Arithmetic> for Operation
Source§fn from(value: Arithmetic) -> Self
fn from(value: Arithmetic) -> Self
Converts to this type from the input type.
Source§impl Hash for Arithmetic
impl Hash for Arithmetic
Source§impl OperationReflect for Arithmetic
impl OperationReflect for Arithmetic
Source§type OpCode = ArithmeticOpCode
type OpCode = ArithmeticOpCode
Type of the op codes for this operation
Source§fn args(&self) -> Option<Vec<Variable>>
fn args(&self) -> Option<Vec<Variable>>
Get the list of arguments for this operation. If not all arguments are
Variable
, returns
None
instead.Source§fn from_code_and_args(op_code: Self::OpCode, args: &[Variable]) -> Option<Self>
fn from_code_and_args(op_code: Self::OpCode, args: &[Variable]) -> Option<Self>
Create typed operation from an opcode and a list of arguments. Returns
None
if not all
arguments are Variable
.Source§fn is_commutative(&self) -> bool
fn is_commutative(&self) -> bool
Whether this operation is commutative (arguments can be freely reordered). Ignored for
single argument operations.
Source§impl PartialEq for Arithmetic
impl PartialEq for Arithmetic
Source§impl Serialize for Arithmetic
impl Serialize for Arithmetic
Source§impl TypeHash for Arithmetic
impl TypeHash for Arithmetic
impl Eq for Arithmetic
impl StructuralPartialEq for Arithmetic
Auto Trait Implementations§
impl Freeze for Arithmetic
impl RefUnwindSafe for Arithmetic
impl Send for Arithmetic
impl Sync for Arithmetic
impl Unpin for Arithmetic
impl UnwindSafe for Arithmetic
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.