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

#include <fdminnervaluecalculator.hpp>

+ Inheritance diagram for FdmCellAveragingInnerValue:
+ Collaboration diagram for FdmCellAveragingInnerValue:

Public Member Functions

 FdmCellAveragingInnerValue (ext::shared_ptr< Payoff > payoff, ext::shared_ptr< FdmMesher > mesher, Size direction, ext::function< Real(Real)> gridMapping=[](Real x){ return x;})
 
Real innerValue (const FdmLinearOpIterator &iter, Time) override
 
Real avgInnerValue (const FdmLinearOpIterator &iter, Time t) override
 
- Public Member Functions inherited from FdmInnerValueCalculator
virtual ~FdmInnerValueCalculator ()=default
 
virtual Real innerValue (const FdmLinearOpIterator &iter, Time t)=0
 
virtual Real avgInnerValue (const FdmLinearOpIterator &iter, Time t)=0
 

Private Member Functions

Real avgInnerValueCalc (const FdmLinearOpIterator &iter, Time t)
 

Private Attributes

const ext::shared_ptr< Payoffpayoff_
 
const ext::shared_ptr< FdmMeshermesher_
 
const Size direction_
 
const ext::function< Real(Real)> gridMapping_
 
std::vector< RealavgInnerValues_
 

Detailed Description

Definition at line 52 of file fdminnervaluecalculator.hpp.

Constructor & Destructor Documentation

◆ FdmCellAveragingInnerValue()

FdmCellAveragingInnerValue ( ext::shared_ptr< Payoff payoff,
ext::shared_ptr< FdmMesher mesher,
Size  direction,
ext::function< Real(Real)>  gridMapping = [](Real x){ return x; } 
)

Definition at line 51 of file fdminnervaluecalculator.cpp.

Member Function Documentation

◆ innerValue()

Real innerValue ( const FdmLinearOpIterator iter,
Time   
)
overridevirtual

Implements FdmInnerValueCalculator.

Definition at line 58 of file fdminnervaluecalculator.cpp.

+ Here is the caller graph for this function:

◆ avgInnerValue()

Real avgInnerValue ( const FdmLinearOpIterator iter,
Time  t 
)
overridevirtual

Implements FdmInnerValueCalculator.

Definition at line 63 of file fdminnervaluecalculator.cpp.

+ Here is the call graph for this function:

◆ avgInnerValueCalc()

Real avgInnerValueCalc ( const FdmLinearOpIterator iter,
Time  t 
)
private

Definition at line 81 of file fdminnervaluecalculator.cpp.

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

Member Data Documentation

◆ payoff_

const ext::shared_ptr<Payoff> payoff_
private

Definition at line 65 of file fdminnervaluecalculator.hpp.

◆ mesher_

const ext::shared_ptr<FdmMesher> mesher_
private

Definition at line 66 of file fdminnervaluecalculator.hpp.

◆ direction_

const Size direction_
private

Definition at line 67 of file fdminnervaluecalculator.hpp.

◆ gridMapping_

const ext::function<Real(Real)> gridMapping_
private

Definition at line 68 of file fdminnervaluecalculator.hpp.

◆ avgInnerValues_

std::vector<Real> avgInnerValues_
private

Definition at line 70 of file fdminnervaluecalculator.hpp.