|
||||
File indexing completed on 2025-01-18 09:54:34
0001 // -*- C++ -*- 0002 // $Id: DefiniteIntegral.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $ 0003 //-------------------------------------------------------------// 0004 // // 0005 // This functional performs Romberg integration on a function // 0006 // between lower bound and upper bound b. // 0007 // // 0008 // Two types: OPEN: use open quadrature formula // 0009 // for improper integrals // 0010 // CLOSED (default) use closed quadrature // 0011 // formula. // 0012 // // 0013 //-------------------------------------------------------------// 0014 0015 #ifndef _DefiniteIntegral_h_ 0016 #define _DefiniteIntegral_h_ 0017 #include "CLHEP/GenericFunctions/AbsFunctional.hh" 0018 0019 namespace Genfun { 0020 0021 /** 0022 * @author 0023 * @ingroup genfun 0024 */ 0025 class DefiniteIntegral:public AbsFunctional { 0026 0027 public: 0028 0029 // Type definition: 0030 typedef enum {CLOSED, OPEN} Type; 0031 0032 // Constructor: 0033 DefiniteIntegral(double a, double b, Type=CLOSED); 0034 0035 // Copy Constructor: 0036 DefiniteIntegral(const DefiniteIntegral &); 0037 0038 // Assignment Operator: 0039 DefiniteIntegral & operator=(const DefiniteIntegral &) ; 0040 0041 // Destructor: 0042 ~DefiniteIntegral(); 0043 0044 // Take the definite integral of a function between the bounds: 0045 virtual double operator [] (const AbsFunction & function) const; 0046 0047 // Retrieve the number of function calls for the last operation: 0048 unsigned int numFunctionCalls() const; 0049 0050 // Algorithmic parameters: 0051 0052 // Desired precision (default 1.0E-06) 0053 void setEpsilon(double eps); 0054 0055 // Maximum number of iterations (default 20(closed) 14 (open)) 0056 void setMaxIter (unsigned int maxIter); 0057 0058 // Minimum order: 0059 void setMinOrder (unsigned int order); 0060 0061 0062 private: 0063 0064 class Clockwork; 0065 Clockwork *c; 0066 0067 }; 0068 } // namespace Genfun 0069 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |