3 #include <gsl/gsl_vector.h> 4 #include <gsl/gsl_matrix.h> 5 #include <gsl/gsl_multifit_nlin.h> 12 int gsl_lsp_f(
const gsl_vector *x,
void *data, gsl_vector *f)
15 blitz::Array<double, 1> b_x(
GslVector(const_cast<gsl_vector*>(x),
false).blitz_array());
16 blitz::Array<double, 1> b_f(lsp_standard->
residual_x(b_x));
17 gsl_vector_memcpy(f,
GslVector(b_f).gsl());
22 int gsl_lsp_j(
const gsl_vector *x,
void *data, gsl_matrix *j)
25 blitz::Array<double, 1> b_x(
GslVector(const_cast<gsl_vector*>(x),
false).blitz_array());
26 blitz::Array<double, 2> b_j(lsp_standard->
jacobian_x(b_x));
27 gsl_matrix_memcpy(j,
GslMatrix(b_j).gsl());
32 int gsl_lsp_fj(
const gsl_vector *x,
void *data, gsl_vector *f, gsl_matrix *j)
41 gsl_multifit_function_fdf f;
47 f.params = (
void *) lsp_standard;
int gsl_lsp_fj(const gsl_vector *x, void *data, gsl_vector *f, gsl_matrix *j)
This provides thin wrapper around the GNU Scientific Library gsl_matrix.
virtual blitz::Array< double, 1 > residual_x(const blitz::Array< double, 1 > &x)
The residual function with parameters.
The base class for the Non-Linear Least Squares problem.
int gsl_lsp_j(const gsl_vector *x, void *data, gsl_matrix *j)
virtual blitz::Array< double, 2 > jacobian_x(const blitz::Array< double, 1 > &x)
The Jacobian function with parameters.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
gsl_multifit_function_fdf gsl_get_lsp_fdf(const FullPhysics::NLLSProblem *lsp_standard)
This provides thin wrapper around the GNU Scientific Library gsl_vector.
virtual int residual_size() const =0
The size of the residual returned by residual()
virtual int expected_parameter_size() const
Returns the expected size of the parameters.
int gsl_lsp_f(const gsl_vector *x, void *data, gsl_vector *f)