Matrix Class Reference

#include <matrix.hpp>

List of all members.


Detailed Description

matrix used in linear algebra.

This class implements the concept of Matrix as used in linear algebra. As such, it is not meant to be used as a container.


Public Types

typedef double * iterator
typedef const double * const_iterator
typedef double * row_iterator
typedef const double * const_row_iterator
typedef Utilities::stepping_iterator<
double * > 
column_iterator
typedef Utilities::stepping_iterator<
const double * > 
const_column_iterator

Public Member Functions

typedef QL_REVERSE_ITERATOR (iterator, double) reverse_iterator
typedef QL_REVERSE_ITERATOR (const_iterator, double) const _reverse_iterator
typedef QL_REVERSE_ITERATOR (row_iterator, double) reverse_row_iterator
typedef QL_REVERSE_ITERATOR (const_row_iterator, double) const _reverse_row_iterator
typedef QL_REVERSE_ITERATOR (column_iterator, double) reverse_column_iterator
typedef QL_REVERSE_ITERATOR (const_column_iterator, double) const _reverse_column_iterator
Constructors, destructor, and assignment
 Matrix ()
 creates a null matrix

 Matrix (Size rows, Size columns)
 creates a matrix with the given dimensions

 Matrix (Size rows, Size columns, double value)
 creates the matrix and fills it with value

 Matrix (const Matrix &)
 Matrix (const Disposable< Matrix > &)
Matrixoperator= (const Matrix &)
Matrixoperator= (const Disposable< Matrix > &)
Algebraic operators
Matrixoperator+= (const Matrix &)
Matrixoperator-= (const Matrix &)
Matrixoperator *= (double)
Matrixoperator/= (double)
Iterator access
const_iterator begin () const
iterator begin ()
const_iterator end () const
iterator end ()
const_reverse_iterator rbegin () const
reverse_iterator rbegin ()
const_reverse_iterator rend () const
reverse_iterator rend ()
const_row_iterator row_begin (Size i) const
row_iterator row_begin (Size i)
const_row_iterator row_end (Size i) const
row_iterator row_end (Size i)
const_reverse_row_iterator row_rbegin (Size i) const
reverse_row_iterator row_rbegin (Size i)
const_reverse_row_iterator row_rend (Size i) const
reverse_row_iterator row_rend (Size i)
const_column_iterator column_begin (Size i) const
column_iterator column_begin (Size i)
const_column_iterator column_end (Size i) const
column_iterator column_end (Size i)
const_reverse_column_iterator column_rbegin (Size i) const
reverse_column_iterator column_rbegin (Size i)
const_reverse_column_iterator column_rend (Size i) const
reverse_column_iterator column_rend (Size i)
Element access
const_row_iterator operator[] (Size) const
row_iterator operator[] (Size)
Disposable< Arraydiagonal (void) const
Inspectors
Size rows () const
Size columns () const
Utilities
void swap (Matrix &)

Related Functions

(Note that these are not member functions.)

Disposable< Matrixoperator+ (const Matrix &, const Matrix &)
Disposable< Matrixoperator- (const Matrix &, const Matrix &)
Disposable< Matrixoperator * (const Matrix &, double)
Disposable< Matrixoperator * (double, const Matrix &)
Disposable< Matrixoperator/ (const Matrix &, double)
Disposable< Arrayoperator * (const Array &, const Matrix &)
Disposable< Arrayoperator * (const Matrix &, const Array &)
Disposable< Matrixoperator * (const Matrix &, const Matrix &)
Disposable< Matrixtranspose (const Matrix &)
Disposable< MatrixouterProduct (const Array &v1, const Array &v2)
template<class Iterator1, class Iterator2> Disposable< MatrixouterProduct (Iterator1 v1begin, Iterator1 v1end, Iterator2 v2begin, Iterator2 v2end)
Disposable< MatrixpseudoSqrt (const Matrix &realSymmetricMatrix, SalvagingAlgorithm sa=None)
 returns the pseudo square root of a real symmetric matrix

Disposable< MatrixmatrixSqrt (const Matrix &realSymmetricMatrix)
 returns the pseudo square root of a real symmetric matrix


Member Function Documentation

Matrix & operator+= const Matrix  ) 
 

Precondition:
all matrices involved in an algebraic expression must have the same size.


Friends And Related Function Documentation

Disposable< Matrix > pseudoSqrt const Matrix realSymmetricMatrix,
SalvagingAlgorithm  sa = None
[related]
 

returns the pseudo square root of a real symmetric matrix

returns the pseudo square root of a real symmetric matrix. If the matrix is not positive semi definite, it can returns an approximation of the pseudo square root using a (user selected) salvaging algorithm

For more information see: "The most general methodology to create a valid correlation matrix for risk management and option pricing purposes", by R. Rebonato and P. Jäckel. The Journal of Risk, 2(2), Winter 1999/2000 http://www.rebonato.com/correlationmatrix.pdf

Revised and extended in "Monte Carlo Methods in Finance", by Peter Jäckel, Chapter 6

Disposable< Matrix > matrixSqrt const Matrix realSymmetricMatrix  )  [related]
 

returns the pseudo square root of a real symmetric matrix

returns the pseudo square root of a real symmetric matrix.

use pseudoSqrt instead


The documentation for this class was generated from the following file:

QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen