QuantLib_TridiagonalOperator man page

TridiagonalOperator — Base implementation for tridiagonal operator.

Synopsis

#include <ql/methods/finitedifferences/tridiagonaloperator.hpp>

Inherited by BSMOperator, DMinus, DPlus, DPlusDMinus, DZero, and PdeOperator< PdeClass >.

Classes

class TimeSetter
encapsulation of time-setting logic

Public Types

typedef Array array_type

Public Member Functions

TridiagonalOperator (Size size=0)

TridiagonalOperator (const Array &low, const Array &mid, const Array &high)

TridiagonalOperator (const Disposable< TridiagonalOperator > &)

TridiagonalOperator & operator= (const Disposable< TridiagonalOperator > &)

Inspectors

Size size () const

bool isTimeDependent () const

const Array & lowerDiagonal () const

const Array & diagonal () const

const Array & upperDiagonal () const

Modifiers

void setFirstRow (Real, Real)

void setMidRow (Size, Real, Real, Real)

void setMidRows (Real, Real, Real)

void setLastRow (Real, Real)

void setTime (Time t)

Utilities

void swap (TridiagonalOperator &)

Protected Attributes

Size n_

Array diagonal_

Array lowerDiagonal_

Array upperDiagonal_

Array temp_

boost::shared_ptr< TimeSetter > timeSetter_

Friends

Disposable< TridiagonalOperator > operator+ (const TridiagonalOperator &)

Disposable< TridiagonalOperator > operator- (const TridiagonalOperator &)

Disposable< TridiagonalOperator > operator+ (const TridiagonalOperator &, const TridiagonalOperator &)

Disposable< TridiagonalOperator > operator- (const TridiagonalOperator &, const TridiagonalOperator &)

Disposable< TridiagonalOperator > operator* (Real, const TridiagonalOperator &)

Disposable< TridiagonalOperator > operator* (const TridiagonalOperator &, Real)

Disposable< TridiagonalOperator > operator/ (const TridiagonalOperator &, Real)

Operator interface

Disposable< Array > applyTo (const Array &v) const
apply operator to a given array
Disposable< Array > solveFor (const Array &rhs) const
solve linear system for a given right-hand side
void solveFor (const Array &rhs, Array &result) const

Disposable< Array > SOR (const Array &rhs, Real tol) const
solve linear system with SOR approach
static Disposable< TridiagonalOperator > identity (Size size)
identity instance

Detailed Description

Base implementation for tridiagonal operator.

Warning

to use real time-dependant algebra, you must overload the corresponding operators in the inheriting time-dependent class.

Member Function Documentation

void solveFor (const Array & rhs, Array & result) const

solve linear system for a given right-hand side without result Array allocation. The rhs and result parameters can be the same Array, in which case rhs will be changed

Author

Generated automatically by Doxygen for QuantLib from the source code.

Referenced By

diagonal_(3), identity(3), isTimeDependent(3), lowerDiagonal(3), lowerDiagonal_(3), n_(3), setFirstRow(3), setLastRow(3), setMidRow(3), setMidRows(3), SOR(3), temp_(3), timeSetter_(3), TridiagonalOperator(3), upperDiagonal(3) and upperDiagonal_(3) are aliases of QuantLib_TridiagonalOperator(3).

Fri Sep 23 2016 Version 1.8.1 QuantLib