bc_set (3) Linux Manual Page
QuantLib::CrankNicolson – Crank-Nicolson scheme for finite difference methods.
Synopsis
#include <ql/methods/finitedifferences/cranknicolson.hpp>Inherits MixedScheme< Operator >.
Public Types
typedef OperatorTraits< Operator > traitstypedef traits::operator_type operator_type
typedef traits::array_type array_type
typedef traits::bc_set bc_set
typedef traits::condition_type condition_type
Public Member Functions
CrankNicolson (const operator_type &L, const bc_set &bcs)Detailed Description
template<class Operator> class QuantLib::CrankNicolson< Operator >
Crank-Nicolson scheme for finite difference methods.In this implementation, the passed operator must be derived from either TimeConstantOperator or TimeDependentOperator. Also, it must implement at least the following interface:
typedef … array_type;Warning
// copy constructor/assignment
// (these will be provided by the compiler if none is defined)
Operator(const Operator&);
Operator& operator=(const Operator&);
// inspectors
Size size();
// modifiers
void setTime(Time t);
// operator interface
array_type applyTo(const array_type&);
array_type solveFor(const array_type&);
static Operator identity(Size size);
// operator algebra
Operator operator*(Real, const Operator&);
Operator operator+(const Operator&, const Operator&);
Operator operator+(const Operator&, const Operator&);
- The differential operator must be linear for this evolver to work.
