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

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

Public Typedefs

typedef T::FirstType InputType
 
typedef T::SecondType OutputType
 
typedef modm::SignedType< OutputType > OutputSignedType
 
typedef modm::WideType< OutputSignedType > WideType
 

Public Member Functions

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

Detailed Description

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

Template Parameters
TAny specialization of modm::Pair<>
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::Linear< T, Accessor >::Linear ( 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::Linear< T, Accessor >::interpolate ( const InputType &  value) const

Perform a linear interpolation.

Parameters
valueinput value
Returns
interpolated value

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