ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
gsl::multifit Namespace Reference

This namespace gives access to all the gsl_fit functions and allows us to use gsl::vector and gsl::matrix shared pointers. More...

Namespaces

namespace  nlinear
 Namespace for gsl_multifit_nlinear functions.
 

Classes

class  function
 Class that extends gsl_multifit_function so that it can be constructed from arbitrary function objects. More...
 
class  linear_workspace
 Workspace for general linear least squares with p parameters and n observations. More...
 
class  robust_workspace
 Workspace for robust linear least squares with p parameters and n observations. More...
 

Typedefs

typedef gsl_multifit_robust_type const * robust_type
 Convenience typedef. More...
 
typedef gsl_multifit_robust_stats robust_stats
 Convenience tyepdef. More...
 

Functions

int linear (matrix const &X, vector const &y, vector &c, matrix &cov, double &chisq, linear_workspace &work)
 C++ version of gsl_multifit_linear(). More...
 
int linear_svd (matrix const &X, linear_workspace &work)
 C++ version of gsl_multifit_linear_svd(). More...
 
int wlinear (matrix const &X, vector const &w, vector const &y, vector &c, matrix &cov, double &chisq, linear_workspace &work)
 C++ version of gsl_multifit_wlinear(). More...
 
int wlinear_svd (matrix const &X, vector const &w, vector const &y, double tol, size_t &rank, vector &c, matrix &cov, double &chisq, linear_workspace &work)
 C++ version of gsl_multifit_wlinear_svd(). More...
 
int wlinear_usvd (matrix const &X, vector const &w, vector const &y, double tol, size_t &rank, vector &c, matrix &cov, double &chisq, linear_workspace &work)
 C++ version of gsl_multifit_wlinear_usvd(). More...
 
int linear_est (vector const &x, vector const &c, matrix const &cov, double &y, double &y_err)
 C++ version of gsl_multifit_linear_est(). More...
 
int linear_residuals (matrix const &X, vector const &y, vector const &c, vector &r)
 C++ version of gsl_multifit_linear_residuals(). More...
 
int robust_tune (double const tune, robust_workspace &w)
 C++ version of gsl_multifit_robust_tune(). More...
 
char const * robust_name (robust_workspace const &w)
 C++ version of gsl_multifit_robust_name(). More...
 
robust_stats robust_statistics (robust_workspace const &w)
 C++ version of gsl_multifit_robust_statistics(). More...
 
int robust (matrix const &X, vector const &y, vector &c, matrix &cov, robust_workspace &w)
 C++ version of gsl_multifit_robust(). More...
 
int robust_est (vector const &x, vector const &c, matrix const &cov, double &y, double &y_err)
 C++ version of gsl_multifit_robust_est(). More...
 
int linear_bsvd (matrix const &X, linear_workspace &work)
 C++ version of gsl_multifit_linear_bsvd(). More...
 
size_t linear_rank (double const tol, linear_workspace const &work)
 C++ version of gsl_multifit_linear_rank(). More...
 
int linear_solve (double const lambda, matrix const &X, vector const &y, vector &c, double &rnorm, double &snorm, linear_workspace &work)
 C++ version of gsl_multifit_linear_solve(). More...
 
int linear_applyW (matrix const &X, vector const &w, vector const &y, matrix &WX, vector &Wy)
 C++ version of gsl_multifit_linear_applyW(). More...
 
int linear_stdform1 (vector const &L, matrix const &X, vector const &y, matrix &Xs, vector &ys, linear_workspace &work)
 C++ version of gsl_multifit_linear_stdform1(). More...
 
int linear_wstdform1 (vector const &L, matrix const &X, vector const &w, vector const &y, matrix &Xs, vector &ys, linear_workspace &work)
 C++ version of gsl_multifit_linear_wstdform1(). More...
 
int linear_L_decomp (matrix &L, vector &tau)
 C++ version of gsl_multifit_linear_L_decomp(). More...
 
int linear_stdform2 (matrix const &LQR, vector const &Ltau, matrix const &X, vector const &y, matrix &Xs, vector &ys, matrix &M, linear_workspace &work)
 C++ version of gsl_multifit_linear_stdform2(). More...
 
int linear_wstdform2 (matrix const &LQR, vector const &Ltau, matrix const &X, vector const &w, vector const &y, matrix &Xs, vector &ys, matrix &M, linear_workspace &work)
 C++ version of gsl_multifit_linear_wstdform2(). More...
 
int linear_genform1 (vector const &L, vector const &cs, vector &c, linear_workspace &work)
 C++ version of gsl_multifit_linear_genform1(). More...
 
int linear_genform2 (matrix const &LQR, vector const &Ltau, matrix const &X, vector const &y, vector const &cs, matrix const &M, vector &c, linear_workspace &work)
 C++ version of gsl_multifit_linear_genform2(). More...
 
int linear_wgenform2 (matrix const &LQR, vector const &Ltau, matrix const &X, vector const &w, vector const &y, vector const &cs, matrix const &M, vector &c, linear_workspace &work)
 C++ version of gsl_multifit_linear_wgenform2(). More...
 
int linear_lcurve (vector const &y, vector &reg_param, vector &rho, vector &eta, linear_workspace &work)
 C++ version of gsl_multifit_linear_lcurve(). More...
 
int linear_lcurvature (vector const &y, vector const &reg_param, vector const &rho, vector const &eta, vector &kappa, linear_workspace &work)
 C++ version of gsl_multifit_linear_lcurvature(). More...
 
int linear_lcorner (vector const &rho, vector const &eta, size_t *idx)
 C++ version of gsl_multifit_linear_lcorner(). More...
 
int linear_lcorner (vector const &rho, vector const &eta, size_t &idx)
 C++ version of gsl_multifit_linear_lcorner(). More...
 
int linear_lcorner2 (vector const &reg_param, vector const &eta, size_t *idx)
 C++ version of gsl_multifit_linear_lcorner2(). More...
 
int linear_lcorner2 (vector const &reg_param, vector const &eta, size_t &idx)
 C++ version of gsl_multifit_linear_lcorner2(). More...
 
int linear_Lk (size_t const p, size_t const k, matrix &L)
 C++ version of gsl_multifit_linear_Lk(). More...
 
int linear_Lsobolev (size_t const p, size_t const kmax, vector const &alpha, matrix &L, linear_workspace &work)
 C++ version of gsl_multifit_linear_Lsobolev(). More...
 
int wlinear_tsvd (matrix const &X, vector const &w, vector const &y, double const tol, vector &c, matrix &cov, double &chisq, size_t &rank, linear_workspace &work)
 C++ version of gsl_multifit_wlinear_tsvd(). More...
 
double linear_rcond (linear_workspace const &w)
 C++ version of gsl_multifit_linear_rcond(). More...
 
int linear_gcv_init (vector const &y, vector &reg_param, vector &UTy, double &delta0, linear_workspace &work)
 C++ version of gsl_multifit_linear_gcv_init(). More...
 
int linear_gcv_curve (vector const &reg_param, vector const &UTy, double const delta0, vector &G, linear_workspace &work)
 C++ version of gsl_multifit_linear_gcv_curve(). More...
 
int linear_gcv_min (vector const &reg_param, vector const &UTy, vector const &G, double const delta0, double &lambda, linear_workspace &work)
 C++ version of gsl_multifit_linear_gcv_min(). More...
 
double linear_gcv_calc (double const lambda, vector const &UTy, double const delta0, linear_workspace &work)
 C++ version of gsl_multifit_linear_gcv_calc(). More...
 
int linear_gcv (vector const &y, vector &reg_param, vector &G, double &lambda, double &G_lambda, linear_workspace &work)
 C++ version of gsl_multifit_linear_gcv(). More...
 
int robust_maxiter (size_t const maxiter, robust_workspace &w)
 C++ version of gsl_multifit_robust_maxiter(). More...
 
int robust_weights (vector const &r, vector &wts, robust_workspace &w)
 C++ version of gsl_multifit_robust_weights(). More...
 
int robust_residuals (matrix const &X, vector const &y, vector const &c, vector &r, robust_workspace &w)
 C++ version of gsl_multifit_robust_residuals(). More...
 
static robust_type robust_default ()
 Robust linear static type. More...
 
static robust_type robust_bisquare ()
 Robust linear static type. More...
 
static robust_type robust_cauchy ()
 Robust linear static type. More...
 
static robust_type robust_fair ()
 Robust linear static type. More...
 
static robust_type robust_huber ()
 Robust linear static type. More...
 
static robust_type robust_ols ()
 Robust linear static type. More...
 
static robust_type robust_welsch ()
 Robust linear static type. More...
 
template<typename T >
function make_function (T &t)
 Make a gsl::multifit::function from a function object that implements gsl::multifit::function::Concept. More...
 

Detailed Description

This namespace gives access to all the gsl_fit functions and allows us to use gsl::vector and gsl::matrix shared pointers.

Typedef Documentation

◆ robust_stats

typedef gsl_multifit_robust_stats gsl::multifit::robust_stats

Convenience tyepdef.

Definition at line 660 of file multifit.hpp.

◆ robust_type

typedef gsl_multifit_robust_type const* gsl::multifit::robust_type

Convenience typedef.

Definition at line 450 of file multifit.hpp.

Function Documentation

◆ linear()

int gsl::multifit::linear ( matrix const &  X,
vector const &  y,
vector c,
matrix cov,
double &  chisq,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear().

Parameters
XThe matrix of predictor variables, which has one row for each observation and one column for each coefficient.
yThe vector of observations of the dependent variable.
cThe vector of coefficients (return value).
covThe covariance matrix (return value).
chisqThe sum of squares of the residuals of the best fit.
workA linear_workspace object.
Returns
Error code on failure.

Definition at line 265 of file multifit.hpp.

References gsl::ran::chisq(), gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_applyW()

int gsl::multifit::linear_applyW ( matrix const &  X,
vector const &  w,
vector const &  y,
matrix WX,
vector Wy 
)
inline

C++ version of gsl_multifit_linear_applyW().

Parameters
Xmatrix
wdiagonal weights
yvector
WX\(W^{1/2}\) on output
Wy\(W^{1/2}\) on output
Returns
Error code on failure

Definition at line 767 of file multifit.hpp.

References gsl::matrix::get(), and gsl::vector::get().

◆ linear_bsvd()

int gsl::multifit::linear_bsvd ( matrix const &  X,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_bsvd().

Parameters
XA matrix
workA workspace to store SVD factors
Returns
Error code on failure

Definition at line 733 of file multifit.hpp.

References gsl::matrix::get(), and gsl::multifit::linear_workspace::get().

◆ linear_est()

int gsl::multifit::linear_est ( vector const &  x,
vector const &  c,
matrix const &  cov,
double &  y,
double &  y_err 
)
inline

C++ version of gsl_multifit_linear_est().

Parameters
xA vector of predictor (independent variable) values.
cA vector of coefficients (not a return value).
covThe covariance matrix (not a return value).
yThe predicted dependent variable value (return value).
y_errEstimate of the standard deviation in y (return value).
Returns
Error code on failure.

Definition at line 431 of file multifit.hpp.

References gsl::matrix::get(), and gsl::vector::get().

◆ linear_gcv()

int gsl::multifit::linear_gcv ( vector const &  y,
vector reg_param,
vector G,
double &  lambda,
double &  G_lambda,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_gcv().

Parameters
yThe right side vector
reg_paramRegularisation parameters
GVector for curve [return]
lambdaA vector [return] minimising GCV curve
G_lambdaReturn value
workA workspace
Returns
Error code on failure

Definition at line 1070 of file multifit.hpp.

References gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_gcv_calc()

double gsl::multifit::linear_gcv_calc ( double const  lambda,
vector const &  UTy,
double const  delta0,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_gcv_calc().

Parameters
lambdaA vector [input]
UTy\(U^{\top}y\)
delta0Parameter
workA workspace
Returns
Error code on failure

Definition at line 1057 of file multifit.hpp.

References gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_gcv_curve()

int gsl::multifit::linear_gcv_curve ( vector const &  reg_param,
vector const &  UTy,
double const  delta0,
vector G,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_gcv_curve().

Parameters
reg_paramRegularisation parameters
UTy\(U^{\top}y\)
delta0Parameter
GVector for curve [return]
workA workspace
Returns
Error code on failure

Definition at line 1031 of file multifit.hpp.

References gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_gcv_init()

int gsl::multifit::linear_gcv_init ( vector const &  y,
vector reg_param,
vector UTy,
double &  delta0,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_gcv_init().

Parameters
yThe right side vector
reg_paramRegularisation parameters
UTy\(U^{\top}y\)
delta0Parameter used for subsequent steps
workA workspace
Returns
Error code on failure

Definition at line 1018 of file multifit.hpp.

References gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_gcv_min()

int gsl::multifit::linear_gcv_min ( vector const &  reg_param,
vector const &  UTy,
vector const &  G,
double const  delta0,
double &  lambda,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_gcv_min().

Parameters
reg_paramRegularisation parameters
UTy\(U^{\top}y\)
GVector for curve [return]
delta0Parameter
lambdaA vector [return]
workA workspace
Returns
Error code on failure

Definition at line 1045 of file multifit.hpp.

References gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_genform1()

int gsl::multifit::linear_genform1 ( vector const &  L,
vector const &  cs,
vector c,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_genform1().

Parameters
LDiagonal matrix
csStandard form solution vector
csolution vector for original problem [return]
workA workspace
Returns
Error code on failure

Definition at line 851 of file multifit.hpp.

References gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_genform2()

int gsl::multifit::linear_genform2 ( matrix const &  LQR,
vector const &  Ltau,
matrix const &  X,
vector const &  y,
vector const &  cs,
matrix const &  M,
vector c,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_genform2().

Parameters
LQRA matrix
LtauA vector
XA matrix
yA vector
csStandard form solution vector
MMatrix [return]
csolution vector for original problem [return]
workA workspace
Returns
Error code on failure

Definition at line 866 of file multifit.hpp.

References gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_L_decomp()

int gsl::multifit::linear_L_decomp ( matrix L,
vector tau 
)
inline

C++ version of gsl_multifit_linear_L_decomp().

Parameters
LA matrix
tauHouseholder scalars [return]
Returns
Error code on failure

Definition at line 806 of file multifit.hpp.

References gsl::matrix::get(), and gsl::vector::get().

◆ linear_lcorner() [1/2]

int gsl::multifit::linear_lcorner ( vector const &  rho,
vector const &  eta,
size_t &  idx 
)
inline

C++ version of gsl_multifit_linear_lcorner().

Parameters
rhoResidual norms
etaSolution norms
idxSolution index
Returns
Error code on failure

Definition at line 943 of file multifit.hpp.

References gsl::sf::eta(), and gsl::vector::get().

◆ linear_lcorner() [2/2]

int gsl::multifit::linear_lcorner ( vector const &  rho,
vector const &  eta,
size_t *  idx 
)
inline

C++ version of gsl_multifit_linear_lcorner().

Parameters
rhoResidual norms
etaSolution norms
idxSolution index
Returns
Error code on failure

Definition at line 934 of file multifit.hpp.

References gsl::sf::eta(), and gsl::vector::get().

◆ linear_lcorner2() [1/2]

int gsl::multifit::linear_lcorner2 ( vector const &  reg_param,
vector const &  eta,
size_t &  idx 
)
inline

C++ version of gsl_multifit_linear_lcorner2().

Parameters
reg_paramRegularisation parameters
etaSolution norms
idxSolution index
Returns
Error code on failure

Definition at line 961 of file multifit.hpp.

References gsl::sf::eta(), and gsl::vector::get().

◆ linear_lcorner2() [2/2]

int gsl::multifit::linear_lcorner2 ( vector const &  reg_param,
vector const &  eta,
size_t *  idx 
)
inline

C++ version of gsl_multifit_linear_lcorner2().

Parameters
reg_paramRegularisation parameters
etaSolution norms
idxSolution index
Returns
Error code on failure

Definition at line 952 of file multifit.hpp.

References gsl::sf::eta(), and gsl::vector::get().

◆ linear_lcurvature()

int gsl::multifit::linear_lcurvature ( vector const &  y,
vector const &  reg_param,
vector const &  rho,
vector const &  eta,
vector kappa,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_lcurvature().

Parameters
yA vector
reg_paramRegularisation parameters [return]
rhoResidual norms [return]
etaSolution norms [return]
kappaCurvature values [return]
workA workspace
Returns
Error code on failure

Definition at line 923 of file multifit.hpp.

References gsl::sf::eta(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_lcurve()

int gsl::multifit::linear_lcurve ( vector const &  y,
vector reg_param,
vector rho,
vector eta,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_lcurve().

Parameters
yA vector
reg_paramRegularisation parameters [return]
rhoResidual norms [return]
etaSolution norms [return]
workA workspace
Returns
Error code on failure

Definition at line 909 of file multifit.hpp.

References gsl::sf::eta(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_Lk()

int gsl::multifit::linear_Lk ( size_t const  p,
size_t const  k,
matrix L 
)
inline

C++ version of gsl_multifit_linear_Lk().

Parameters
pnumber of points in grid
kOrder of derivative operator
LStorage for result [return]
Returns
Error code on failure

Definition at line 970 of file multifit.hpp.

References gsl::matrix::get().

◆ linear_Lsobolev()

int gsl::multifit::linear_Lsobolev ( size_t const  p,
size_t const  kmax,
vector const &  alpha,
matrix L,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_Lsobolev().

Parameters
pNumber of model parameters
kmaxHighest derivative to include
alphaWeight assigned to derivative of order k
Lregularisation matrix [return]
workA workspace
Returns
Error code on failure

Definition at line 981 of file multifit.hpp.

References gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_rank()

size_t gsl::multifit::linear_rank ( double const  tol,
linear_workspace const &  work 
)
inline

C++ version of gsl_multifit_linear_rank().

Parameters
tolTolerance for rank calculations
workA workspace
Returns
Error code on failure

Definition at line 741 of file multifit.hpp.

References gsl::multifit::linear_workspace::get().

◆ linear_rcond()

double gsl::multifit::linear_rcond ( linear_workspace const &  w)
inline

C++ version of gsl_multifit_linear_rcond().

Parameters
wA workspace
Returns
Reciprocal condition number

Definition at line 1007 of file multifit.hpp.

References gsl::multifit::linear_workspace::get().

◆ linear_residuals()

int gsl::multifit::linear_residuals ( matrix const &  X,
vector const &  y,
vector const &  c,
vector r 
)
inline

C++ version of gsl_multifit_linear_residuals().

Parameters
XThe matrix of predictor variables, which has one row for each observation and one column for each coefficient.
yThe vector of observations of the dependent variable.
cA vector of coefficients (not a return value).
rVector of residuals from the model \(y=Xc+\varepsilon\) (return value).
Returns
Error code on failure.

Definition at line 444 of file multifit.hpp.

References gsl::matrix::get(), and gsl::vector::get().

◆ linear_solve()

int gsl::multifit::linear_solve ( double const  lambda,
matrix const &  X,
vector const &  y,
vector c,
double &  rnorm,
double &  snorm,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_solve().

Parameters
lambdaregularisation parameter
Xmatrix
yvector
cvector
rnormresidual norm
snormsolution norm
workA workspace
Returns
Error code on failure

Definition at line 754 of file multifit.hpp.

References gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_stdform1()

int gsl::multifit::linear_stdform1 ( vector const &  L,
matrix const &  X,
vector const &  y,
matrix Xs,
vector ys,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_stdform1().

Parameters
LDiagonal matrix
Xmatrix
yvector
Xsoutput matrix
ysoutput vector
workA workspace
Returns
Error code on failure

Definition at line 780 of file multifit.hpp.

References gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_stdform2()

int gsl::multifit::linear_stdform2 ( matrix const &  LQR,
vector const &  Ltau,
matrix const &  X,
vector const &  y,
matrix Xs,
vector ys,
matrix M,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_stdform2().

Parameters
LQRA matrix
LtauA vector
XA matrix
yvector
XsA matrix [return]
ysA vector [return]
MAdditional workspace matrix
workA workspace
Returns
Error code on failure

Definition at line 820 of file multifit.hpp.

References gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_svd()

int gsl::multifit::linear_svd ( matrix const &  X,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_svd().

Parameters
XThe matrix of predictor variables, which has one row for each observation and one column for each coefficient.
workA linear_workspace object.
Returns
Error code on failure.

Definition at line 275 of file multifit.hpp.

References gsl::matrix::get(), and gsl::multifit::linear_workspace::get().

◆ linear_wgenform2()

int gsl::multifit::linear_wgenform2 ( matrix const &  LQR,
vector const &  Ltau,
matrix const &  X,
vector const &  w,
vector const &  y,
vector const &  cs,
matrix const &  M,
vector c,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_wgenform2().

Parameters
LQRA matrix
LtauA vector
XA matrix
wweight vector
yA vector
csStandard form solution vector
MMatrix [return]
csolution vector for original problem [return]
workA workspace
Returns
Error code on failure

Definition at line 884 of file multifit.hpp.

References gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_wstdform1()

int gsl::multifit::linear_wstdform1 ( vector const &  L,
matrix const &  X,
vector const &  w,
vector const &  y,
matrix Xs,
vector ys,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_wstdform1().

Parameters
LDiagonal matrix
Xmatrix
wweight vector
yvector
Xsoutput matrix
ysoutput vector
workA workspace
Returns
Error code on failure

Definition at line 795 of file multifit.hpp.

References gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ linear_wstdform2()

int gsl::multifit::linear_wstdform2 ( matrix const &  LQR,
vector const &  Ltau,
matrix const &  X,
vector const &  w,
vector const &  y,
matrix Xs,
vector ys,
matrix M,
linear_workspace work 
)
inline

C++ version of gsl_multifit_linear_wstdform2().

Parameters
LQRA matrix
LtauA vector
XA matrix
wweight vector
yvector
XsA matrix [return]
ysA vector [return]
MAdditional workspace matrix
workA workspace
Returns
Error code on failure

Definition at line 838 of file multifit.hpp.

References gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ make_function()

template<typename T >
function gsl::multifit::make_function ( T &  t)
inline

Make a gsl::multifit::function from a function object that implements gsl::multifit::function::Concept.

Parameters
tThe function object.

Definition at line 370 of file multifit_function.hpp.

◆ robust()

int gsl::multifit::robust ( matrix const &  X,
vector const &  y,
vector c,
matrix cov,
robust_workspace w 
)
inline

C++ version of gsl_multifit_robust().

Parameters
XThe matrix of predictor variables
yThe vector of dependent variables
cThe vector of coefficients [return]
covThe variance–covariance matrix [return]
wA robust_workspace
Returns
Error code on failure

Definition at line 696 of file multifit.hpp.

References gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::robust_workspace::get().

◆ robust_bisquare()

static robust_type gsl::multifit::robust_bisquare ( )
inlinestatic

Robust linear static type.

Returns
the named robust linear estimation type

Definition at line 1112 of file multifit.hpp.

◆ robust_cauchy()

static robust_type gsl::multifit::robust_cauchy ( )
inlinestatic

Robust linear static type.

Returns
the named robust linear estimation type

Definition at line 1117 of file multifit.hpp.

◆ robust_default()

static robust_type gsl::multifit::robust_default ( )
inlinestatic

Robust linear static type.

Returns
the named robust linear estimation type

Definition at line 1107 of file multifit.hpp.

◆ robust_est()

int gsl::multifit::robust_est ( vector const &  x,
vector const &  c,
matrix const &  cov,
double &  y,
double &  y_err 
)
inline

C++ version of gsl_multifit_robust_est().

Parameters
xA vector of independent variables
cA vector of coefficients
covA variance–covariance matrix
yThe predicted values
y_errThe standard deviation in the predicted values
Returns
Error code on failure

Definition at line 723 of file multifit.hpp.

References gsl::matrix::get(), and gsl::vector::get().

◆ robust_fair()

static robust_type gsl::multifit::robust_fair ( )
inlinestatic

Robust linear static type.

Returns
the named robust linear estimation type

Definition at line 1122 of file multifit.hpp.

◆ robust_huber()

static robust_type gsl::multifit::robust_huber ( )
inlinestatic

Robust linear static type.

Returns
the named robust linear estimation type

Definition at line 1127 of file multifit.hpp.

◆ robust_maxiter()

int gsl::multifit::robust_maxiter ( size_t const  maxiter,
robust_workspace w 
)
inline

C++ version of gsl_multifit_robust_maxiter().

Parameters
maxiterNew maximum number of iterations
wA workspace
Returns
Error code on failure

Definition at line 1080 of file multifit.hpp.

References gsl::multifit::robust_workspace::get().

◆ robust_name()

char const * gsl::multifit::robust_name ( robust_workspace const &  w)
inline

C++ version of gsl_multifit_robust_name().

Parameters
wA robust_workspace
Returns
The name of the robust type

Definition at line 676 of file multifit.hpp.

References gsl::multifit::robust_workspace::get().

◆ robust_ols()

static robust_type gsl::multifit::robust_ols ( )
inlinestatic

Robust linear static type.

Returns
the named robust linear estimation type

Definition at line 1132 of file multifit.hpp.

◆ robust_residuals()

int gsl::multifit::robust_residuals ( matrix const &  X,
vector const &  y,
vector const &  c,
vector r,
robust_workspace w 
)
inline

C++ version of gsl_multifit_robust_residuals().

Parameters
XInput matrix
yInput vector
cBest fit parameters for \(y=Xc\)
rResiduals [return]
wA workspace
Returns
Error code on failure

Definition at line 1100 of file multifit.hpp.

References gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::robust_workspace::get().

◆ robust_statistics()

robust_stats gsl::multifit::robust_statistics ( robust_workspace const &  w)
inline

C++ version of gsl_multifit_robust_statistics().

Parameters
wA robust_workspace
Returns
A gsl_multifit_robust_statistics object

Definition at line 684 of file multifit.hpp.

References gsl::multifit::robust_workspace::get().

◆ robust_tune()

int gsl::multifit::robust_tune ( double const  tune,
robust_workspace w 
)
inline

C++ version of gsl_multifit_robust_tune().

Parameters
tuneThe tuning constant used to adjust the residuals at each iteration
wA robust_workspace
Returns
Error code on failure

Definition at line 668 of file multifit.hpp.

References gsl::multifit::robust_workspace::get().

◆ robust_weights()

int gsl::multifit::robust_weights ( vector const &  r,
vector wts,
robust_workspace w 
)
inline

C++ version of gsl_multifit_robust_weights().

Parameters
rResidual vector
wtsVector of weights
wA workspace
Returns
Error code on failure

Definition at line 1089 of file multifit.hpp.

References gsl::vector::get(), and gsl::multifit::robust_workspace::get().

◆ robust_welsch()

static robust_type gsl::multifit::robust_welsch ( )
inlinestatic

Robust linear static type.

Returns
the named robust linear estimation type

Definition at line 1137 of file multifit.hpp.

◆ wlinear()

int gsl::multifit::wlinear ( matrix const &  X,
vector const &  w,
vector const &  y,
vector c,
matrix cov,
double &  chisq,
linear_workspace work 
)
inline

C++ version of gsl_multifit_wlinear().

Parameters
XThe matrix of predictor variables, which has one row for each observation and one column for each coefficient.
wA vector of weights, which should be the reciprocals of the variances of the corresponding observations.
yThe vector of observations of the dependent variable.
cThe vector of coefficients (return value).
covThe covariance matrix (return value).
chisqThe weighted sum of squares of the residuals of the best fit.
workA linear_workspace object.
Returns
Error code on failure.

Definition at line 310 of file multifit.hpp.

References gsl::ran::chisq(), gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ wlinear_svd()

int gsl::multifit::wlinear_svd ( matrix const &  X,
vector const &  w,
vector const &  y,
double  tol,
size_t &  rank,
vector c,
matrix cov,
double &  chisq,
linear_workspace work 
)
inline

C++ version of gsl_multifit_wlinear_svd().

Parameters
XThe matrix of predictor variables, which has one row for each observation and one column for each coefficient.
wA vector of weights, which should be the reciprocals of the variances of the corresponding observations.
yThe vector of observations of the dependent variable.
tolThe maximum allowed ratio \(s_i/s_0\), where \(s_i\) is the \(i\)th singular value; components of the singular value decomposition with smaller ratio than tol are discarded (return value).
rankThe effective rank after discarding components (return value).
cThe vector of coefficients (return value).
covThe covariance matrix (return value).
chisqThe weighted sum of squares of the residuals of the best fit.
workA linear_workspace object.
Returns
Error code on failure.

Definition at line 355 of file multifit.hpp.

References gsl::ran::chisq(), gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ wlinear_tsvd()

int gsl::multifit::wlinear_tsvd ( matrix const &  X,
vector const &  w,
vector const &  y,
double const  tol,
vector c,
matrix cov,
double &  chisq,
size_t &  rank,
linear_workspace work 
)
inline

C++ version of gsl_multifit_wlinear_tsvd().

Parameters
XPredictor matrix
wWeights
yObservation vector
tolTolerance parameters
cBest-fit parameters [return]
covCovariance matrix of model parameters [return]
chisqWeighted sum of squares
rankEffective rank
workA workspace
Returns
Error code on failure

Definition at line 997 of file multifit.hpp.

References gsl::ran::chisq(), gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().

◆ wlinear_usvd()

int gsl::multifit::wlinear_usvd ( matrix const &  X,
vector const &  w,
vector const &  y,
double  tol,
size_t &  rank,
vector c,
matrix cov,
double &  chisq,
linear_workspace work 
)
inline

C++ version of gsl_multifit_wlinear_usvd().

Parameters
XThe matrix of predictor variables, which has one row for each observation and one column for each coefficient.
wA vector of weights, which should be the reciprocals of the variances of the corresponding observations.
yThe vector of observations of the dependent variable.
tolThe maximum allowed ratio \(s_i/s_0\), where \(s_i\) is the \(i\)th singular value; components of the singular value decomposition with smaller ratio than tol are discarded (return value).
rankThe effective rank after discarding components (return value).
cThe vector of coefficients (return value).
covThe covariance matrix (return value).
chisqThe weighted sum of squares of the residuals of the best fit.
workA linear_workspace object.
Returns
Error code on failure.

Definition at line 402 of file multifit.hpp.

References gsl::ran::chisq(), gsl::matrix::get(), gsl::vector::get(), and gsl::multifit::linear_workspace::get().