MIRA
Public Member Functions | List of all members
IntervalFilter Class Reference

Concept and base class for all Interpolators and Filters. More...

#include <math/IntervalFilter.h>

Inheritance diagram for IntervalFilter:
Inheritance graph
[legend]

Public Member Functions

bool canExtrapolate () const
 Returns true, if the filter/interpolator is able to extrapolate. More...
 
int samples () const
 Derived class must return the total number of sample points they require for their filtering/interpolation. More...
 
int samplesBefore () const
 Derived class must return the number of sample points that are desired before the interval. More...
 
int samplesAfter () const
 Derived class must return the number of sample points that are desired after the interval. More...
 
template<typename Tx , typename Ty , typename ContainerTx , typename ContainerTy >
Ty apply (const ContainerTx &x, const ContainerTy &y, const Tx &xx)
 Filters/interpolates the specified data. More...
 

Detailed Description

Concept and base class for all Interpolators and Filters.

Interpolators and Filters can be used within the Transform framework and when obtaining values from Channels, in order to interpolate or filter these values, etc. See the corresponding documentation for more details.

Member Function Documentation

◆ canExtrapolate()

bool canExtrapolate ( ) const
inline

Returns true, if the filter/interpolator is able to extrapolate.

◆ samples()

int samples ( ) const
inline

Derived class must return the total number of sample points they require for their filtering/interpolation.

The caller must guarantee that the apply() method below is called exactly with the required number of samples.

◆ samplesBefore()

int samplesBefore ( ) const
inline

Derived class must return the number of sample points that are desired before the interval.

If canExtrapolate() yields false, then the caller must guarantee that the apply() method below is called exactly with the required number of samples before the desired interval.

◆ samplesAfter()

int samplesAfter ( ) const
inline

Derived class must return the number of sample points that are desired after the interval.

If canExtrapolate() yields false, then the caller must guarantee that the apply() method below is called exactly with the required number of samples after the desired interval.

◆ apply()

Ty apply ( const ContainerTx &  x,
const ContainerTy &  y,
const Tx &  xx 
)
inline

Filters/interpolates the specified data.

The data is provided as samples of data pairs within the containers x,y. The method computes the filtered data at the position xx and returns it.

The caller must guarantee the following preconditions:

  • the containers x and y contain exactly the number of samples that is returned by the samples() method
  • if canExtrapolate() yields false, the number of samples before the interval, xx is located in, must equal exactly the number that is returned by samplesBefore().
  • if canExtrapolate() yields false, the number of samples after the interval, xx is located in, must equal exactly the number that is returned by samplesAfter().
Parameters
[in]xThe arguments of the control points
[in]yThe values of the control points for the above arguments
[in]xxThe argument where the value is filtered/interpolated for

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