pub struct MultiFitFdfSolver { /* private fields */ }Implementations§
Source§impl MultiFitFdfSolver
impl MultiFitFdfSolver
Sourcepub fn new(
_type: &MultiFitFdfSolverType,
n: usize,
p: usize,
) -> Option<MultiFitFdfSolver>
pub fn new( _type: &MultiFitFdfSolverType, n: usize, p: usize, ) -> Option<MultiFitFdfSolver>
This function returns a pointer to a newly allocated instance of a solver of type T for n observations and p parameters. The number of observations n must be greater than or equal to parameters p.
Sourcepub fn set(
&mut self,
f: &mut MultiFitFunctionFdf,
x: &VectorF64,
) -> Result<(), Value>
pub fn set( &mut self, f: &mut MultiFitFunctionFdf, x: &VectorF64, ) -> Result<(), Value>
This function initializes, or reinitializes, an existing solver s to use the function f and the initial guess x.
pub fn x(&self) -> View<'_, VectorF64>
pub fn f(&self) -> View<'_, VectorF64>
pub fn dx(&self) -> View<'_, VectorF64>
pub fn g(&self) -> View<'_, VectorF64>
pub fn sqrt_wts(&self) -> View<'_, VectorF64>
pub fn name(&self) -> String
Sourcepub fn iterate(&mut self) -> Result<(), Value>
pub fn iterate(&mut self) -> Result<(), Value>
This function performs a single iteration of the solver s. If the iteration encounters an unexpected problem then an error code will be returned. The solver maintains a current estimate of the best-fit parameters at all times.
Sourcepub fn position(&self) -> View<'_, VectorF64>
pub fn position(&self) -> View<'_, VectorF64>
This function returns the current position (i.e. best-fit parameters) s->x of the solver s.
Sourcepub fn driver(
&mut self,
max_iter: usize,
epsabs: f64,
epsrel: f64,
) -> Result<(), Value>
pub fn driver( &mut self, max_iter: usize, epsabs: f64, epsrel: f64, ) -> Result<(), Value>
These functions iterate the solver s for a maximum of maxiter iterations. After each iteration, the system is tested for convergence using gsl_multifit_test_delta with the error tolerances epsabs and epsrel.