Interpolation Class Template Reference

#include <interpolation.hpp>

Inheritance diagram for Interpolation:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class RandomAccessIterator1, class RandomAccessIterator2>
class QuantLib::Math::Interpolation< RandomAccessIterator1, RandomAccessIterator2 >

abstract base class for 1-D interpolations

Classes derived from this class will override operator() to provide interpolated values from two sequences of equal length, representing discretized values of a variable and a function of the former, respectively.


Public Member Functions

 Interpolation (const RandomAccessIterator1 &xBegin, const RandomAccessIterator1 &xEnd, const RandomAccessIterator2 &yBegin)
virtual result_type operator() (const argument_type &x, bool allowExtrapolation=false) const=0

Public Attributes

typedef< RandomAccessIterator1
>::value_type 
argument_type
typedef< RandomAccessIterator2
>::value_type 
result_type

Protected Member Functions

void locate (const argument_type &x) const

Protected Attributes

bool isOutOfRange_
RandomAccessIterator1 position_
RandomAccessIterator1 xBegin_
RandomAccessIterator1 xEnd_
RandomAccessIterator2 yBegin_
Size n_


Member Function Documentation

virtual result_type operator() const argument_type &  x,
bool  allowExtrapolation = false
const [pure virtual]
 

This operator must be overridden to provide an implementation of the actual interpolation.

Precondition:
The sequence of values for x must have been sorted for the result to make sense.

Implemented in CubicSpline, LinearInterpolation, LogLinearInterpolation, and LinearInterpolation< RandomAccessIterator1, typename std::vector< result_type >::const_iterator >.


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

QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen