[][src]Struct lrl_test_compiler::environment::calibration::NumericCalibration

pub struct NumericCalibration {
    unit: String,
    points: Vec<Point>,
}

Fields

unit: Stringpoints: Vec<Point>

Implementations

impl NumericCalibration[src]

const MAXIMUM_POINTS: usize[src]

pub fn try_new(unit: String, points: Vec<Point>) -> CompilerResult<Self>[src]

Create a lookup table from a series of points

pub fn read_from_file(file: &mut File) -> CompilerResult<Self>[src]

pub fn write_to_file(&self, file: &mut File) -> CompilerResult<()>[src]

Writes the lookup table to a file in a binary encoding.

fn parse_numeric_points<Iter: Iterator<Item = String>>(
    lines: Iter
) -> CompilerResult<Vec<Point>>
[src]

fn parse_unit(unit_line: String) -> CompilerResult<String>[src]

fn parse_point(line: &str) -> CompilerResult<Point>[src]

pub fn lookup(&self, x_val: u16) -> Option<Frac>[src]

fn interpolate(&self, index: usize, middle_x: u16) -> Option<Frac>[src]

pub fn inverse_lookup(&self, y_val: Frac) -> Option<u16>[src]

fn interpolate_inv(&self, index: usize, middle_y: Frac) -> Option<u16>[src]

Trait Implementations

impl Clone for NumericCalibration[src]

impl Debug for NumericCalibration[src]

impl Eq for NumericCalibration[src]

impl Hash for NumericCalibration[src]

impl PartialEq<NumericCalibration> for NumericCalibration[src]

impl StructuralEq for NumericCalibration[src]

impl StructuralPartialEq for NumericCalibration[src]

Auto Trait Implementations

impl RefUnwindSafe for NumericCalibration

impl Send for NumericCalibration

impl Sync for NumericCalibration

impl Unpin for NumericCalibration

impl UnwindSafe for NumericCalibration

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<Src, Dst> LosslessTryInto<Dst> for Src where
    Dst: LosslessTryFrom<Src>, 
[src]

impl<Src, Dst> LossyInto<Dst> for Src where
    Dst: LossyFrom<Src>, 
[src]

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

type Output = T

Should always be Self

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>, 
[src]