conspire 0.6.0

The Rust interface to conspire.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::{
    super::test::{TestError, assert_eq},
    Interpolate1D, LinearInterpolation, Vector,
};

#[test]
fn line() -> Result<(), TestError> {
    let x = Vector::from([0.324, 0.745]);
    let xp = Vector::from([0.0, 1.0]);
    let linear_function = |x: &Vector| x * 2.3;
    let fp = linear_function(&xp);
    let f = LinearInterpolation::interpolate_1d(&x, &xp, &fp);
    assert_eq(&linear_function(&x), &f)
}