NuTo
Numerics Tool
Public Member Functions | List of all members
NuTo::Math::LinearInterpolation Class Reference

#include <LinearInterpolation.h>

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

Public Member Functions

 LinearInterpolation (std::vector< std::array< double, 2 >> data)
 create interpolation object; call with data array More...
 
double operator() (double x) const override
 return interpolated value at x More...
 
double derivative (double x) const override
 calculate first derivative at x More...
 
- Public Member Functions inherited from NuTo::Math::Interpolation
 Interpolation (std::vector< std::array< double, 2 >> data, unsigned numNeighborPoints)
 create interpolation object; call with data array More...
 
virtual ~Interpolation ()=default
 

Additional Inherited Members

- Public Attributes inherited from NuTo::Math::Interpolation
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 inherited from NuTo::Math::Interpolation
unsigned bisection (double x) const
 
- Protected Attributes inherited from NuTo::Math::Interpolation
std::vector< std::array< double, 2 > > mData
 
unsigned mNumNeighborPoints
 

Constructor & Destructor Documentation

NuTo::Math::LinearInterpolation::LinearInterpolation ( std::vector< std::array< double, 2 >>  data)
inline

create interpolation object; call with data array

Member Function Documentation

double NuTo::Math::LinearInterpolation::derivative ( double  x) const
overridevirtual

calculate first derivative at x

Implements NuTo::Math::Interpolation.

double NuTo::Math::LinearInterpolation::operator() ( double  x) const
overridevirtual

return interpolated value at x

Implements NuTo::Math::Interpolation.


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