Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

MatrixSD Class Reference

A class for column oriented, packed storage of a symmetric double Matrix. More...

#include <matrixSD.h>

Inheritance diagram for MatrixSD:

MatrixC Matrix List of all members.

Public Methods

constructors and destructor
 MatrixSD ()
 standard default constructor.

 MatrixSD (const int nr, const double value=0.0)
 standard constructor.

 MatrixSD (const MatrixSD& B)
 copy constructor.

 ~MatrixSD ()
 virtual destructor.

MatrixSD& operator= (const double value)
 assignment with a constant value.

overloaded virtual methods of the Matrix base class
void resize (const int nr, const double value=0.0)
 resize MatrixSD.

virtual int nr () const
 number of rows.

virtual int nr (const int i) const
 resize MatrixSD.

virtual int nc () const
 number of columns.

virtual int nc (const int i) const
 resize MatrixSD.

virtual Ref<double> operator() (const int i, const int j=0)
 non constant, write access to elements.

virtual double operator() (const int i, const int j=0) const
 constant, read only access to elements is overloaded.

virtual void stream (ostream& s)
 output to stream.

MatrixSD transpose () const
 return transposed Matrix, does nothing returns a copy.

void multiply (const MatrixSD& A, const MatrixSD& B, const char TRANSA='N', const char TRANSB='N')
 Multiplication of two symmetric matrices destroys the symmetry.

void multiply (const double value)
 multiply MatrixSD C with constant value and write to this Matrix.

void multiply (const VectorD& x, VectorD& y, const double ALPHA=1.0, const double BETA=0.0) const
 multiplication y=alpha*this*x+beta*y, BLAS level 2.

void CHdecompose ()
 Cholesky CTC decomposition of a symmetric positive definite matrix.

void CHsubstitute (MatrixC<double>& B)
 solve triangular Cholesky system by backsubstitution.

void CHsolve (MatrixC<double>& B)
 solve linear equation system with a symmetric positive definite matrix.

void CHinvert ()
 inversion of a symmetric positive definite matrix.


Protected Methods

virtual double* ref (const int i, const int j) const
 low level reference to data returns a pointer, use this with care.

virtual double read (const int i, const int j) const
 low level read.

virtual void write (const int i, const int j, const double v)
 low level write.

virtual void add (const int i, const int j, const double v)
 low level add to.

virtual void sub (const int i, const int j, const double v)
 low level sub from.

virtual void mul (const int i, const int j, const double v)
 low level mul with.

virtual void div (const int i, const int j, const double v)
 low level div by.


Detailed Description

A class for column oriented, packed storage of a symmetric double Matrix.

Author(s):
rokrau
Date:
Date:
2000/11/09 18:41:31

Only the lower triangular part of the Matrix can be referenced directly. Access to the upper half of the Matrix will result in an error message and subsequent termination of the program.


Constructor & Destructor Documentation

MatrixSD::MatrixSD ( ) [explicit]
 

standard default constructor.

MatrixSD::MatrixSD ( const int nr,
const double value = 0.0 ) [explicit]
 

standard constructor.

MatrixSD::MatrixSD ( const MatrixSD & B )
 

copy constructor.

MatrixSD::~MatrixSD ( ) [inline]
 

virtual destructor.


Member Function Documentation

MatrixSD & MatrixSD::operator= ( const double value ) [inline]
 

assignment with a constant value.

void MatrixSD::resize ( const int nr,
const double value = 0.0 )
 

resize MatrixSD.

int MatrixSD::nr ( ) const [inline, virtual]
 

number of rows.

int MatrixSD::nr ( const int i ) const [inline, virtual]
 

resize MatrixSD.

Reimplemented from MatrixC.

int MatrixSD::nc ( ) const [inline, virtual]
 

number of columns.

int MatrixSD::nc ( const int i ) const [inline, virtual]
 

resize MatrixSD.

Reimplemented from MatrixC.

Ref< double > MatrixSD::operator() ( const int i,
const int j = 0 ) [inline, virtual]
 

non constant, write access to elements.

Reimplemented from MatrixC.

double MatrixSD::operator() ( const int i,
const int j = 0 ) const [inline, virtual]
 

constant, read only access to elements is overloaded.

Reimplemented from MatrixC.

void MatrixSD::stream ( ostream & s ) [virtual]
 

output to stream.

Reimplemented from MatrixC.

MatrixSD MatrixSD::transpose ( ) const
 

return transposed Matrix, does nothing returns a copy.

Reimplemented from MatrixC.

void MatrixSD::multiply ( const MatrixSD & A,
const MatrixSD & B,
const char TRANSA = 'N',
const char TRANSB = 'N' ) [inline]
 

Multiplication of two symmetric matrices destroys the symmetry.

void MatrixSD::multiply ( const double value )
 

multiply MatrixSD C with constant value and write to this Matrix.

void MatrixSD::multiply ( const VectorD & x,
VectorD & y,
const double ALPHA = 1.0,
const double BETA = 0.0 ) const
 

multiplication y=alpha*this*x+beta*y, BLAS level 2.

void MatrixSD::CHdecompose ( )
 

Cholesky CTC decomposition of a symmetric positive definite matrix.

void MatrixSD::CHsubstitute ( MatrixC< double >& B )
 

solve triangular Cholesky system by backsubstitution.

void MatrixSD::CHsolve ( MatrixC< double >& B )
 

solve linear equation system with a symmetric positive definite matrix.

void MatrixSD::CHinvert ( )
 

inversion of a symmetric positive definite matrix.

double * MatrixSD::ref ( const int i,
const int j ) const [inline, protected, virtual]
 

low level reference to data returns a pointer, use this with care.

Reimplemented from MatrixC.

double MatrixSD::read ( const int i,
const int j ) const [inline, protected, virtual]
 

low level read.

Reimplemented from MatrixC.

void MatrixSD::write ( const int i,
const int j,
const double v ) [inline, protected, virtual]
 

low level write.

void MatrixSD::add ( const int i,
const int j,
const double v ) [inline, protected, virtual]
 

low level add to.

void MatrixSD::sub ( const int i,
const int j,
const double v ) [inline, protected, virtual]
 

low level sub from.

void MatrixSD::mul ( const int i,
const int j,
const double v ) [inline, protected, virtual]
 

low level mul with.

void MatrixSD::div ( const int i,
const int j,
const double v ) [inline, protected, virtual]
 

low level div by.


The documentation for this class was generated from the following file:
Generated at Wed Nov 22 08:38:29 2000 for LinAl - a simple and efficient Matrix library - by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000