Options
All
  • Public
  • Public/Protected
  • All
Menu

Integrates a vector or scalar function of vector domain.

Uses a collection of arbitrary 1D integrators along each of the dimensions. A template recursion along dimensions avoids calling depth test or virtual functions.

This class generalizes to an arbitrary number of dimensions the functionality in class TwoDimensionalIntegral

Hierarchy

  • MultidimIntegral

Implements

Index

Constructors

constructor

Properties

Private _integrationLevelEntries

_integrationLevelEntries: Array<TernaryFunction<UnaryFunction<Real[], Real>, Real[], Real[], Real>>

vector of, functions returning reals And taking as argument:

  1. a const ref to a function taking vectors
  2. a vector, 3. another vector. typedefs eventually... at first sight this might look like mimicking a virtual table, it isnt that. The reason is to be able to select the correct integration dimension at run time, this can not be done before because of the template argument restriction to be constant known at compilation.

Private _integrators

_integrators: Integrator[]

Private _varBuffer

_varBuffer: Real[]

One can avoid the passing around of the ct refs to a and b but the price is to keep a copy of them (they are unknown at construction time) On the other hand the vector integration variable has to be created.

Methods

f

Private integrate

Private spawnFcts

  • spawnFcts(depth: Size): void
  • Here is the tradeoff; this is avoiding the dimension limits checks during integration at the price of these asignments during construction. Explicit template instantiation is of no use, an object is needed (notice 'this' is needed for the asignment.) If not all the dimensions up the maximum number are used the waste goes into storage of the functions (in fact only one is used)

    Parameters

    Returns void

Private vectorBinder