Interpolation2D Class Template Reference

#include <interpolation2D.hpp>

Inheritance diagram for Interpolation2D:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class RandomAccessIteratorX, class RandomAccessIteratorY, class MatricialData>
class QuantLib::Math::Interpolation2D< RandomAccessIteratorX, RandomAccessIteratorY, MatricialData >

abstract base class for 2-D interpolations

Classes derived from this class will override operator() to provide interpolated values from two sequences of length N and M, representing the discretized values of the x,y variables, and a NxM matrix representing the function tabulated z values.

Todo:
Bicubic interpolation and bicubic spline


Public Types

typedef double result_type

Public Member Functions

 Interpolation2D (const RandomAccessIteratorX &xBegin, const RandomAccessIteratorX &xEnd, const RandomAccessIteratorY &yBegin, const RandomAccessIteratorY &yEnd, const MatricialData &data)
virtual double operator() (const first_argument_type &x, const second_argument_type &y, bool allowExtrapolation=false) const=0

Public Attributes

typedef< RandomAccessIteratorX
>::value_type 
first_argument_type
typedef< RandomAccessIteratorY
>::value_type 
second_argument_type

Protected Member Functions

void locate (const first_argument_type &x, const second_argument_type &y) const

Protected Attributes

bool isOutOfRange_
RandomAccessIteratorX xPos_
RandomAccessIteratorY yPos_
RandomAccessIteratorX xBegin_
RandomAccessIteratorX xEnd_
RandomAccessIteratorY yBegin_
RandomAccessIteratorY yEnd_
const MatricialData & data_


Member Function Documentation

virtual double operator() const first_argument_type &  x,
const second_argument_type &  y,
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 BicubicSplineInterpolation, and BilinearInterpolation.


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

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