CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
DefiniteIntegral.hh
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id: DefiniteIntegral.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
3//-------------------------------------------------------------//
4// //
5// This functional performs Romberg integration on a function //
6// between lower bound and upper bound b. //
7// //
8// Two types: OPEN: use open quadrature formula //
9// for improper integrals //
10// CLOSED (default) use closed quadrature //
11// formula. //
12// //
13//-------------------------------------------------------------//
14
15#ifndef _DefiniteIntegral_h_
16#define _DefiniteIntegral_h_
17#include "CLHEP/GenericFunctions/AbsFunctional.hh"
18
19namespace Genfun {
20
21 /**
22 * @author
23 * @ingroup genfun
24 */
26
27 public:
28
29 // Type definition:
30 typedef enum {CLOSED, OPEN} Type;
31
32 // Constructor:
33 DefiniteIntegral(double a, double b, Type=CLOSED);
34
35 // Copy Constructor:
37
38 // Assignment Operator:
40
41 // Destructor:
43
44 // Take the definite integral of a function between the bounds:
45 virtual double operator [] (const AbsFunction & function) const;
46
47 // Retrieve the number of function calls for the last operation:
48 unsigned int numFunctionCalls() const;
49
50 // Algorithmic parameters:
51
52 // Desired precision (default 1.0E-06)
53 void setEpsilon(double eps);
54
55 // Maximum number of iterations (default 20(closed) 14 (open))
56 void setMaxIter (unsigned int maxIter);
57
58 // Minimum order:
59 void setMinOrder (unsigned int order);
60
61
62 private:
63
64 class Clockwork;
65 Clockwork *c;
66
67 };
68} // namespace Genfun
69#endif
void setMinOrder(unsigned int order)
virtual double operator[](const AbsFunction &function) const
unsigned int numFunctionCalls() const
DefiniteIntegral & operator=(const DefiniteIntegral &)
void setMaxIter(unsigned int maxIter)
Definition: Abs.hh:14