Class implements the logarithmic local interpolation technique. More...

#include <logarithmicInterpolation.hpp>

Inheritance diagram for julian::LogarithmicInterpolation:
julian::Interpolation

Public Member Functions

virtual double operator() (const std::vector< double > &, const std::vector< double > &, const double &) const
 Performs interpolation. More...
 
virtual LogarithmicInterpolation * clone () const
 Virtual copy constructor. More...
 
virtual unsigned int getMinSize () const
 return the minimum number of points required by the interpolation More...
 
virtual std::string info () const
 Name of a class. More...
 
- Public Member Functions inherited from julian::Interpolation
 Interpolation ()
 Constructor. More...
 
virtual ~Interpolation ()
 Destructor. More...
 

Private Member Functions

template<class Archive >
void serialize (Archive &, const unsigned int)
 interface used by Boost serialization library More...
 

Friends

class boost::serialization::access
 

Detailed Description

Class implements the logarithmic local interpolation technique.

The idea of linear interpolation of set of point is to approximate value $y$ at a point $x$ by a line passing through two data points $(x_j,y_j)$ and $(x_{j+1},y_{j+1})$ closest to $(x,y)$. The formula for linear interpolation is:

\[ y = y_j + \frac{y_{j+1} - y_j}{ln(x_{j+1}) - ln(x_j)} (ln(x) - ln(x_j))\]

Precondition
x vector must be sorted.
Note
Interpolation is only defined for interval defined by the first and the last argument given. The interpolation objects do not extrapolate values outside the interval.
x must be positive.

Member Function Documentation

LogarithmicInterpolation * julian::LogarithmicInterpolation::clone ( ) const
virtual

Virtual copy constructor.

Method is an implementation of virtual copy constructor.

Implements julian::Interpolation.

int unsigned julian::LogarithmicInterpolation::getMinSize ( ) const
virtual

return the minimum number of points required by the interpolation

Implements julian::Interpolation.

std::string julian::LogarithmicInterpolation::info ( ) const
virtual

Name of a class.

Method returns string that containing information about class.

Implements julian::Interpolation.

double julian::LogarithmicInterpolation::operator() ( const std::vector< double > &  x,
const std::vector< double > &  y,
const double &  x_int 
) const
virtual

Performs interpolation.

This operator returns value of interpolant at the point x_init. This value is obtained by local logarithmic interpolation on the basis of given arguments (vector x) and corresponding values (vector y). If x_init is outside the interval defined by the first and the last element of vector of the arguments operator returns error.

Implements julian::Interpolation.

template<class Archive >
void julian::LogarithmicInterpolation::serialize ( Archive &  ,
const unsigned  int 
)
inlineprivate

interface used by Boost serialization library


The documentation for this class was generated from the following files:
  • C:/Unix/home/OEM/jULIAN/src/mathematics/interpolation/logarithmicInterpolation.hpp
  • C:/Unix/home/OEM/jULIAN/src/mathematics/interpolation/logarithmicInterpolation.cpp