pub trait ArithmeticOps {
Show 25 methods
// Required methods
fn add_tensor(&self, other: &Self) -> Self;
fn add_tensor_assign(&mut self, other: &Self);
fn sub_tensor(&self, other: &Self) -> Self;
fn sub_tensor_assign(&mut self, other: &Self);
fn mul_tensor(&self, other: &Self) -> Self;
fn mul_tensor_assign(&mut self, other: &Self);
fn div_tensor(&self, other: &Self) -> Self;
fn div_tensor_assign(&mut self, other: &Self);
fn add_f32(&self, other: f32) -> Self;
fn add_f32_assign(&mut self, other: f32);
fn sub_f32(&self, other: f32) -> Self;
fn sub_f32_assign(&mut self, other: f32);
fn mul_f32(&self, other: f32) -> Self;
fn mul_f32_assign(&mut self, other: f32);
fn div_f32(&self, other: f32) -> Self;
fn div_f32_assign(&mut self, other: f32);
fn pow_f32(&self, other: f32) -> Self;
fn pow_f32_assign(&mut self, other: f32);
fn greater_than(&self, other: &Self, make_binary: bool) -> Self;
fn greater_than_f32(&self, other: f32, make_binary: bool) -> Self;
fn less_than(&self, other: &Self, make_binary: bool) -> Self;
fn less_than_f32(&self, other: f32, make_binary: bool) -> Self;
fn sign(&self) -> Self;
fn abs(&self) -> Self;
fn abs_assign(&mut self);
}Required Methods§
fn add_tensor(&self, other: &Self) -> Self
fn add_tensor_assign(&mut self, other: &Self)
fn sub_tensor(&self, other: &Self) -> Self
fn sub_tensor_assign(&mut self, other: &Self)
fn mul_tensor(&self, other: &Self) -> Self
fn mul_tensor_assign(&mut self, other: &Self)
fn div_tensor(&self, other: &Self) -> Self
fn div_tensor_assign(&mut self, other: &Self)
fn add_f32(&self, other: f32) -> Self
fn add_f32_assign(&mut self, other: f32)
fn sub_f32(&self, other: f32) -> Self
fn sub_f32_assign(&mut self, other: f32)
fn mul_f32(&self, other: f32) -> Self
fn mul_f32_assign(&mut self, other: f32)
fn div_f32(&self, other: f32) -> Self
fn div_f32_assign(&mut self, other: f32)
fn pow_f32(&self, other: f32) -> Self
fn pow_f32_assign(&mut self, other: f32)
fn greater_than(&self, other: &Self, make_binary: bool) -> Self
fn greater_than_f32(&self, other: f32, make_binary: bool) -> Self
fn less_than(&self, other: &Self, make_binary: bool) -> Self
fn less_than_f32(&self, other: f32, make_binary: bool) -> Self
fn sign(&self) -> Self
fn abs(&self) -> Self
fn abs_assign(&mut self)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.