QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
FdmNdimSolver< N > Class Template Reference

#include <fdmndimsolver.hpp>

+ Inheritance diagram for FdmNdimSolver< N >:
+ Collaboration diagram for FdmNdimSolver< N >:

Public Types

typedef MultiCubicSpline< N >::data_table data_table
 
- Public Types inherited from Observer
typedef set_type::iterator iterator
 

Public Member Functions

 FdmNdimSolver (const FdmSolverDesc &solverDesc, const FdmSchemeDesc &schemeDesc, ext::shared_ptr< FdmLinearOpComposite > op)
 
void performCalculations () const override
 
Real interpolateAt (const std::vector< Real > &x) const
 
Real thetaAt (const std::vector< Real > &x) const
 
void setValue (data_table &f, const std::vector< Size > &x, Real value)
 
- Public Member Functions inherited from LazyObject
 LazyObject ()
 
 ~LazyObject () override=default
 
void update () override
 
bool isCalculated () const
 
void forwardFirstNotificationOnly ()
 
void alwaysForwardNotifications ()
 
void recalculate ()
 
void freeze ()
 
void unfreeze ()
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 

Static Public Member Functions

static void setValue (data_table &f, const std::vector< Size > &x, Real value)
 

Private Attributes

const FdmSolverDesc solverDesc_
 
const FdmSchemeDesc schemeDesc_
 
const ext::shared_ptr< FdmLinearOpCompositeop_
 
const ext::shared_ptr< FdmSnapshotConditionthetaCondition_
 
const ext::shared_ptr< FdmStepConditionCompositeconditions_
 
std::vector< std::vector< Real > > x_
 
std::vector< RealinitialValues_
 
const std::vector< boolextrapolation_
 
ext::shared_ptr< data_tablef_
 
ext::shared_ptr< MultiCubicSpline< N > > interp_
 

Additional Inherited Members

- Protected Member Functions inherited from LazyObject
virtual void calculate () const
 
- Protected Attributes inherited from LazyObject
bool calculated_ = false
 
bool frozen_ = false
 
bool alwaysForward_
 

Detailed Description

template<Size N>
class QuantLib::FdmNdimSolver< N >

Definition at line 42 of file fdmndimsolver.hpp.

Member Typedef Documentation

◆ data_table

typedef MultiCubicSpline<N>::data_table data_table

Definition at line 54 of file fdmndimsolver.hpp.

Constructor & Destructor Documentation

◆ FdmNdimSolver()

FdmNdimSolver ( const FdmSolverDesc solverDesc,
const FdmSchemeDesc schemeDesc,
ext::shared_ptr< FdmLinearOpComposite op 
)

Definition at line 76 of file fdmndimsolver.hpp.

Member Function Documentation

◆ performCalculations()

void performCalculations ( ) const
overridevirtual

This method must implement any calculations which must be (re)done in order to calculate the desired results.

Implements LazyObject.

Definition at line 114 of file fdmndimsolver.hpp.

+ Here is the call graph for this function:

◆ interpolateAt()

Real interpolateAt ( const std::vector< Real > &  x) const

Definition at line 150 of file fdmndimsolver.hpp.

◆ thetaAt()

Real thetaAt ( const std::vector< Real > &  x) const

Definition at line 132 of file fdmndimsolver.hpp.

◆ setValue() [1/2]

void setValue ( data_table f,
const std::vector< Size > &  x,
Real  value 
)
static

Definition at line 157 of file fdmndimsolver.hpp.

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

◆ setValue() [2/2]

void setValue ( data_table f,
const std::vector< Size > &  x,
Real  value 
)

Definition at line 163 of file fdmndimsolver.hpp.

Member Data Documentation

◆ solverDesc_

const FdmSolverDesc solverDesc_
private

Definition at line 59 of file fdmndimsolver.hpp.

◆ schemeDesc_

const FdmSchemeDesc schemeDesc_
private

Definition at line 60 of file fdmndimsolver.hpp.

◆ op_

const ext::shared_ptr<FdmLinearOpComposite> op_
private

Definition at line 61 of file fdmndimsolver.hpp.

◆ thetaCondition_

const ext::shared_ptr<FdmSnapshotCondition> thetaCondition_
private

Definition at line 63 of file fdmndimsolver.hpp.

◆ conditions_

const ext::shared_ptr<FdmStepConditionComposite> conditions_
private

Definition at line 64 of file fdmndimsolver.hpp.

◆ x_

std::vector<std::vector<Real> > x_
private

Definition at line 66 of file fdmndimsolver.hpp.

◆ initialValues_

std::vector<Real> initialValues_
private

Definition at line 67 of file fdmndimsolver.hpp.

◆ extrapolation_

const std::vector<bool> extrapolation_
private

Definition at line 68 of file fdmndimsolver.hpp.

◆ f_

ext::shared_ptr<data_table> f_
mutableprivate

Definition at line 70 of file fdmndimsolver.hpp.

◆ interp_

ext::shared_ptr<MultiCubicSpline<N> > interp_
mutableprivate

Definition at line 71 of file fdmndimsolver.hpp.