Skip to main content

NeuralValue

Trait NeuralValue 

Source
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§

Source

fn from_f32(value: f32) -> Self

Source

fn to_f32(self) -> f32

Source

fn saturating_add(self, other: Self) -> Self

Source

fn mul_leak(self, leak_coefficient: f32) -> Self

Source

fn ge(self, other: Self) -> bool

Source

fn lt(self, other: Self) -> bool

Source

fn zero() -> Self

Source

fn one() -> Self

Source

fn max_value() -> Self

Source

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.

Implementations on Foreign Types§

Source§

impl NeuralValue for f32

Source§

fn from_f32(value: f32) -> f32

Source§

fn to_f32(self) -> f32

Source§

fn saturating_add(self, other: f32) -> f32

Source§

fn mul_leak(self, leak_coefficient: f32) -> f32

Source§

fn ge(self, other: f32) -> bool

Source§

fn lt(self, other: f32) -> bool

Source§

fn zero() -> f32

Source§

fn one() -> f32

Source§

fn max_value() -> f32

Source§

fn min_value() -> f32

Implementors§