QuantLib
A free/open-source library for quantitative finance
Reference manual - version 1.20
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Interpolation2D Class Reference

base class for 2-D interpolations. More...

#include <ql/math/interpolations/interpolation2d.hpp>

+ Inheritance diagram for Interpolation2D:

Classes

class  Impl
 abstract base class for 2-D interpolation implementations More...
 
class  templateImpl
 basic template implementation More...
 

Public Types

typedef Real first_argument_type
 
typedef Real second_argument_type
 
typedef Real result_type
 

Public Member Functions

Real operator() (Real x, Real y, bool allowExtrapolation=false) const
 
Real xMin () const
 
Real xMax () const
 
std::vector< RealxValues () const
 
Size locateX (Real x) const
 
Real yMin () const
 
Real yMax () const
 
std::vector< RealyValues () const
 
Size locateY (Real y) const
 
const MatrixzData () const
 
bool isInRange (Real x, Real y) const
 
void update ()
 
- Public Member Functions inherited from Extrapolator
void enableExtrapolation (bool b=true)
 enable extrapolation in subsequent calls
 
void disableExtrapolation (bool b=true)
 disable extrapolation in subsequent calls
 
bool allowsExtrapolation () const
 tells whether extrapolation is enabled
 

Protected Member Functions

void checkRange (Real x, Real y, bool extrapolate) const
 

Protected Attributes

ext::shared_ptr< Implimpl_
 

Detailed Description

base class for 2-D interpolations.

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

Warning:
See the Interpolation class for information about the required lifetime of the underlying data.