pub struct Interp1DBuilder<Sd, Sx, D, Strat>{ /* private fields */ }
Expand description
Implementations§
Source§impl<Sd, D> Interp1DBuilder<Sd, OwnedRepr<Sd::Elem>, D, Linear>
impl<Sd, D> Interp1DBuilder<Sd, OwnedRepr<Sd::Elem>, D, Linear>
Sourcepub fn new(data: ArrayBase<Sd, D>) -> Self
pub fn new(data: ArrayBase<Sd, D>) -> Self
Create a new Interp1DBuilder and provide the data to interpolate. When nothing else is configured Interp1DBuilder::build will create an Interpolator using Linear Interpolation without extrapolation. As x axis the index to the data will be used. On multidimensional data interpolation happens along the first axis.
Source§impl<Sd, Sx, D, Strat> Interp1DBuilder<Sd, Sx, D, Strat>where
Sd: Data,
Sd::Elem: Num + PartialOrd + NumCast + Copy + Debug + Send,
Sx: Data<Elem = Sd::Elem>,
D: Dimension + RemoveAxis,
Strat: Interp1DStrategyBuilder<Sd, Sx, D>,
impl<Sd, Sx, D, Strat> Interp1DBuilder<Sd, Sx, D, Strat>where
Sd: Data,
Sd::Elem: Num + PartialOrd + NumCast + Copy + Debug + Send,
Sx: Data<Elem = Sd::Elem>,
D: Dimension + RemoveAxis,
Strat: Interp1DStrategyBuilder<Sd, Sx, D>,
Sourcepub fn x<NewSx>(
self,
x: ArrayBase<NewSx, Ix1>,
) -> Interp1DBuilder<Sd, NewSx, D, Strat>
pub fn x<NewSx>( self, x: ArrayBase<NewSx, Ix1>, ) -> Interp1DBuilder<Sd, NewSx, D, Strat>
Add an custom x axis for the data. The axis needs to have the same lenght
and store the same Type as the data. x
must be strict monotonic rising.
If the x axis is not set the index 0..data.len() - 1
is used
Sourcepub fn strategy<NewStrat>(
self,
strategy: NewStrat,
) -> Interp1DBuilder<Sd, Sx, D, NewStrat>where
NewStrat: Interp1DStrategyBuilder<Sd, Sx, D>,
pub fn strategy<NewStrat>(
self,
strategy: NewStrat,
) -> Interp1DBuilder<Sd, Sx, D, NewStrat>where
NewStrat: Interp1DStrategyBuilder<Sd, Sx, D>,
Set the interpolation strategy by providing a Interp1DStrategyBuilder.
By default Linear with Linear{extrapolate: false}
is used.
Sourcepub fn build(
self,
) -> Result<Interp1D<Sd, Sx, D, Strat::FinishedStrat>, BuilderError>
pub fn build( self, ) -> Result<Interp1D<Sd, Sx, D, Strat::FinishedStrat>, BuilderError>
Validate input data and create the configured Interp1D
Trait Implementations§
Auto Trait Implementations§
impl<Sd, Sx, D, Strat> Freeze for Interp1DBuilder<Sd, Sx, D, Strat>
impl<Sd, Sx, D, Strat> RefUnwindSafe for Interp1DBuilder<Sd, Sx, D, Strat>where
<Sd as RawData>::Elem: Sized + RefUnwindSafe,
Strat: RefUnwindSafe,
Sx: RefUnwindSafe,
Sd: RefUnwindSafe,
D: RefUnwindSafe,
impl<Sd, Sx, D, Strat> Send for Interp1DBuilder<Sd, Sx, D, Strat>
impl<Sd, Sx, D, Strat> Sync for Interp1DBuilder<Sd, Sx, D, Strat>
impl<Sd, Sx, D, Strat> Unpin for Interp1DBuilder<Sd, Sx, D, Strat>
impl<Sd, Sx, D, Strat> UnwindSafe for Interp1DBuilder<Sd, Sx, D, Strat>where
<Sd as RawData>::Elem: Sized + RefUnwindSafe,
Strat: UnwindSafe,
Sx: UnwindSafe,
Sd: UnwindSafe,
D: UnwindSafe,
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