QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | List of all members
TreeLattice1D< Impl > Class Template Reference

One-dimensional tree-based lattice. More...

#include <ql/methods/lattices/lattice1d.hpp>

+ Inheritance diagram for TreeLattice1D< Impl >:
+ Collaboration diagram for TreeLattice1D< Impl >:

Public Member Functions

 TreeLattice1D (const TimeGrid &timeGrid, Size n)
 
Array grid (Time t) const override
 
Real underlying (Size i, Size index) const
 
- Public Member Functions inherited from TreeLattice< Impl >
 TreeLattice (const TimeGrid &timeGrid, Size n)
 
void initialize (DiscretizedAsset &, Time t) const override
 initialize an asset at the given time. More...
 
void rollback (DiscretizedAsset &, Time to) const override
 
void partialRollback (DiscretizedAsset &, Time to) const override
 
Real presentValue (DiscretizedAsset &) const override
 Computes the present value of an asset using Arrow-Debrew prices. More...
 
const ArraystatePrices (Size i) const
 
void stepback (Size i, const Array &values, Array &newValues) const
 
- Public Member Functions inherited from Lattice
 Lattice (TimeGrid timeGrid)
 
virtual ~Lattice ()=default
 
const TimeGridtimeGrid () const
 

Additional Inherited Members

- Protected Member Functions inherited from TreeLattice< Impl >
void computeStatePrices (Size until) const
 
- Protected Member Functions inherited from CuriouslyRecurringTemplate< Impl >
 CuriouslyRecurringTemplate ()=default
 
 ~CuriouslyRecurringTemplate ()=default
 
Impl & impl ()
 
const Impl & impl () const
 
- Protected Attributes inherited from TreeLattice< Impl >
std::vector< ArraystatePrices_
 
- Protected Attributes inherited from Lattice
TimeGrid t_
 

Detailed Description

template<class Impl>
class QuantLib::TreeLattice1D< Impl >

One-dimensional tree-based lattice.

Derived classes must implement the following interface:

Real underlying(Size i, Size index) const;
Real underlying(Size i, Size index) const
Definition: lattice1d.hpp:50
QL_REAL Real
real number
Definition: types.hpp:50
std::size_t Size
size of a container
Definition: types.hpp:58

Definition at line 39 of file lattice1d.hpp.

Constructor & Destructor Documentation

◆ TreeLattice1D()

TreeLattice1D ( const TimeGrid timeGrid,
Size  n 
)

Definition at line 41 of file lattice1d.hpp.

Member Function Documentation

◆ grid()

Array grid ( Time  t) const
overridevirtual

Implements Lattice.

Definition at line 43 of file lattice1d.hpp.

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

◆ underlying()

Real underlying ( Size  i,
Size  index 
) const

Definition at line 50 of file lattice1d.hpp.

+ Here is the call graph for this function: