pub trait Interp2DStrategyBuilder<Sd, Sx, Sy, D>where
    Sd: Data,
    Sd::Elem: Num + PartialOrd + NumCast + Copy + Debug + Sub,
    Sx: Data<Elem = Sd::Elem>,
    Sy: Data<Elem = Sd::Elem>,
    D: Dimension + RemoveAxis,
    D::Smaller: RemoveAxis,{
    type FinishedStrat: Interp2DStrategy<Sd, Sx, Sy, D>;

    const MINIMUM_DATA_LENGHT: usize;

    // Required method
    fn build(
        self,
        x: &ArrayBase<Sx, Ix1>,
        y: &ArrayBase<Sy, Ix1>,
        data: &ArrayBase<Sd, D>
    ) -> Result<Self::FinishedStrat, BuilderError>;
}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn build( self, x: &ArrayBase<Sx, Ix1>, y: &ArrayBase<Sy, Ix1>, data: &ArrayBase<Sd, D> ) -> Result<Self::FinishedStrat, BuilderError>

initialize the strategy by validating data and possibly calculating coefficients This method is called in Interp2DBuilder::build

When this method is called by Interp2DBuilder the following properties are guaranteed:

  • x and y is strictly monotonically rising
  • the lenght of x equals the lenght of the data Axis 0
  • the lenght of y equals the lenght of the data Axis 1
  • the lenght is at least MINIMUM_DATA_LENGHT
  • Interpolation in x will happen along Axis 0
  • Interpolation in y will happen along Axis 1

Implementors§

source§

impl<Sd, Sx, Sy, D> Interp2DStrategyBuilder<Sd, Sx, Sy, D> for Biliniarwhere Sd: Data, Sd::Elem: Num + PartialOrd + NumCast + Copy + Debug + Sub, Sx: Data<Elem = Sd::Elem>, Sy: Data<Elem = Sd::Elem>, D: Dimension + RemoveAxis, D::Smaller: RemoveAxis,