NuTo
Numerics Tool
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
NuTo::Math::Interpolation Class Referenceabstract

#include <Interpolation.h>

Inheritance diagram for NuTo::Math::Interpolation:
NuTo::Math::CubicSplineInterpolation NuTo::Math::LinearInterpolation

Public Member Functions

 Interpolation (std::vector< std::array< double, 2 >> data, unsigned numNeighborPoints)
 create interpolation object; call with data array More...
 
virtual ~Interpolation ()=default
 
virtual double operator() (double x) const =0
 return interpolated value at x; order is the order of the derivative More...
 
virtual double derivative (double x) const =0
 calculate first derivative at x More...
 

Public Attributes

std::function< double(double)> f = [this](double x) { return operator()(x); }
 function object More...
 
std::function< double(double)> df = [this](double x) { return derivative(x); }
 derivative function object More...
 

Protected Member Functions

unsigned bisection (double x) const
 

Protected Attributes

std::vector< std::array< double, 2 > > mData
 
unsigned mNumNeighborPoints
 

Constructor & Destructor Documentation

NuTo::Math::Interpolation::Interpolation ( std::vector< std::array< double, 2 >>  data,
unsigned  numNeighborPoints 
)

create interpolation object; call with data array

virtual NuTo::Math::Interpolation::~Interpolation ( )
virtualdefault

Member Function Documentation

unsigned NuTo::Math::Interpolation::bisection ( double  x) const
protected
virtual double NuTo::Math::Interpolation::derivative ( double  x) const
pure virtual

calculate first derivative at x

Implemented in NuTo::Math::LinearInterpolation, and NuTo::Math::CubicSplineInterpolation.

virtual double NuTo::Math::Interpolation::operator() ( double  x) const
pure virtual

return interpolated value at x; order is the order of the derivative

Implemented in NuTo::Math::LinearInterpolation, and NuTo::Math::CubicSplineInterpolation.

Member Data Documentation

std::function<double(double)> NuTo::Math::Interpolation::df = [this](double x) { return derivative(x); }

derivative function object

std::function<double(double)> NuTo::Math::Interpolation::f = [this](double x) { return operator()(x); }

function object

std::vector<std::array<double, 2> > NuTo::Math::Interpolation::mData
protected
unsigned NuTo::Math::Interpolation::mNumNeighborPoints
protected

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