herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
Shower
Dipole
AlphaS
gsl.h
1
// -*- C++ -*-
2
3
// math/gsl.h is part of matchbox
4
// (C) 2008 Simon Platzer -- sp@particle.uni-karlsruhe.de
5
6
#ifndef matchbox_math_gsl_h
7
#define matchbox_math_gsl_h
8
9
#include "gsl/gsl_math.h"
10
#include "gsl/gsl_roots.h"
11
12
#include "ThePEG/Utilities/Exception.h"
13
14
namespace
matchbox {
15
16
namespace
gsl {
17
19
struct
gsl_exception
:
public
ThePEG::Exception
{ };
20
22
template
<
class
Function,
unsigned
long
MaxIterations>
23
struct
bisection_root_solver
{
24
26
inline
bisection_root_solver
(
const
Function& thef) :
f
(thef) {
27
s
= gsl_root_fsolver_alloc (gsl_root_fsolver_bisection);
28
}
29
31
~bisection_root_solver
() {
32
gsl_root_fsolver_free (
s
);
33
}
34
36
double
solve
(std::pair<double,double> interval,
double
precision = .000001);
37
39
Function
f
;
40
42
gsl_root_fsolver *
s
;
43
44
};
45
46
}
47
48
}
49
50
#include "gsl.tcc"
51
52
#endif
// matchbox_math_gsl_h
ThePEG::Exception
matchbox::gsl::bisection_root_solver
wrapper araound the bisection root solver
Definition:
gsl.h:23
matchbox::gsl::bisection_root_solver::f
Function f
function object representing the equation to be solved
Definition:
gsl.h:39
matchbox::gsl::bisection_root_solver::bisection_root_solver
bisection_root_solver(const Function &thef)
constructor – allocates the solver
Definition:
gsl.h:26
matchbox::gsl::bisection_root_solver::s
gsl_root_fsolver * s
the gsl solver used
Definition:
gsl.h:42
matchbox::gsl::bisection_root_solver::~bisection_root_solver
~bisection_root_solver()
destructor – frees the solver
Definition:
gsl.h:31
matchbox::gsl::bisection_root_solver::solve
double solve(std::pair< double, double > interval, double precision=.000001)
solve for root given initial interval
matchbox::gsl::gsl_exception
exception class for GSL problems
Definition:
gsl.h:19
Generated on Thu Jun 20 2024 17:50:53 for Herwig by
1.9.6