Trait rmpfit::MPFitter [−][src]
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.
Provided methods
fn mpfit(
&self,
xall: &mut [f64],
params: Option<&[MPPar]>,
config: &MPConfig
) -> MPResult<MPStatus> where
Self: Sized,
[src]
&self,
xall: &mut [f64],
params: Option<&[MPPar]>,
config: &MPConfig
) -> MPResult<MPStatus> where
Self: Sized,
Main function to refine the parameters.
Arguments
xall
- A mutable slice with starting fit parametersparams
- A possible slice with parameter configurationsconfig
-MPConifg
to configure the fit