QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | 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:
+ Collaboration diagram for Interpolation2D:

Classes

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

Public Member Functions

 Interpolation2D ()=default
 
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
 Extrapolator ()=default
 
virtual ~Extrapolator ()=default
 
void enableExtrapolation (bool b=true)
 enable extrapolation in subsequent calls More...
 
void disableExtrapolation (bool b=true)
 disable extrapolation in subsequent calls More...
 
bool allowsExtrapolation () const
 tells whether extrapolation is enabled More...
 

Public Attributes

QL_DEPRECATED typedef Real first_argument_type
 
QL_DEPRECATED typedef Real second_argument_type
 
QL_DEPRECATED typedef Real result_type
 

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.

Definition at line 47 of file interpolation2d.hpp.

Constructor & Destructor Documentation

◆ Interpolation2D()

Interpolation2D ( )
default

Member Function Documentation

◆ operator()()

Real operator() ( Real  x,
Real  y,
bool  allowExtrapolation = false 
) const

Definition at line 158 of file interpolation2d.hpp.

+ Here is the call graph for this function:

◆ xMin()

Real xMin ( ) const

Definition at line 163 of file interpolation2d.hpp.

◆ xMax()

Real xMax ( ) const

Definition at line 166 of file interpolation2d.hpp.

◆ xValues()

std::vector< Real > xValues ( ) const

Definition at line 169 of file interpolation2d.hpp.

◆ locateX()

Size locateX ( Real  x) const

Definition at line 172 of file interpolation2d.hpp.

+ Here is the caller graph for this function:

◆ yMin()

Real yMin ( ) const

Definition at line 175 of file interpolation2d.hpp.

◆ yMax()

Real yMax ( ) const

Definition at line 178 of file interpolation2d.hpp.

◆ yValues()

std::vector< Real > yValues ( ) const

Definition at line 181 of file interpolation2d.hpp.

◆ locateY()

Size locateY ( Real  y) const

Definition at line 184 of file interpolation2d.hpp.

+ Here is the caller graph for this function:

◆ zData()

const Matrix & zData ( ) const

Definition at line 187 of file interpolation2d.hpp.

+ Here is the caller graph for this function:

◆ isInRange()

bool isInRange ( Real  x,
Real  y 
) const

Definition at line 190 of file interpolation2d.hpp.

◆ update()

void update ( )

Definition at line 193 of file interpolation2d.hpp.

+ Here is the caller graph for this function:

◆ checkRange()

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

Definition at line 197 of file interpolation2d.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ first_argument_type

QL_DEPRECATED typedef Real first_argument_type
Deprecated:
Use auto or decltype instead. Deprecated in version 1.29.

Definition at line 72 of file interpolation2d.hpp.

◆ second_argument_type

QL_DEPRECATED typedef Real second_argument_type
Deprecated:
Use auto or decltype instead. Deprecated in version 1.29.

Definition at line 78 of file interpolation2d.hpp.

◆ result_type

QL_DEPRECATED typedef Real result_type
Deprecated:
Use auto or decltype instead. Deprecated in version 1.29.

Definition at line 84 of file interpolation2d.hpp.

◆ impl_

ext::shared_ptr<Impl> impl_
protected

Definition at line 66 of file interpolation2d.hpp.