CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
cbl::wrapper::gsl Namespace Reference

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...
 

Detailed Description

The namespace of the GSL wrappers

The gsl namespace contains all the wrapper functions of the GSL routines

Function Documentation

◆ check_GSL_fail()

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.

Parameters
statusthe GSL routine status
exittrue → if the routine raise an error, exit the code; false → show the status of the GSL routine without exiting
CBLfunctionthe name of the function using the GSL routine
GSLroutinethe name of the gsl routine

Definition at line 45 of file GSLwrapper.cpp.

◆ generic_function()

double cbl::wrapper::gsl::generic_function ( const double  xx,
void *  params 
)

function used to integrate interpolated function

Parameters
xxthe point in which function is defined
paramsthe parameters of the function
Returns
the value of the function at xx

Definition at line 60 of file GSLwrapper.cpp.

◆ generic_minimizer()

double cbl::wrapper::gsl::generic_minimizer ( const gsl_vector *  xx,
void *  params 
)

generic roots

Parameters
xxthe point in which function is defined
paramsthe parameters of the function
Returns
the value of the generic minimizer

Definition at line 80 of file GSLwrapper.cpp.

◆ generic_minimizer_return()

double cbl::wrapper::gsl::generic_minimizer_return ( const gsl_vector *  xx,
void *  params 
)

generic roots

Parameters
xxthe point in which function is defined
paramsthe parameters of the function
Returns
the value of the generic minimizer

Definition at line 96 of file GSLwrapper.cpp.

◆ generic_roots()

double cbl::wrapper::gsl::generic_roots ( double  xx,
void *  params 
)

generic roots

Parameters
xxthe point in which function is defined
paramsthe parameters of the function
Returns
the value of the generic root

Definition at line 70 of file GSLwrapper.cpp.

◆ GSL_derivative() [1/2]

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)

Parameters
functhe function to be derived
xxpoint at which the derivative is computed
hhthe initial value of the step size
precthe relative error tolerance
Returns
the definite integral of the function

Definition at line 263 of file GSLwrapper.cpp.

◆ GSL_derivative() [2/2]

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)

Parameters
Functhe GSL function to be derived
xxpoint at which the derivative is computed
hhthe initial value of the step size
precthe relative error tolerance
Returns
the definite integral of the function

Definition at line 114 of file GSLwrapper.cpp.

◆ GSL_integrate_cquad() [1/3]

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)

Parameters
functhe fuction to be integrated
athe lower limit of the integral
bthe upper limit of the integral
rel_errthe relative error
abs_errthe absolute error
nevalsthe number of intervals
Returns
the definite integral of the function

Definition at line 295 of file GSLwrapper.cpp.

◆ GSL_integrate_cquad() [2/3]

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)

Parameters
functhe fuction to be integrated
ppa void pointer
para vector containing the coefficients
athe lower limit of the integral
bthe upper limit of the integral
rel_errthe relative error
abs_errthe absolute error
nevalsthe number of intervals
Returns
the definite integral of the function

Definition at line 375 of file GSLwrapper.cpp.

◆ GSL_integrate_cquad() [3/3]

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)

Parameters
functhe fuction to be integrated
athe lower limit of the integral
bthe upper limit of the integral
rel_errthe relative error
abs_errthe absolute error
nevalsthe number of intervals
Returns
the definite integral of the function

Definition at line 159 of file GSLwrapper.cpp.

◆ GSL_integrate_qag() [1/3]

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)

Parameters
functhe fuction to be integrated
athe lower limit of the integral
bthe upper limit of the integral
rel_errthe relative error
abs_errthe absolute error
limit_sizethe maximum size of workspace
rulethe rule of integration
Returns
the definite integral of the function

Definition at line 311 of file GSLwrapper.cpp.

◆ GSL_integrate_qag() [2/3]

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)

Parameters
functhe fuction to be integrated
ppa void pointer
para vector containing the coefficients
athe lower limit of the integral
bthe upper limit of the integral
rel_errthe relative error
abs_errthe absolute error
limit_sizethe maximum size of workspace
rulethe rule of integration
Returns
the definite integral of the function

Definition at line 386 of file GSLwrapper.cpp.

◆ GSL_integrate_qag() [3/3]

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

Parameters
Functhe GSL function to be integrated
athe lower limit of the integral
bthe upper limit of the integral
rel_errthe relative error
abs_errthe absolute error
limit_sizethe maximum size of workspace
rulethe rule of integration
Returns
the definite integral of the function
Examples
integration_gsl.cpp.

Definition at line 180 of file GSLwrapper.cpp.

◆ GSL_integrate_qagiu() [1/3]

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)

Parameters
functhe fuction to be integrated
athe lower limit of the integral
rel_errthe relative error
abs_errthe absolute error
limit_sizethe maximum size of workspace
Returns
the definite integral of the function

Definition at line 343 of file GSLwrapper.cpp.

◆ GSL_integrate_qagiu() [2/3]

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)

Parameters
functhe fuction to be integrated
ppa void pointer
para vector containing the coefficients
athe lower limit of the integral
rel_errthe relative error
abs_errthe absolute error
limit_sizethe maximum size of workspace
Returns
the definite integral of the function

Definition at line 408 of file GSLwrapper.cpp.

◆ GSL_integrate_qagiu() [3/3]

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

Parameters
Functhe GSL function to be integrated
athe lower limit of the integral
rel_errthe relative error
abs_errthe absolute error
limit_sizethe maximum size of workspace
Returns
the integral of the function

Definition at line 220 of file GSLwrapper.cpp.

◆ GSL_integrate_qags() [1/3]

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)

Parameters
functhe fuction to be integrated
athe lower limit of the integral
bthe upper limit of the integral
rel_errthe relative error
abs_errthe absolute error
limit_sizethe maximum size of workspace
Returns
the definite integral of the function

Definition at line 327 of file GSLwrapper.cpp.

◆ GSL_integrate_qags() [2/3]

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)

Parameters
functhe fuction to be integrated
ppa void pointer
para vector containing the coefficients
athe lower limit of the integral
bthe upper limit of the integral
rel_errthe relative error
abs_errthe absolute error
limit_sizethe maximum size of workspace
Returns
the definite integral of the function

Definition at line 397 of file GSLwrapper.cpp.

◆ GSL_integrate_qags() [3/3]

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

Parameters
Functhe GSL function to be integrated
athe lower limit of the integral
bthe upper limit of the integral
rel_errthe relative error
abs_errthe absolute error
limit_sizethe maximum size of workspace
Returns
the definite integral of the function

Definition at line 200 of file GSLwrapper.cpp.

◆ GSL_integrate_qaws() [1/3]

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

Parameters
functhe function to be integrated
athe lower limit of the integral
bthe upper limit of the integral
alphaα
betaβ
muμ
nuν
rel_errthe relative error
abs_errthe absolute error
limit_sizethe maximum size of workspace
Returns
the definite integral of the function

Definition at line 359 of file GSLwrapper.cpp.

◆ GSL_integrate_qaws() [2/3]

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

Parameters
functhe function to be integrated
ppa void pointer
para vector containing the coefficients
athe lower limit of the integral
bthe upper limit of the integral
alphaα
betaβ
muμ
nuν
rel_errthe relative error
abs_errthe absolute error
limit_sizethe maximum size of workspace
Returns
the definite integral of the function

Definition at line 419 of file GSLwrapper.cpp.

◆ GSL_integrate_qaws() [3/3]

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

Parameters
Functhe GSL function to be integrated
athe lower limit of the integral
bthe upper limit of the integral
alphaα
betaβ
muμ
nuν
rel_errthe relative error
abs_errthe absolute error
limit_sizethe maximum size of workspace
Returns
the definite integral of the function

Definition at line 240 of file GSLwrapper.cpp.

◆ GSL_integrate_romberg() [1/2]

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

Parameters
Functhe fuction to be integrated
athe lower limit of the integral
bthe upper limit of the integral
npointsthe number of points
eps_relthe relative error
eps_absthe absolute error
Returns
the definite integral of the function

Definition at line 279 of file GSLwrapper.cpp.

◆ GSL_integrate_romberg() [2/2]

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

Parameters
Functhe fuction to be integrated
athe lower limit of the integral
bthe upper limit of the integral
npointsthe number of points
eps_relthe relative error
eps_absthe absolute error
Returns
the definite integral of the function

Definition at line 130 of file GSLwrapper.cpp.

◆ GSL_minimize_1D()

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

Parameters
functhe function to minimize
startthe starting point
minthe minimum of the search interval
maxthe maximum of the search interval
max_itermaximum number of iteration
verboseshow output
Returns
the point that minimize the function
Examples
minimisation_gsl.cpp.

Definition at line 658 of file GSLwrapper.cpp.

◆ GSL_minimize_nD() [1/2]

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

Parameters
functhe function to minimize
startthe starting point
rangeslimits for the parameters
max_itermaximum number of iteration
toltolerance of the minimization
epsilonthe simplex side
Returns
vector containing the point that minimize the function
Examples
minimisation_gsl.cpp.

Definition at line 497 of file GSLwrapper.cpp.

◆ GSL_minimize_nD() [2/2]

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

Parameters
functhe function to minimize
startthe starting point
rangeslimits for the parameters
max_itermaximum number of iteration
toltolerance of the minimization
epsilonthe simplex side
Returns
vector containing the point that minimize the function

Definition at line 575 of file GSLwrapper.cpp.

◆ GSL_polynomial_eval()

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

Parameters
xthe independent variable
fixed_parametersfixed parameters of the polynomial
coeffpolynomial coefficients
Returns
the value of the polynomial at x

Definition at line 715 of file GSLwrapper.cpp.

◆ GSL_polynomial_root()

void cbl::wrapper::gsl::GSL_polynomial_root ( const std::vector< double >  coeff,
std::vector< std::vector< double >> &  root 
)

find polynomial roots

Parameters
coeffpolynomial coefficients
rootpolynomial roots

Definition at line 725 of file GSLwrapper.cpp.

◆ GSL_root_brent() [1/2]

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

Parameters
functhe function to be integrated
xx0the value of the zero
low_guessthe lower limit
up_guessthe upper limit
rel_errthe relative error
abs_errthe absolute error
Returns
the function root

Definition at line 478 of file GSLwrapper.cpp.

◆ GSL_root_brent() [2/2]

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

Parameters
Functhe GSL function to be integrated
low_guessthe lower limit
up_guessthe upper limit
rel_errthe relative error
abs_errthe absolute error
Returns
the function root

Definition at line 430 of file GSLwrapper.cpp.