|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
This namespace gives access to all the gsl_fit functions. More...
Functions | |
| int | linear (double const *x, size_t const xstride, double const *y, size_t const ystride, size_t const n, double *c0, double *c1, double *cov00, double *cov01, double *cov11, double *sumsq) |
| C++ version of gsl_fit_linear(). More... | |
| int | wlinear (double const *x, size_t const xstride, double const *w, size_t const wstride, double const *y, size_t const ystride, size_t const n, double *c0, double *c1, double *cov00, double *cov01, double *cov11, double *chisq) |
| C++ version of gsl_fit_wlinear(). More... | |
| int | linear_est (double const x, double const c0, double const c1, double const cov00, double const cov01, double const cov11, double *y, double *y_err) |
| C++ version of gsl_fit_linear_est(). More... | |
| int | mul (double const *x, size_t const xstride, double const *y, size_t const ystride, size_t const n, double *c1, double *cov11, double *sumsq) |
| C++ version of gsl_fit_mul(). More... | |
| int | wmul (double const *x, size_t const xstride, double const *w, size_t const wstride, double const *y, size_t const ystride, size_t const n, double *c1, double *cov11, double *chisq) |
| C++ version of gsl_fit_wmul(). More... | |
| int | mul_est (double const x, double const c1, double const cov11, double *y, double *y_err) |
| C++ version of gsl_fit_mul_est(). More... | |
| int | linear (double const *x, double const *y, size_t const n, double *c0, double *c1, double *cov00, double *cov01, double *cov11, double *sumsq) |
| C++ version of gsl_fit_linear(). More... | |
| int | wlinear (double const *x, double const *w, double const *y, size_t const n, double *c0, double *c1, double *cov00, double *cov01, double *cov11, double *chisq) |
| C++ version of gsl_fit_wlinear(). More... | |
| int | mul (double const *x, double const *y, size_t const n, double *c1, double *cov11, double *sumsq) |
| C++ version of gsl_fit_mul(). More... | |
| int | wmul (double const *x, double const *w, double const *y, size_t const n, double *c1, double *cov11, double *chisq) |
| C++ version of gsl_fit_wmul(). More... | |
| template<typename ARRAY > | |
| int | linear (ARRAY const &x, ARRAY const &y, double &c0, double &c1, double &cov00, double &cov01, double &cov11, double &sumsq, size_t const n=0) |
| C++ version of gsl_fit_linear() for std::vector and the like. More... | |
| template<typename ARRAY > | |
| int | wlinear (ARRAY const &x, ARRAY const &w, ARRAY const &y, double &c0, double &c1, double &cov00, double &cov01, double &cov11, double &chisq, size_t const n=0) |
| C++ version of gsl_fit_wlinear() for std::vector and the like. More... | |
| template<typename ARRAY > | |
| int | mul (ARRAY const &x, ARRAY const &y, double &c1, double &cov11, double &sumsq, size_t const n=0) |
| C++ version of gsl_fit_mul() for std::vector and the like. More... | |
| template<typename ARRAY > | |
| int | wmul (ARRAY const &x, ARRAY const &w, ARRAY const &y, double &c1, double &cov11, double &chisq, size_t const n=0) |
| C++ version of gsl_fit_wmul() for std::vector and the like. More... | |
This namespace gives access to all the gsl_fit functions.
Since the GNU Scientific library does not have functions for univariate regression that work directly with vectors, we add some here. You can use gsl::vector objects with non-unit strides in the overloaded functions.
|
inline |
C++ version of gsl_fit_linear() for std::vector and the like.
Univariate regression.
| x | A vector of values of the independent variable. |
| y | A vector of values of the dependent variable. |
| c0 | First (constant coefficient) (return value). |
| c1 | Second coefficient (return value). |
| cov00 | First variance in covariance matrix (return value). |
| cov01 | Covariance from covariance matrix (return value). |
| cov11 | Second variance in covariance matrix (return value). |
| sumsq | Residual sum of squares (return value). |
| n | Number of elements in vectors of dependent and independent variables (default of zero is substituted with vector size). |
Definition at line 400 of file fit.hpp.
References linear(), and gsl::rstat::n().
|
inline |
C++ version of gsl_fit_linear().
Univariate regression.
| x | An array of values of the independent variable. |
| y | An array of values of the dependent variable. |
| n | Number of elements in arrays of dependent and independent variables. |
| c0 | First (constant coefficient) (return value). |
| c1 | Second coefficient (return value). |
| cov00 | First variance in covariance matrix (return value). |
| cov01 | Covariance from covariance matrix (return value). |
| cov11 | Second variance in covariance matrix (return value). |
| sumsq | Residual sum of squares (return value). |
Definition at line 161 of file fit.hpp.
References gsl::rstat::n().
|
inline |
C++ version of gsl_fit_linear().
Univariate regression.
| x | An array of values of the independent variable. |
| xstride | Stride of the independent variable array |
| y | An array of values of the dependent variable. |
| ystride | Stride of the dependent variable |
| n | Number of elements in arrays of dependent and independent variables. |
| c0 | First (constant coefficient) (return value). |
| c1 | Second coefficient (return value). |
| cov00 | First variance in covariance matrix (return value). |
| cov01 | Covariance from covariance matrix (return value). |
| cov11 | Second variance in covariance matrix (return value). |
| sumsq | Residual sum of squares (return value). |
Definition at line 51 of file fit.hpp.
References gsl::rstat::n().
Referenced by linear().
|
inline |
C++ version of gsl_fit_linear_est().
Estimate fit from regression model.
| x | Value of the independent variable. |
| c0 | First coefficient. |
| c1 | Second coefficient. |
| cov00 | First variance from covariance matrix. |
| cov01 | Covariance from covariance matrix. |
| cov11 | Second variance from covariance matrix. |
| y | Predicted value of the dependent variable. |
| y_err | Estimated standard deviation in y. |
|
inline |
C++ version of gsl_fit_mul() for std::vector and the like.
Univariate regression with no constant.
| x | A vector of values of the independent variable. |
| y | A vector of values of the dependent variable. |
| c1 | Coefficient (return value). |
| cov11 | Variance (return value) |
| sumsq | Residual sum of squares (return value). |
| n | Number of elements in vectors of dependent and independent variables (default of zero is substituted with vector size). |
Definition at line 464 of file fit.hpp.
References mul(), and gsl::rstat::n().
|
inline |
C++ version of gsl_fit_mul().
Univariate regression with no constant.
| x | An array of values of the independent variable. |
| y | An array of values of the dependent variable. |
| n | Number of elements in arrays of dependent and independent variables. |
| c1 | Coefficient (return value). |
| cov11 | Variance (return value) |
| sumsq | Residual sum of squares (return value). |
Definition at line 196 of file fit.hpp.
References gsl::rstat::n().
|
inline |
C++ version of gsl_fit_mul().
Univariate regression with no constant.
| x | An array of values of the independent variable. |
| xstride | Stride of the independent variable array |
| y | An array of values of the dependent variable. |
| ystride | Stride of the dependent variable |
| n | Number of elements in arrays of dependent and independent variables. |
| c1 | Coefficient (return value). |
| cov11 | Variance (return value) |
| sumsq | Residual sum of squares (return value). |
Definition at line 110 of file fit.hpp.
References gsl::rstat::n().
Referenced by mul().
|
inline |
C++ version of gsl_fit_mul_est().
Estimate fit from regression model.
| x | Value of the independent variable. |
| c1 | Coefficient. |
| cov11 | Covariance. |
| y | Predicted value of the dependent variable. |
| y_err | Estimated standard deviation in y. |
|
inline |
C++ version of gsl_fit_wlinear() for std::vector and the like.
Univariate weighted regression.
| x | A vector of values of the independent variable. |
| w | A vector of weights for the data. |
| y | A vector of values of the dependent variable. |
| c0 | First (constant coefficient) (return value). |
| c1 | Second coefficient (return value). |
| cov00 | First variance in covariance matrix (return value). |
| cov01 | Covariance from covariance matrix (return value). |
| cov11 | Second variance in covariance matrix (return value). |
| chisq | Weighted residual sum of squares (return value). |
| n | Number of elements in vectors of dependent and independent variables (default of zero is substituted with vector size). |
Definition at line 432 of file fit.hpp.
References gsl::ran::chisq(), gsl::rstat::n(), and wlinear().
|
inline |
C++ version of gsl_fit_wlinear().
Univariate weighted regression.
| x | An array of values of the independent variable. |
| w | An array of weights for the data. |
| y | An array of values of the dependent variable. |
| n | Number of elements in arrays of dependent and independent variables. |
| c0 | First (constant coefficient) (return value). |
| c1 | Second coefficient (return value). |
| cov00 | First variance in covariance matrix (return value). |
| cov01 | Covariance from covariance matrix (return value). |
| cov11 | Second variance in covariance matrix (return value). |
| chisq | Weighted residual sum of squares (return value). |
Definition at line 181 of file fit.hpp.
References gsl::ran::chisq(), and gsl::rstat::n().
|
inline |
C++ version of gsl_fit_wlinear().
Univariate weighted regression.
| x | An array of values of the independent variable. |
| xstride | Stride of the independent variable array |
| w | An array of weights for the data. |
| wstride | Stride of the array of weights |
| y | An array of values of the dependent variable. |
| ystride | Stride of the dependent variable |
| n | Number of elements in arrays of dependent and independent variables. |
| c0 | First (constant coefficient) (return value). |
| c1 | Second coefficient (return value). |
| cov00 | First variance in covariance matrix (return value). |
| cov01 | Covariance from covariance matrix (return value). |
| cov11 | Second variance in covariance matrix (return value). |
| chisq | Weighted residual sum of squares (return value). |
Definition at line 74 of file fit.hpp.
References gsl::ran::chisq(), and gsl::rstat::n().
Referenced by wlinear().
|
inline |
C++ version of gsl_fit_wmul() for std::vector and the like.
Weighted univariate regression with no constant.
| x | A vector of values of the independent variable. |
| w | A vector of weights for the data. |
| y | A vector of values of the dependent variable. |
| c1 | Coefficient (return value). |
| cov11 | Variance (return value) |
| chisq | Weighted residual sum of squares (return value). |
| n | Number of elements in vectors of dependent and independent variables (default of zero is substituted with vector size). |
Definition at line 491 of file fit.hpp.
References gsl::ran::chisq(), gsl::rstat::n(), and wmul().
|
inline |
C++ version of gsl_fit_wmul().
Weighted univariate regression with no constant.
| x | An array of values of the independent variable. |
| w | An array of weights for the data. |
| y | An array of values of the dependent variable. |
| n | Number of elements in arrays of dependent and independent variables. |
| c1 | Coefficient (return value). |
| cov11 | Variance (return value) |
| chisq | Weighted residual sum of squares (return value). |
Definition at line 211 of file fit.hpp.
References gsl::ran::chisq(), and gsl::rstat::n().
|
inline |
C++ version of gsl_fit_wmul().
Weighted univariate regression with no constant.
| x | An array of values of the independent variable. |
| xstride | Stride of the independent variable array |
| w | An array of weights for the data. |
| wstride | Stride of the array of weights |
| y | An array of values of the dependent variable. |
| ystride | Stride of the dependent variable |
| n | Number of elements in arrays of dependent and independent variables. |
| c1 | Coefficient (return value). |
| cov11 | Variance (return value) |
| chisq | Weighted residual sum of squares (return value). |
Definition at line 128 of file fit.hpp.
References gsl::ran::chisq(), and gsl::rstat::n().
Referenced by wmul().