CMS 3D CMS Logo

Public Member Functions | Private Attributes

funct::RootIntegrator Struct Reference

#include <NumericalIntegration.h>

List of all members.

Public Member Functions

template<typename F >
double operator() (const F &f, double a, double b) const
RootIntegratoroperator= (const RootIntegrator &o)
 RootIntegrator (ROOT::Math::IntegrationOneDim::Type type=ROOT::Math::IntegrationOneDim::kADAPTIVE, double absTol=1e-9, double relTol=1e-6, unsigned int size=1000, unsigned int rule=3)
 RootIntegrator (const RootIntegrator &o)

Private Attributes

double absTol_
std::auto_ptr
< ROOT::Math::Integrator > 
integrator_
double relTol_
unsigned int rule_
unsigned int size_
ROOT::Math::IntegrationOneDim::Type type_

Detailed Description

Definition at line 121 of file NumericalIntegration.h.


Constructor & Destructor Documentation

funct::RootIntegrator::RootIntegrator ( ROOT::Math::IntegrationOneDim::Type  type = ROOT::Math::IntegrationOneDim::kADAPTIVE,
double  absTol = 1e-9,
double  relTol = 1e-6,
unsigned int  size = 1000,
unsigned int  rule = 3 
) [inline]

Definition at line 122 of file NumericalIntegration.h.

                                                                                                                :
      type_(type), absTol_(absTol), relTol_(relTol), size_(size), rule_(rule),
      integrator_(new ROOT::Math::Integrator(type, absTol, relTol, size, rule)) { }
funct::RootIntegrator::RootIntegrator ( const RootIntegrator o) [inline]

Definition at line 126 of file NumericalIntegration.h.

References absTol_, integrator_, relTol_, rule_, size_, and type_.

                                             { 
      type_ = o.type_; 
      absTol_ = o.absTol_; relTol_ = o.relTol_;
      size_ = o.size_; rule_ = o.rule_;
      integrator_.reset(new ROOT::Math::Integrator(type_, absTol_, relTol_, size_, rule_));
    }

Member Function Documentation

template<typename F >
double funct::RootIntegrator::operator() ( const F &  f,
double  a,
double  b 
) const [inline]

Definition at line 140 of file NumericalIntegration.h.

References integrator_, cppFunctionSkipper::operator, and wrapper.

                                                            {
      ROOT::Math::Functor1D wrapper(&f, &F::operator());
      integrator_->SetFunction(wrapper);
      return integrator_->Integral(a, b);
    }
RootIntegrator& funct::RootIntegrator::operator= ( const RootIntegrator o) [inline]

Definition at line 132 of file NumericalIntegration.h.

References absTol_, integrator_, relTol_, rule_, size_, and type_.

                                                         {
      type_ = o.type_; 
      absTol_ = o.absTol_; relTol_ = o.relTol_;
      size_ = o.size_; rule_ = o.rule_;
      integrator_.reset(new ROOT::Math::Integrator(type_, absTol_, relTol_, size_, rule_));
      return * this;
    }

Member Data Documentation

Definition at line 147 of file NumericalIntegration.h.

Referenced by operator=(), and RootIntegrator().

std::auto_ptr<ROOT::Math::Integrator> funct::RootIntegrator::integrator_ [mutable, private]

Definition at line 149 of file NumericalIntegration.h.

Referenced by operator()(), operator=(), and RootIntegrator().

Definition at line 147 of file NumericalIntegration.h.

Referenced by operator=(), and RootIntegrator().

unsigned int funct::RootIntegrator::rule_ [private]

Definition at line 148 of file NumericalIntegration.h.

Referenced by operator=(), and RootIntegrator().

unsigned int funct::RootIntegrator::size_ [private]

Definition at line 148 of file NumericalIntegration.h.

Referenced by operator=(), and RootIntegrator().

ROOT::Math::IntegrationOneDim::Type funct::RootIntegrator::type_ [private]

Definition at line 146 of file NumericalIntegration.h.

Referenced by operator=(), and RootIntegrator().