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

1D nearest neighbor interpolator. More...

#include <math/NearestNeighborInterpolator.h>

Inheritance diagram for NearestNeighborInterpolator:
Inheritance graph
[legend]

Public Member Functions

bool canExtrapolate () const
 
int samples () const
 
int samplesBefore () const
 
int samplesAfter () const
 
template<typename Tx , typename Ty , typename ContainerTx , typename ContainerTy >
const Ty & apply (const ContainerTx &x, const ContainerTy &y, const Tx &xx)
 

Detailed Description

1D nearest neighbor interpolator.

From two samples that are provided in the apply() method, this Filter will always return the value that is closest to the specified value xx.

If both samples have the same distance from xx, the second value will be returned.

Member Function Documentation

◆ canExtrapolate()

bool canExtrapolate ( ) const
inline

◆ samples()

int samples ( ) const
inline

◆ samplesBefore()

int samplesBefore ( ) const
inline

◆ samplesAfter()

int samplesAfter ( ) const
inline

◆ apply()

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

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