pub trait InterpolationTrait<'a>: Sized {
// Required methods
fn get_x_values(&self) -> VR1D<'a>;
fn set_x_values(&mut self, x: VR1D<'a>);
fn get_y_values(&self) -> VR1D<'a>;
fn set_y_values(&mut self, y: VR1D<'a>);
fn get_cached_location(&self) -> Option<usize>;
fn set_cached_location(&mut self, x: usize);
fn raw_interpolate(&mut self, jlo: usize, x: f64) -> Result<f64, ErrorsJSL>;
// Provided methods
fn x_range_is_ascending(&self) -> bool { ... }
fn verify_sizes(&mut self, limit: usize) -> Result<(), ErrorsJSL> { ... }
fn locate(&mut self, x: f64) -> Result<usize, ErrorsJSL> { ... }
fn interpolate_at(&mut self, x: f64) -> Result<f64, ErrorsJSL> { ... }
}Required Methods§
Sourcefn get_x_values(&self) -> VR1D<'a>
fn get_x_values(&self) -> VR1D<'a>
Setters and getters for required fields
fn set_x_values(&mut self, x: VR1D<'a>)
fn get_y_values(&self) -> VR1D<'a>
fn set_y_values(&mut self, y: VR1D<'a>)
fn get_cached_location(&self) -> Option<usize>
fn set_cached_location(&mut self, x: usize)
Provided Methods§
Sourcefn x_range_is_ascending(&self) -> bool
fn x_range_is_ascending(&self) -> bool
Check if x range is ascending
Sourcefn verify_sizes(&mut self, limit: usize) -> Result<(), ErrorsJSL>
fn verify_sizes(&mut self, limit: usize) -> Result<(), ErrorsJSL>
Thie function checks to make sure x and y are the same length and greater than 2
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".