QuantLib: Tree< T > Class Template Reference

A free/open-source library for quantitative finance Reference manual - version 1.6

- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Tree< T > Class Template Reference
Lattice methods

Tree approximating a single-factor diffusion More...

`#include <ql/methods/lattices/tree.hpp>`

Inheritance diagram for Tree< T >:
[legend]

## Public Member Functions
| Tree (Size columns)
Size | columns () const

## Additional Inherited Members
Protected Member Functions inherited from CuriouslyRecurringTemplate< T >
T & | impl ()
const T & | impl () const

## Detailed Description

### template<class T>
class QuantLib::Tree< T >

Tree approximating a single-factor diffusion

Derived classes must implement the following interface:

public:
Real underlying(Size i, Size index) const;
Size size(Size i) const;
Size descendant(Size i, Size index, Size branch) const;
Real probability(Size i, Size index, Size branch) const;

and provide a public enumeration

enum { branches = N };

where N is a suitable constant (2 for binomial, 3 for trinomial...)