SpinParser  1.0
Functions
Integrator.hpp File Reference

One-dimensional numerical integration routines. More...

#include <functional>
#include "lib/Assert.hpp"
#include "FrgCommon.hpp"
Include dependency graph for Integrator.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class T >
Integrator::integrate (const FrequencyIterator min, const FrequencyIterator max, const std::function< T(float)> &integrand)
 One-dimensional trapezoidal integration in one-dimensional frequency space. More...
 
template<class T >
Integrator::integrateWithObscureLeftBoundary (const float min, const FrequencyIterator max, const std::function< T(float)> &integrand)
 One-dimensional trapezoidal integration in one-dimensional frequency space. More...
 
template<class T >
Integrator::integrateWithObscureRightBoundary (const FrequencyIterator min, const float max, const std::function< T(float)> &integrand)
 One-dimensional trapezoidal integration in one-dimensional frequency space. More...
 
template<class T >
Integrator::integrateWithObscureBoundaries (const float min, const float max, const std::function< T(float)> &integrand)
 One-dimensional trapezoidal integration in one-dimensional frequency space. More...
 
template<class T >
void ImplicitIntegrator::integrateWithObscureLeftBoundary (const float min, const FrequencyIterator max, const std::function< void(float, T &)> &integrand, T &integrandBuffer, T &resultBuffer)
 One-dimensional trapezoidal integration in one-dimensional frequency space. First argument of the integrand function is the frequency value, the second argument is the return value of the integrand, passed by reference. More...
 
template<class T >
void ImplicitIntegrator::integrateWithObscureRightBoundary (const FrequencyIterator min, const float max, const std::function< void(float, T &)> &integrand, T &integrandBuffer, T &resultBuffer)
 One-dimensional trapezoidal integration in one-dimensional frequency space. First argument of the integrand function is the frequency value, the second argument is the return value of the integrand, passed by reference. More...
 
template<class T >
void ImplicitIntegrator::integrateWithObscureBoundaries (const float min, const float max, const std::function< void(float, T &)> &integrand, T &integrandBuffer, T &resultBuffer)
 One-dimensional trapezoidal integration in one-dimensional frequency space. First argument of the integrand function is the frequency value, the second argument is the return value of the integrand, passed by reference. More...
 

Detailed Description

One-dimensional numerical integration routines.

Author
Finn Lasse Buessen

Function Documentation

◆ integrate()

template<class T >
T Integrator::integrate ( const FrequencyIterator  min,
const FrequencyIterator  max,
const std::function< T(float)> &  integrand 
)

One-dimensional trapezoidal integration in one-dimensional frequency space.

Template Parameters
TIntegrand type.
Parameters
minIterator to lower boundary frequency value.
maxIterator to upper boundary frequency value.
integrandIntegrand function.
Returns
T Value of the integral.

◆ integrateWithObscureBoundaries() [1/2]

template<class T >
T Integrator::integrateWithObscureBoundaries ( const float  min,
const float  max,
const std::function< T(float)> &  integrand 
)

One-dimensional trapezoidal integration in one-dimensional frequency space.

Template Parameters
TIntegrand type.
Parameters
minLower boundary frequency value.
maxUpper boundary frequency value.
integrandIntegrand function.
Returns
T Value of the integral.

◆ integrateWithObscureBoundaries() [2/2]

template<class T >
void ImplicitIntegrator::integrateWithObscureBoundaries ( const float  min,
const float  max,
const std::function< void(float, T &)> &  integrand,
T &  integrandBuffer,
T &  resultBuffer 
)

One-dimensional trapezoidal integration in one-dimensional frequency space. First argument of the integrand function is the frequency value, the second argument is the return value of the integrand, passed by reference.

Template Parameters
TIntegrand type.
Parameters
[in]minLower boundary frequency value.
[in]maxUpper boundary frequency value.
[in]integrandIntegrand function.
[out]integrandBufferReturn value buffer of the integrand.
[out]resultBufferValue of the integral.

◆ integrateWithObscureLeftBoundary() [1/2]

template<class T >
T Integrator::integrateWithObscureLeftBoundary ( const float  min,
const FrequencyIterator  max,
const std::function< T(float)> &  integrand 
)

One-dimensional trapezoidal integration in one-dimensional frequency space.

Template Parameters
TIntegrand type.
Parameters
minLower boundary frequency value.
maxIterator to upper boundary frequency value.
integrandIntegrand function.
Returns
T Value of the integral.

◆ integrateWithObscureLeftBoundary() [2/2]

template<class T >
void ImplicitIntegrator::integrateWithObscureLeftBoundary ( const float  min,
const FrequencyIterator  max,
const std::function< void(float, T &)> &  integrand,
T &  integrandBuffer,
T &  resultBuffer 
)

One-dimensional trapezoidal integration in one-dimensional frequency space. First argument of the integrand function is the frequency value, the second argument is the return value of the integrand, passed by reference.

Template Parameters
TIntegrand type.
Parameters
[in]minLower boundary frequency value.
[in]maxIterator to upper boundary frequency value.
[in]integrandIntegrand function.
[out]integrandBufferReturn value buffer of the integrand.
[out]resultBufferValue of the integral.

◆ integrateWithObscureRightBoundary() [1/2]

template<class T >
T Integrator::integrateWithObscureRightBoundary ( const FrequencyIterator  min,
const float  max,
const std::function< T(float)> &  integrand 
)

One-dimensional trapezoidal integration in one-dimensional frequency space.

Template Parameters
TIntegrand type.
Parameters
minIterator to lower boundary frequency value.
maxUpper boundary frequency value.
integrandIntegrand function.
Returns
T Value of the integral.

◆ integrateWithObscureRightBoundary() [2/2]

template<class T >
void ImplicitIntegrator::integrateWithObscureRightBoundary ( const FrequencyIterator  min,
const float  max,
const std::function< void(float, T &)> &  integrand,
T &  integrandBuffer,
T &  resultBuffer 
)

One-dimensional trapezoidal integration in one-dimensional frequency space. First argument of the integrand function is the frequency value, the second argument is the return value of the integrand, passed by reference.

Template Parameters
TIntegrand type.
Parameters
[in]minIterator to lower boundary frequency value.
[in]maxUpper boundary frequency value.
[in]integrandIntegrand function.
[out]integrandBufferReturn value buffer of the integrand.
[out]resultBufferValue of the integral.