pub trait NeuralValue:
Copy
+ Clone
+ Send
+ Sync
+ Debug
+ 'static {
// Required methods
fn from_f32(value: f32) -> Self;
fn to_f32(self) -> f32;
fn saturating_add(self, other: Self) -> Self;
fn mul_leak(self, leak_coefficient: f32) -> Self;
fn ge(self, other: Self) -> bool;
fn lt(self, other: Self) -> bool;
fn zero() -> Self;
fn one() -> Self;
fn max_value() -> Self;
fn min_value() -> Self;
}Expand description
Trait for neural computation values
Required Methods§
fn from_f32(value: f32) -> Self
fn to_f32(self) -> f32
fn saturating_add(self, other: Self) -> Self
fn mul_leak(self, leak_coefficient: f32) -> Self
fn ge(self, other: Self) -> bool
fn lt(self, other: Self) -> bool
fn zero() -> Self
fn one() -> Self
fn max_value() -> Self
fn min_value() -> 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.