Trait rmpfit::MPFitter[][src]

pub trait MPFitter {
    fn eval(&self, params: &[f64], deviates: &mut [f64]) -> MPResult<()>;
fn number_of_points(&self) -> usize; fn mpfit(
        &self,
        xall: &mut [f64],
        params: Option<&[MPPar]>,
        config: &MPConfig
    ) -> MPResult<MPStatus>
    where
        Self: Sized
, { ... } }

Trait to be implemented by user.

Required methods

fn eval(&self, params: &[f64], deviates: &mut [f64]) -> MPResult<()>[src]

Main evaluation procedure which is called from mpfit. Size of deviates is equal to the value returned by number_of_points. User should compute the residuals using parameters from params and any user data that are required, and fill the deviates slice. The residuals are defined as (y[i] - f(x[i]))/y_error[i].

fn number_of_points(&self) -> usize[src]

Number of the data points in the user private data.

Loading content...

Provided methods

fn mpfit(
    &self,
    xall: &mut [f64],
    params: Option<&[MPPar]>,
    config: &MPConfig
) -> MPResult<MPStatus> where
    Self: Sized
[src]

Main function to refine the parameters.

Arguments

  • xall - A mutable slice with starting fit parameters
  • params - A possible slice with parameter configurations
  • config - MPConifg to configure the fit
Loading content...

Implementors

Loading content...