QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SampledCurve Class Reference

#include <sampledcurve.hpp>

+ Collaboration diagram for SampledCurve:

Public Member Functions

 SampledCurve (Size gridSize=0)
 
 SampledCurve (const Array &grid)
 
inspectors
const Arraygrid () const
 
Arraygrid ()
 
const Arrayvalues () const
 
Arrayvalues ()
 
Real gridValue (Size i) const
 
RealgridValue (Size i)
 
Real value (Size i) const
 
Realvalue (Size i)
 
Size size () const
 
bool empty () const
 
modifiers
void setGrid (const Array &)
 
void setValues (const Array &)
 
template<class F >
void sample (const F &f)
 
calculations
Real valueAtCenter () const
 
Real firstDerivativeAtCenter () const
 
Real secondDerivativeAtCenter () const
 

utilities

Array grid_
 
Array values_
 
QL_DEPRECATED_DISABLE_WARNING void swap (SampledCurve &) noexcept
 
QL_DEPRECATED_ENABLE_WARNING void setLogGrid (Real min, Real max)
 
void regridLogGrid (Real min, Real max)
 
void shiftGrid (Real s)
 
void scaleGrid (Real s)
 
void regrid (const Array &new_grid)
 
template<class T >
void regrid (const Array &new_grid, T func)
 
template<class T >
QL_DEPRECATED_DISABLE_WARNING const SampledCurvetransform (T x)
 
template<class T >
const SampledCurvetransformGrid (T x)
 

Detailed Description

Deprecated:
Use the new finite-differences framework instead. Deprecated in version 1.32.

Definition at line 36 of file sampledcurve.hpp.

Constructor & Destructor Documentation

◆ SampledCurve() [1/2]

Definition at line 178 of file sampledcurve.hpp.

◆ SampledCurve() [2/2]

SampledCurve ( const Array grid)

Definition at line 181 of file sampledcurve.hpp.

Member Function Documentation

◆ grid() [1/2]

const Array & grid ( ) const

Definition at line 188 of file sampledcurve.hpp.

+ Here is the caller graph for this function:

◆ grid() [2/2]

Array & grid ( )

Definition at line 184 of file sampledcurve.hpp.

◆ values() [1/2]

const Array & values ( ) const

Definition at line 192 of file sampledcurve.hpp.

+ Here is the caller graph for this function:

◆ values() [2/2]

Array & values ( )

Definition at line 196 of file sampledcurve.hpp.

◆ gridValue() [1/2]

Real gridValue ( Size  i) const

Definition at line 200 of file sampledcurve.hpp.

◆ gridValue() [2/2]

Real & gridValue ( Size  i)

Definition at line 204 of file sampledcurve.hpp.

◆ value() [1/2]

Real value ( Size  i) const

Definition at line 208 of file sampledcurve.hpp.

+ Here is the caller graph for this function:

◆ value() [2/2]

Real & value ( Size  i)

Definition at line 212 of file sampledcurve.hpp.

◆ size()

Size size ( ) const

Definition at line 216 of file sampledcurve.hpp.

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

◆ empty()

bool empty ( ) const

Definition at line 220 of file sampledcurve.hpp.

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

◆ setGrid()

void setGrid ( const Array g)

Definition at line 224 of file sampledcurve.hpp.

◆ setValues()

void setValues ( const Array g)

Definition at line 228 of file sampledcurve.hpp.

◆ sample()

void sample ( const F f)

Definition at line 60 of file sampledcurve.hpp.

+ Here is the caller graph for this function:

◆ valueAtCenter()

Real valueAtCenter ( ) const

Definition at line 24 of file sampledcurve.cpp.

+ Here is the call graph for this function:

◆ firstDerivativeAtCenter()

Real firstDerivativeAtCenter ( ) const

Definition at line 33 of file sampledcurve.cpp.

+ Here is the call graph for this function:

◆ secondDerivativeAtCenter()

Real secondDerivativeAtCenter ( ) const

Definition at line 46 of file sampledcurve.cpp.

+ Here is the call graph for this function:

◆ swap()

void swap ( SampledCurve from)
noexcept

Definition at line 232 of file sampledcurve.hpp.

◆ setLogGrid()

QL_DEPRECATED_ENABLE_WARNING void setLogGrid ( Real  min,
Real  max 
)

Definition at line 89 of file sampledcurve.hpp.

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

◆ regridLogGrid()

void regridLogGrid ( Real  min,
Real  max 
)

Definition at line 92 of file sampledcurve.hpp.

+ Here is the call graph for this function:

◆ shiftGrid()

void shiftGrid ( Real  s)

Definition at line 96 of file sampledcurve.hpp.

◆ scaleGrid()

void scaleGrid ( Real  s)

Definition at line 99 of file sampledcurve.hpp.

◆ regrid() [1/2]

void regrid ( const Array new_grid)

Definition at line 67 of file sampledcurve.cpp.

+ Here is the call graph for this function:

◆ regrid() [2/2]

void regrid ( const Array new_grid,
T  func 
)

Definition at line 111 of file sampledcurve.hpp.

+ Here is the call graph for this function:

◆ transform()

QL_DEPRECATED_DISABLE_WARNING const SampledCurve & transform ( T  x)

Definition at line 141 of file sampledcurve.hpp.

◆ transformGrid()

const SampledCurve & transformGrid ( T  x)

Definition at line 148 of file sampledcurve.hpp.

Member Data Documentation

◆ grid_

Array grid_
private

Definition at line 156 of file sampledcurve.hpp.

◆ values_

Array values_
private

Definition at line 157 of file sampledcurve.hpp.