modm API documentation
modm::interpolation::Lagrange< T, Accessor > Class Template Reference

#include <modm/math/interpolation/lagrange.hpp>

Public Typedefs

typedef T::FirstType InputType
 
typedef T::SecondType OutputType
 

Public Member Functions

 Lagrange (Accessor< T > supportingPoints, uint8_t numberOfPoints)
 Constructor. More...
 
OutputType interpolate (const InputType &value) const
 Perform a Lagrange-interpolation. More...
 

Detailed Description

template<typename T, template< typename > class Accessor = ::modm::accessor::Ram>
class modm::interpolation::Lagrange< T, Accessor >

Warning
Only floating points types are allowed as second type of modm::Pair, otherwise the calculation will deliver wrong results!
Template Parameters
TAny specialization of modm::Pair<> with a floating point type as second template argument.
AccessorAccessor class. Can be modm::accessor::Ram, modm::accessor::Flash or any self defined accessor class. Default is modm::accessor::Ram.

Constructor & Destructor Documentation

template<typename T , template< typename > class Accessor = ::modm::accessor::Ram>
modm::interpolation::Lagrange< T, Accessor >::Lagrange ( Accessor< T >  supportingPoints,
uint8_t  numberOfPoints 
)

Constructor.

Parameters
supportingPointsSupporting points of the curve. Needs to be an Array of modm::Pair<>.
numberOfPointslength of supportingPoints

Member Function Documentation

template<typename T , template< typename > class Accessor = ::modm::accessor::Ram>
OutputType modm::interpolation::Lagrange< T, Accessor >::interpolate ( const InputType &  value) const

Perform a Lagrange-interpolation.

Parameters
valueinput value
Returns
interpolated value

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