CLHEP
2.4.7.1
C++ Class Library for High Energy Physics
CLHEP
GenericFunctions
Legendre.icc
Go to the documentation of this file.
1
// -*- C++ -*-
2
// $Id:
3
#include "gsl/gsl_sf_legendre.h"
4
#include <cmath>
5
#include <signal.h>
6
#include <assert.h>
7
8
9
namespace
Genfun
{
10
11
FUNCTION_OBJECT_IMP
(Legendre)
12
13
inline
14
Legendre::Legendre
(
unsigned
int
order):
15
_order(order)
16
{
17
}
18
inline
19
Legendre::~Legendre
() {
20
}
21
inline
22
Legendre::Legendre
(
const
Legendre
& right):
23
_order(right._order)
24
{
25
}
26
27
28
inline
29
double
Legendre::operator()
(
double
x)
const
{
30
gsl_sf_result result;
31
int
status = gsl_sf_legendre_Pl_e(_order,x, &result);
32
if
(status!=0) {
33
std::cerr <<
"Warning, GSL function gsl_sf_legendre_e"
34
<<
" return code"
<< status << std::endl;
35
raise(SIGFPE);
36
}
37
return
result.val;
38
}
39
40
}
// end namespace Genfun
FUNCTION_OBJECT_IMP
#define FUNCTION_OBJECT_IMP(classname)
Definition
AbsFunction.hh:149
Genfun::Legendre
Definition
Legendre.hh:13
Genfun::Legendre::~Legendre
virtual ~Legendre()
Definition
Legendre.icc:19
Genfun::Legendre::Legendre
Legendre(unsigned int order)
Definition
Legendre.icc:14
Genfun::Legendre::operator()
virtual double operator()(double argument) const override
Definition
Legendre.icc:29
Genfun
Definition
Abs.hh:14
Generated by
1.12.0