![]() |
CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
|
The namespace of the GSL wrappers More...
Functions | |
void | check_GSL_fail (const int status, const bool exit, const std::string CBLfunction, const std::string GSLroutine) |
Function used to check output of the wrapped GSL routines. More... | |
double | generic_function (const double xx, void *params) |
function used to integrate interpolated function More... | |
double | generic_roots (double xx, void *params) |
generic roots More... | |
double | generic_minimizer (const gsl_vector *xx, void *params) |
generic roots More... | |
double | generic_minimizer_return (const gsl_vector *xx, void *params) |
generic roots More... | |
double | GSL_derivative (gsl_function Func, const double xx, const double hh, const double prec=1.e-2) |
the derivative of a function More... | |
double | GSL_integrate_romberg (gsl_function Func, const double a, const double b, const int npoints, const double eps_rel=1.e-4, const double eps_abs=1.e-12) |
integral, using the gsl romberg method More... | |
double | GSL_integrate_cquad (gsl_function func, const double a, const double b, const double rel_err=1.e-3, const double abs_err=0, const int nevals=100) |
integral, using the gsl cquad method More... | |
double | GSL_integrate_qag (gsl_function Func, const double a, const double b, const double rel_err=1.e-3, const double abs_err=0, const int limit_size=1000, const int rule=6) |
integral, computed using the GSL qag method More... | |
double | GSL_integrate_qags (gsl_function Func, const double a, const double b, const double rel_err=1.e-3, const double abs_err=0, const int limit_size=1000) |
integral, computed using the GSL qags method More... | |
double | GSL_integrate_qaws (gsl_function Func, const double a, const double b, const double alpha=0, const double beta=0, const int mu=1, const int nu=0, const double rel_err=1.e-3, const double abs_err=0, const int limit_size=1000) |
integral, computed using the GSL qaws method More... | |
double | GSL_integrate_qagiu (gsl_function Func, const double a, const double rel_err=1.e-3, const double abs_err=0, const int limit_size=1000) |
integral, computed using the GSL qagiu method More... | |
double | GSL_derivative (FunctionDoubleDouble func, const double xx, const double hh, const double prec=1.e-2) |
the derivative of a function More... | |
double | GSL_integrate_romberg (FunctionDoubleDouble Func, const double a, const double b, const int npoints, const double eps_rel=1.e-4, const double eps_abs=1.e-12) |
integral, using the gsl romberg method More... | |
double | GSL_integrate_cquad (FunctionDoubleDouble func, const double a, const double b, const double rel_err=1.e-3, const double abs_err=0, const int nevals=100) |
integral, using the GSL cquad method More... | |
double | GSL_integrate_qag (FunctionDoubleDouble func, const double a, const double b, const double rel_err=1.e-3, const double abs_err=0, const int limit_size=1000, const int rule=6) |
integral, using the GSL qag method More... | |
double | GSL_integrate_qags (FunctionDoubleDouble func, const double a, const double b, const double rel_err=1.e-3, const double abs_err=0, const int limit_size=1000) |
integral, using the GSL qags method More... | |
double | GSL_integrate_qagiu (FunctionDoubleDouble func, const double a, const double rel_err=1.e-3, const double abs_err=0, const int limit_size=1000) |
integral, using the GSL qagiu method More... | |
double | GSL_integrate_qaws (FunctionDoubleDouble func, const double a, const double b, const double alpha=0, const double beta=0, const int mu=1, const int nu=0, const double rel_err=1.e-3, const double abs_err=0, const int limit_size=1000) |
integral, using the GSL qaws method More... | |
double | GSL_integrate_cquad (FunctionDoubleDoublePtrVectorRef func, std::shared_ptr< void > pp, std::vector< double > par, const double a, const double b, const double rel_err=1.e-3, const double abs_err=0, const int nevals=100) |
integral, using the GSL cquad method More... | |
double | GSL_integrate_qag (FunctionDoubleDoublePtrVectorRef func, std::shared_ptr< void > pp, std::vector< double > par, const double a, const double b, const double rel_err=1.e-3, const double abs_err=0, const int limit_size=1000, const int rule=6) |
integral, using the GSL qag method More... | |
double | GSL_integrate_qags (FunctionDoubleDoublePtrVectorRef func, std::shared_ptr< void > pp, std::vector< double > par, const double a, const double b, const double rel_err=1.e-3, const double abs_err=0, const int limit_size=1000) |
integral, using the GSL qags method More... | |
double | GSL_integrate_qagiu (FunctionDoubleDoublePtrVectorRef func, std::shared_ptr< void > pp, std::vector< double > par, const double a, const double rel_err=1.e-3, const double abs_err=0, const int limit_size=1000) |
integral, using the GSL qagiu method More... | |
double | GSL_integrate_qaws (FunctionDoubleDoublePtrVectorRef func, std::shared_ptr< void > pp, std::vector< double > par, const double a, const double b, const double alpha=0, const double beta=0, const int mu=1, const int nu=0, const double rel_err=1.e-3, const double abs_err=0, const int limit_size=1000) |
integral, using the GSL qag method More... | |
double | GSL_root_brent (gsl_function Func, const double low_guess, const double up_guess, const double rel_err=1.e-3, const double abs_err=0) |
function to find roots using GSL qag method More... | |
double | GSL_root_brent (FunctionDoubleDouble func, double xx0, const double low_guess, const double up_guess, const double rel_err=1.e-3, const double abs_err=0) |
function to find roots using GSL brent method More... | |
std::vector< double > | GSL_minimize_nD (FunctionDoubleVector func, const std::vector< double > start, const std::vector< std::vector< double >> ranges, const unsigned int max_iter=1000, const double tol=1.e-6, const double epsilon=0.1) |
minimize the provided function using GSL procedure More... | |
std::vector< double > | GSL_minimize_nD (FunctionDoubleVectorRef func, const std::vector< double > start, const std::vector< std::vector< double >> ranges, const unsigned int max_iter=1000, const double tol=1.e-6, const double epsilon=0.1) |
minimize the provided function using GSL procedure More... | |
double | GSL_minimize_1D (FunctionDoubleDouble func, const double start, double min=par::defaultDouble, double max=-par::defaultDouble, const int max_iter=1000, const bool verbose=false) |
minimize the provided function using GSL procedure More... | |
double | GSL_polynomial_eval (const double x, const std::shared_ptr< void > fixed_parameters, const std::vector< double > coeff) |
evaluate a polynomial More... | |
void | GSL_polynomial_root (const std::vector< double > coeff, std::vector< std::vector< double >> &root) |
find polynomial roots More... | |
The namespace of the GSL wrappers
The gsl namespace contains all the wrapper functions of the GSL routines
void cbl::wrapper::gsl::check_GSL_fail | ( | const int | status, |
const bool | exit, | ||
const std::string | CBLfunction, | ||
const std::string | GSLroutine | ||
) |
Function used to check output of the wrapped GSL routines.
status | the GSL routine status |
exit | true → if the routine raise an error, exit the code; false → show the status of the GSL routine without exiting |
CBLfunction | the name of the function using the GSL routine |
GSLroutine | the name of the gsl routine |
Definition at line 45 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::generic_function | ( | const double | xx, |
void * | params | ||
) |
function used to integrate interpolated function
xx | the point in which function is defined |
params | the parameters of the function |
Definition at line 60 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::generic_minimizer | ( | const gsl_vector * | xx, |
void * | params | ||
) |
generic roots
xx | the point in which function is defined |
params | the parameters of the function |
Definition at line 80 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::generic_minimizer_return | ( | const gsl_vector * | xx, |
void * | params | ||
) |
generic roots
xx | the point in which function is defined |
params | the parameters of the function |
Definition at line 96 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::generic_roots | ( | double | xx, |
void * | params | ||
) |
generic roots
xx | the point in which function is defined |
params | the parameters of the function |
Definition at line 70 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_derivative | ( | FunctionDoubleDouble | func, |
const double | xx, | ||
const double | hh, | ||
const double | prec = 1.e-2 |
||
) |
the derivative of a function
This function computes the numerical derivative of the function Func at the point xx using an adaptive central difference algorithm with a step size of hh.
The initial value of hh is used to estimate an optimal step-size, based on the scaling of the truncation error and round-off error in the derivative calculation. The derivative is computed using a 5-point rule for equally spaced abscissae at xx-hh, xx-hh/2, xx, xx+hh/2, xx+hh, with an error estimate taken from the difference between the 5-point rule and the corresponding 3-point rule xx-hh, xx, xx+hh. Note that the value of the function at xx does not contribute to the derivative calculation, so only 4-points are actually used. (from the GSL documentation)
It only works with function defined as std::function<double(double)> that doesn't use fixed parameters (useful for class members, when the external parameters could be attributes of the class)
func | the function to be derived |
xx | point at which the derivative is computed |
hh | the initial value of the step size |
prec | the relative error tolerance |
Definition at line 263 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_derivative | ( | gsl_function | Func, |
const double | xx, | ||
const double | hh, | ||
const double | prec = 1.e-2 |
||
) |
the derivative of a function
This function computes the numerical derivative of the function Func at the point xx using an adaptive central difference algorithm with a step size of hh.
The initial value of hh is used to estimate an optimal step-size, based on the scaling of the truncation error and round-off error in the derivative calculation. The derivative is computed using a 5-point rule for equally spaced abscissae at xx-hh, xx-hh/2, xx, xx+hh/2, xx+hh, with an error estimate taken from the difference between the 5-point rule and the corresponding 3-point rule xx-hh, xx, xx+hh. Note that the value of the function at xx does not contribute to the derivative calculation, so only 4-points are actually used. (from the GSL documentation)
Func | the GSL function to be derived |
xx | point at which the derivative is computed |
hh | the initial value of the step size |
prec | the relative error tolerance |
Definition at line 114 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_cquad | ( | FunctionDoubleDouble | func, |
const double | a, | ||
const double | b, | ||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | nevals = 100 |
||
) |
integral, using the GSL cquad method
it only works with function defined as std::function<double(double)> that doesn't use fixed parameters (useful for class members, when the external parameters could be attributes of the class)
func | the fuction to be integrated |
a | the lower limit of the integral |
b | the upper limit of the integral |
rel_err | the relative error |
abs_err | the absolute error |
nevals | the number of intervals |
Definition at line 295 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_cquad | ( | FunctionDoubleDoublePtrVectorRef | func, |
std::shared_ptr< void > | pp, | ||
std::vector< double > | par, | ||
const double | a, | ||
const double | b, | ||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | nevals = 100 |
||
) |
integral, using the GSL cquad method
it only works with a function defined as std::function<double(double)> that doesn't use fixed parameters (useful for class members, when the external parameters can be attributes of the class)
func | the fuction to be integrated |
pp | a void pointer |
par | a vector containing the coefficients |
a | the lower limit of the integral |
b | the upper limit of the integral |
rel_err | the relative error |
abs_err | the absolute error |
nevals | the number of intervals |
Definition at line 375 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_cquad | ( | gsl_function | func, |
const double | a, | ||
const double | b, | ||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | nevals = 100 |
||
) |
integral, using the gsl cquad method
it only works with a function defined as std::function<double(double)> that doesn't use fixed parameters (useful for class members, when the external parameters can be attributes of the class)
func | the fuction to be integrated |
a | the lower limit of the integral |
b | the upper limit of the integral |
rel_err | the relative error |
abs_err | the absolute error |
nevals | the number of intervals |
Definition at line 159 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_qag | ( | FunctionDoubleDouble | func, |
const double | a, | ||
const double | b, | ||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | limit_size = 1000 , |
||
const int | rule = 6 |
||
) |
integral, using the GSL qag method
it only works with function defined as std::function<double(double)> that doesn't use fixed parameters (useful for class members, when the external parameters could be attributes of the class)
func | the fuction to be integrated |
a | the lower limit of the integral |
b | the upper limit of the integral |
rel_err | the relative error |
abs_err | the absolute error |
limit_size | the maximum size of workspace |
rule | the rule of integration |
Definition at line 311 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_qag | ( | FunctionDoubleDoublePtrVectorRef | func, |
std::shared_ptr< void > | pp, | ||
std::vector< double > | par, | ||
const double | a, | ||
const double | b, | ||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | limit_size = 1000 , |
||
const int | rule = 6 |
||
) |
integral, using the GSL qag method
it only works with a function defined as std::function<double(double)> that doesn't use fixed parameters (useful for class members, when the external parameters can be attributes of the class)
func | the fuction to be integrated |
pp | a void pointer |
par | a vector containing the coefficients |
a | the lower limit of the integral |
b | the upper limit of the integral |
rel_err | the relative error |
abs_err | the absolute error |
limit_size | the maximum size of workspace |
rule | the rule of integration |
Definition at line 386 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_qag | ( | gsl_function | Func, |
const double | a, | ||
const double | b, | ||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | limit_size = 1000 , |
||
const int | rule = 6 |
||
) |
integral, computed using the GSL qag method
Func | the GSL function to be integrated |
a | the lower limit of the integral |
b | the upper limit of the integral |
rel_err | the relative error |
abs_err | the absolute error |
limit_size | the maximum size of workspace |
rule | the rule of integration |
Definition at line 180 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_qagiu | ( | FunctionDoubleDouble | func, |
const double | a, | ||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | limit_size = 1000 |
||
) |
integral, using the GSL qagiu method
it only works with a function defined as std::function<double(double)> that doesn't use fixed parameters (useful for class members, when the external parameters can be attributes of the class)
func | the fuction to be integrated |
a | the lower limit of the integral |
rel_err | the relative error |
abs_err | the absolute error |
limit_size | the maximum size of workspace |
Definition at line 343 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_qagiu | ( | FunctionDoubleDoublePtrVectorRef | func, |
std::shared_ptr< void > | pp, | ||
std::vector< double > | par, | ||
const double | a, | ||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | limit_size = 1000 |
||
) |
integral, using the GSL qagiu method
it only works with a function defined as std::function<double(double)> that doesn't use fixed parameters (useful for class members, when the external parameters can be attributes of the class)
func | the fuction to be integrated |
pp | a void pointer |
par | a vector containing the coefficients |
a | the lower limit of the integral |
rel_err | the relative error |
abs_err | the absolute error |
limit_size | the maximum size of workspace |
Definition at line 408 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_qagiu | ( | gsl_function | Func, |
const double | a, | ||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | limit_size = 1000 |
||
) |
integral, computed using the GSL qagiu method
Func | the GSL function to be integrated |
a | the lower limit of the integral |
rel_err | the relative error |
abs_err | the absolute error |
limit_size | the maximum size of workspace |
Definition at line 220 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_qags | ( | FunctionDoubleDouble | func, |
const double | a, | ||
const double | b, | ||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | limit_size = 1000 |
||
) |
integral, using the GSL qags method
it only works with function defined as std::function<double(double)> that doesn't use fixed parameters (useful for class members, when the external parameters could be attributes of the class)
func | the fuction to be integrated |
a | the lower limit of the integral |
b | the upper limit of the integral |
rel_err | the relative error |
abs_err | the absolute error |
limit_size | the maximum size of workspace |
Definition at line 327 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_qags | ( | FunctionDoubleDoublePtrVectorRef | func, |
std::shared_ptr< void > | pp, | ||
std::vector< double > | par, | ||
const double | a, | ||
const double | b, | ||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | limit_size = 1000 |
||
) |
integral, using the GSL qags method
it only works with a function defined as std::function<double(double)> that doesn't use fixed parameters (useful for class members, when the external parameters can be attributes of the class)
func | the fuction to be integrated |
pp | a void pointer |
par | a vector containing the coefficients |
a | the lower limit of the integral |
b | the upper limit of the integral |
rel_err | the relative error |
abs_err | the absolute error |
limit_size | the maximum size of workspace |
Definition at line 397 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_qags | ( | gsl_function | Func, |
const double | a, | ||
const double | b, | ||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | limit_size = 1000 |
||
) |
integral, computed using the GSL qags method
Func | the GSL function to be integrated |
a | the lower limit of the integral |
b | the upper limit of the integral |
rel_err | the relative error |
abs_err | the absolute error |
limit_size | the maximum size of workspace |
Definition at line 200 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_qaws | ( | FunctionDoubleDouble | func, |
const double | a, | ||
const double | b, | ||
const double | alpha = 0 , |
||
const double | beta = 0 , |
||
const int | mu = 1 , |
||
const int | nu = 0 , |
||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | limit_size = 1000 |
||
) |
integral, using the GSL qaws method
func | the function to be integrated |
a | the lower limit of the integral |
b | the upper limit of the integral |
alpha | α |
beta | β |
mu | μ |
nu | ν |
rel_err | the relative error |
abs_err | the absolute error |
limit_size | the maximum size of workspace |
Definition at line 359 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_qaws | ( | FunctionDoubleDoublePtrVectorRef | func, |
std::shared_ptr< void > | pp, | ||
std::vector< double > | par, | ||
const double | a, | ||
const double | b, | ||
const double | alpha = 0 , |
||
const double | beta = 0 , |
||
const int | mu = 1 , |
||
const int | nu = 0 , |
||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | limit_size = 1000 |
||
) |
integral, using the GSL qag method
func | the function to be integrated |
pp | a void pointer |
par | a vector containing the coefficients |
a | the lower limit of the integral |
b | the upper limit of the integral |
alpha | α |
beta | β |
mu | μ |
nu | ν |
rel_err | the relative error |
abs_err | the absolute error |
limit_size | the maximum size of workspace |
Definition at line 419 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_qaws | ( | gsl_function | Func, |
const double | a, | ||
const double | b, | ||
const double | alpha = 0 , |
||
const double | beta = 0 , |
||
const int | mu = 1 , |
||
const int | nu = 0 , |
||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 , |
||
const int | limit_size = 1000 |
||
) |
integral, computed using the GSL qaws method
Func | the GSL function to be integrated |
a | the lower limit of the integral |
b | the upper limit of the integral |
alpha | α |
beta | β |
mu | μ |
nu | ν |
rel_err | the relative error |
abs_err | the absolute error |
limit_size | the maximum size of workspace |
Definition at line 240 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_romberg | ( | FunctionDoubleDouble | Func, |
const double | a, | ||
const double | b, | ||
const int | npoints, | ||
const double | eps_rel = 1.e-4 , |
||
const double | eps_abs = 1.e-12 |
||
) |
integral, using the gsl romberg method
it only works with a function defined as std::function<double(double)> that doesn't use fixed parameters (useful for class members, when the external parameters can be attributes of the class)
The number of function evaluation is \( 2^n+1 \), n being the input parameter npoints
Func | the fuction to be integrated |
a | the lower limit of the integral |
b | the upper limit of the integral |
npoints | the number of points |
eps_rel | the relative error |
eps_abs | the absolute error |
Definition at line 279 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_integrate_romberg | ( | gsl_function | Func, |
const double | a, | ||
const double | b, | ||
const int | npoints, | ||
const double | eps_rel = 1.e-4 , |
||
const double | eps_abs = 1.e-12 |
||
) |
integral, using the gsl romberg method
it only works with a function defined as std::function<double(double)> that doesn't use fixed parameters (useful for class members, when the external parameters can be attributes of the class)
The number of function evaluation is \( 2^n+1 \), n being the input parameter npoints
Func | the fuction to be integrated |
a | the lower limit of the integral |
b | the upper limit of the integral |
npoints | the number of points |
eps_rel | the relative error |
eps_abs | the absolute error |
Definition at line 130 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_minimize_1D | ( | FunctionDoubleDouble | func, |
const double | start, | ||
double | min = par::defaultDouble , |
||
double | max = -par::defaultDouble , |
||
const int | max_iter = 1000 , |
||
const bool | verbose = false |
||
) |
minimize the provided function using GSL procedure
func | the function to minimize |
start | the starting point |
min | the minimum of the search interval |
max | the maximum of the search interval |
max_iter | maximum number of iteration |
verbose | show output |
Definition at line 658 of file GSLwrapper.cpp.
vector< double > cbl::wrapper::gsl::GSL_minimize_nD | ( | FunctionDoubleVector | func, |
const std::vector< double > | start, | ||
const std::vector< std::vector< double >> | ranges, | ||
const unsigned int | max_iter = 1000 , |
||
const double | tol = 1.e-6 , |
||
const double | epsilon = 0.1 |
||
) |
minimize the provided function using GSL procedure
func | the function to minimize |
start | the starting point |
ranges | limits for the parameters |
max_iter | maximum number of iteration |
tol | tolerance of the minimization |
epsilon | the simplex side |
Definition at line 497 of file GSLwrapper.cpp.
vector< double > cbl::wrapper::gsl::GSL_minimize_nD | ( | FunctionDoubleVectorRef | func, |
const std::vector< double > | start, | ||
const std::vector< std::vector< double >> | ranges, | ||
const unsigned int | max_iter = 1000 , |
||
const double | tol = 1.e-6 , |
||
const double | epsilon = 0.1 |
||
) |
minimize the provided function using GSL procedure
func | the function to minimize |
start | the starting point |
ranges | limits for the parameters |
max_iter | maximum number of iteration |
tol | tolerance of the minimization |
epsilon | the simplex side |
Definition at line 575 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_polynomial_eval | ( | const double | x, |
const std::shared_ptr< void > | fixed_parameters, | ||
const std::vector< double > | coeff | ||
) |
evaluate a polynomial
x | the independent variable |
fixed_parameters | fixed parameters of the polynomial |
coeff | polynomial coefficients |
Definition at line 715 of file GSLwrapper.cpp.
void cbl::wrapper::gsl::GSL_polynomial_root | ( | const std::vector< double > | coeff, |
std::vector< std::vector< double >> & | root | ||
) |
find polynomial roots
coeff | polynomial coefficients |
root | polynomial roots |
Definition at line 725 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_root_brent | ( | FunctionDoubleDouble | func, |
double | xx0, | ||
const double | low_guess, | ||
const double | up_guess, | ||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 |
||
) |
function to find roots using GSL brent method
func | the function to be integrated |
xx0 | the value of the zero |
low_guess | the lower limit |
up_guess | the upper limit |
rel_err | the relative error |
abs_err | the absolute error |
Definition at line 478 of file GSLwrapper.cpp.
double cbl::wrapper::gsl::GSL_root_brent | ( | gsl_function | Func, |
const double | low_guess, | ||
const double | up_guess, | ||
const double | rel_err = 1.e-3 , |
||
const double | abs_err = 0 |
||
) |
function to find roots using GSL qag method
Func | the GSL function to be integrated |
low_guess | the lower limit |
up_guess | the upper limit |
rel_err | the relative error |
abs_err | the absolute error |
Definition at line 430 of file GSLwrapper.cpp.