pub struct Curve { /* private fields */ }Expand description
A monotone piecewise-linear calibration curve.
Implementations§
Source§impl Curve
impl Curve
Sourcepub fn new(points: Vec<(f64, f64)>) -> Result<Self, CalError>
pub fn new(points: Vec<(f64, f64)>) -> Result<Self, CalError>
Build a curve from (abscissa, ordinate) points.
§Errors
CalError::Unsupported when fewer than two points are given, when
the abscissae are not strictly ascending, or when any point is
non-finite.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
true when the curve carries no nodes (never true for a curve built
through Curve::new).
Sourcepub fn is_monotone(&self) -> bool
pub fn is_monotone(&self) -> bool
true when the ordinates never change direction.
Trait Implementations§
impl StructuralPartialEq for Curve
Auto Trait Implementations§
impl Freeze for Curve
impl RefUnwindSafe for Curve
impl Send for Curve
impl Sync for Curve
impl Unpin for Curve
impl UnsafeUnpin for Curve
impl UnwindSafe for Curve
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more