[][src]Struct oscen::utils::ExpInterp

pub struct ExpInterp { /* fields omitted */ }

Given f(0) = low, f(1/2) = mid, and f(1) = high, let f(x) = a + b*exp(cs). Fit a, b, and c so to match the above. If mid < 1/2(high + low) then f is convex, if equal f is linear, if greater then f is concave.

Implementations

impl ExpInterp[src]

pub fn new(low: Real, mid: Real, high: Real) -> Self[src]

pub fn update(&mut self, low: Real, mid: Real, high: Real)[src]

pub fn interp(&self, x: Real) -> Real[src]

Interpolate according to f(x).

pub fn interp_inv(&self, y: Real) -> Real[src]

Inverse of interpolation function f.

Trait Implementations

impl Clone for ExpInterp[src]

impl Copy for ExpInterp[src]

impl Debug for ExpInterp[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,