20 #if !defined(__MITSUBA_CORE_QUAD_H_)
21 #define __MITSUBA_CORE_QUAD_H_
23 #include <mitsuba/mitsuba.h>
24 #include <boost/function.hpp>
158 bool useConvergenceEstimate =
true,
167 size_t *evals = NULL)
const;
181 Float adaptiveGaussLobattoStep(
const boost::function<
Float (
Float)>& f,
225 typedef boost::function<void (const Float *, Float *)>
Integrand;
247 size_t maxEvals,
Float absError = 0,
Float relError = 0);
263 EResult integrate(
const Integrand &f,
const Float *min,
const Float *max,
264 Float *result,
Float *error,
size_t *evals = NULL)
const;
293 EResult integrateVectorized(
const VectorizedIntegrand &f,
const Float *min,
294 const Float *max,
Float *result,
Float *error,
size_t *evals = NULL)
const;
bool m_useConvergenceEstimate
Definition: quad.h:193
void gaussLobatto(int n, Float *nodes, Float *weights)
Computes the nodes and weights of a Gauss-Lobatto quadrature rule with the given number of evaluation...
size_t m_maxEvals
Definition: quad.h:192
std::pair< double, double > legendrePD(int l, double x)
Evaluate the l-th Legendre polynomial and its derivative using recurrence (double precision) ...
double legendreP(int l, int m, double x)
Evaluate an associated Legendre polynomial using recurrence (double precision)
#define MTS_EXPORT_CORE
Definition: getopt.h:29
static const Float m_beta
Definition: quad.h:196
Float m_relError
Definition: quad.h:297
static const Float m_x1
Definition: quad.h:197
size_t m_maxEvals
Definition: quad.h:296
boost::function< void(const Float *, Float *)> Integrand
Definition: quad.h:225
Computes the integral of a one-dimensional function using adaptive Gauss-Lobatto quadrature.
Definition: quad.h:132
static const Float m_x3
Definition: quad.h:199
Adaptively computes the integral of a multidimensional function using either a Gauss-Kronod (1D) or a...
Definition: quad.h:223
EResult
Definition: quad.h:228
void gaussLegendre(int n, Float *nodes, Float *weights)
Computes the nodes and weights of a Gauss-Legendre quadrature (aka "Gaussian quadrature") rule with t...
boost::function< Float(Float)> Integrand
Definition: quad.h:134
static const Float m_x2
Definition: quad.h:198
boost::function< void(size_t, const Float *, Float *)> VectorizedIntegrand
Definition: quad.h:226
Float m_relError
Definition: quad.h:191
bool m_warn
Definition: quad.h:194
static const Float m_alpha
Definition: quad.h:195