Skip to main content

OpFloat

Trait OpFloat 

Source
pub trait OpFloat:
    Float
    + Send
    + Sync {
    const MAX_VALUE: Self;
    const LOG_EPS: Self;

    // Required method
    fn with_loss_buffer<R>(f: impl FnOnce(&mut Vec<Self>) -> R) -> R;
}

Required Associated Constants§

Source

const MAX_VALUE: Self

Source

const LOG_EPS: Self

Required Methods§

Source

fn with_loss_buffer<R>(f: impl FnOnce(&mut Vec<Self>) -> R) -> R

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl OpFloat for f32

Source§

const MAX_VALUE: Self = 1e10_f32

Source§

const LOG_EPS: Self = 1e-7_f32

Source§

fn with_loss_buffer<R>(f: impl FnOnce(&mut Vec<Self>) -> R) -> R

Source§

impl OpFloat for f64

Source§

const MAX_VALUE: Self = 1e10_f64

Source§

const LOG_EPS: Self = 1e-7_f64

Source§

fn with_loss_buffer<R>(f: impl FnOnce(&mut Vec<Self>) -> R) -> R

Implementors§