ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
gauss_kronrod::Integral< Integrand > Struct Template Reference

Interface to R's adaptive integrate routine. More...

#include <integrate.hpp>

Classes

struct  vectorized_integrand
 

Public Types

typedef Integrand::Scalar Type
 

Public Member Functions

 Integral (Integrand f_, Type a_, Type b_, control c=control())
 Constructor. More...
 
Integrand & integrand ()
 Return reference to integrand so the user can change parameters. More...
 
Type operator() ()
 
void setAccuracy (double epsrel_=1e-4, double epsabs_=1e-4)
 
void setBounds (Type a_, Type b_)
 
void setWorkspace (int subdivisions=100)
 

Public Attributes

Type a
 
Type abserr
 
Type b
 
Type bound
 
Type epsabs
 
Type epsrel
 
struct
gauss_kronrod::Integral::vectorized_integrand 
fn
 
int ier
 
int inf
 
vector< int > iwork
 
int last
 
int lenw
 
int limit
 
int neval
 
Type result
 
vector< Typework
 

Detailed Description

template<class Integrand>
struct gauss_kronrod::Integral< Integrand >

Interface to R's adaptive integrate routine.

Takes Integrand (functor) as template parameter. Integrand must be a template class where:

  1. Template parameter is the scalar type.
  2. Contains a 'typedef Type Scalar;'
  3. Has an evaluation operator.

Use this class if multiple integrals must be computed with different parameters. Otherwise use the 'integrate' function (see below).

Definition at line 71 of file integrate.hpp.

Member Typedef Documentation

template<class Integrand>
typedef Integrand::Scalar gauss_kronrod::Integral< Integrand >::Type

Definition at line 72 of file integrate.hpp.

Constructor & Destructor Documentation

template<class Integrand>
gauss_kronrod::Integral< Integrand >::Integral ( Integrand  f_,
Type  a_,
Type  b_,
control  c = control() 
)
inline

Constructor.

Parameters
f_Functor integrand
a_Lower integration limit. Negative infinity allowed.
b_Upper integration limit. Positive infinity allowed.
c_Control parameters for accuracy.

Definition at line 113 of file integrate.hpp.

Member Function Documentation

template<class Integrand>
Integrand& gauss_kronrod::Integral< Integrand >::integrand ( )
inline

Return reference to integrand so the user can change parameters.

Definition at line 82 of file integrate.hpp.

template<class Integrand>
Type gauss_kronrod::Integral< Integrand >::operator() ( void  )
inline

Definition at line 120 of file integrate.hpp.

template<class Integrand>
void gauss_kronrod::Integral< Integrand >::setAccuracy ( double  epsrel_ = 1e-4,
double  epsabs_ = 1e-4 
)
inline
template<class Integrand>
void gauss_kronrod::Integral< Integrand >::setBounds ( Type  a_,
Type  b_ 
)
inline
template<class Integrand>
void gauss_kronrod::Integral< Integrand >::setWorkspace ( int  subdivisions = 100)
inline

Member Data Documentation

template<class Integrand>
Type gauss_kronrod::Integral< Integrand >::a
template<class Integrand>
Type gauss_kronrod::Integral< Integrand >::abserr
template<class Integrand>
Type gauss_kronrod::Integral< Integrand >::b
template<class Integrand>
Type gauss_kronrod::Integral< Integrand >::bound
template<class Integrand>
Type gauss_kronrod::Integral< Integrand >::epsabs
template<class Integrand>
Type gauss_kronrod::Integral< Integrand >::epsrel
template<class Integrand>
struct gauss_kronrod::Integral::vectorized_integrand gauss_kronrod::Integral< Integrand >::fn
template<class Integrand>
int gauss_kronrod::Integral< Integrand >::ier
template<class Integrand>
int gauss_kronrod::Integral< Integrand >::inf
template<class Integrand>
vector<int> gauss_kronrod::Integral< Integrand >::iwork
template<class Integrand>
int gauss_kronrod::Integral< Integrand >::last
template<class Integrand>
int gauss_kronrod::Integral< Integrand >::lenw
template<class Integrand>
int gauss_kronrod::Integral< Integrand >::limit
template<class Integrand>
int gauss_kronrod::Integral< Integrand >::neval
template<class Integrand>
Type gauss_kronrod::Integral< Integrand >::result
template<class Integrand>
vector<Type> gauss_kronrod::Integral< Integrand >::work

The documentation for this struct was generated from the following file: