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

MdataC Template Class Reference

Column oriented storage of Matrix data
Date:
2000/11/21 17:03:07
. More...

#include <matrix.h>

List of all members.

Public Methods

constructors and destructor
 MdataC ()
 default constructor is explicit and creates an empty valarray.

 MdataC (const int nr, const int nc, const Tp value)
 standard constructor needs at least number of rows and optionally number of columns.

 MdataC (const int nr, const int nc, const int nu, const Tp value)
 constructor to be called for general banded matrix.

 MdataC (const Tp* a, const int nr, const int nc)
 constructor from a C style array.

 MdataC (const valarray<Tp>& a, const int nr, const int nc)
 constructor from a valarray.

 ~MdataC ()
 destructor.

miscellaneous helper methods
MdataC* get_own_copy ()
 this method is called to instantiate a unique copy of the matrix data.

void assign (const Tp value)
 assign data array with a constant value.

void assign (const int nr, const Tp* value)
 assign with a C-style double array.

void assign (const int nr, const int nc, const Tp** value)
 assign with the old LinAl C-style Matrix.

void resize (const int nr, const int nc)
 resize the data space allocated w/o loosing any data.


Public Attributes

MdataC actual data
valarray<Tp> m
 matrix coefficients are stored in an STL valarray.

int nrow
 number of rows.

int ncol
 number of columns.

int nref
 number of references to the data.

int ku
 the number of superdiagonals (if a banded matrix).

int kl
 the number of subdiagonals, kl=nr-ku-1; (if a banded matrix).


Detailed Description

template<class Tp> template class MdataC

Column oriented storage of Matrix data
Date:
2000/11/21 17:03:07
.

Author(s):
rokrau

The actual matrix data is maintained by the class MdataC. Values are stored in an STL valarray. In addition MdataC maintains a reference counter.


Constructor & Destructor Documentation

template<classTp>
MdataC<Tp>::MdataC<Tp> ( ) [explicit]
 

default constructor is explicit and creates an empty valarray.

template<classTp>
MdataC<Tp>::MdataC<Tp> ( const int nr,
const int nc,
const Tp value ) [explicit]
 

standard constructor needs at least number of rows and optionally number of columns.

template<classTp>
MdataC<Tp>::MdataC<Tp> ( const int nr,
const int nc,
const int nu,
const Tp value ) [explicit]
 

constructor to be called for general banded matrix.

template<classTp>
MdataC<Tp>::MdataC<Tp> ( const Tp * a,
const int nr,
const int nc ) [explicit]
 

constructor from a C style array.

template<classTp>
MdataC<Tp>::MdataC<Tp> ( const valarray< Tp >& a,
const int nr,
const int nc ) [explicit]
 

constructor from a valarray.

template<classTp>
MdataC<Tp>::~MdataC<Tp> ( ) [inline]
 

destructor.


Member Function Documentation

template<classTp>
MdataC<Tp> * MdataC<Tp>::get_own_copy ( )
 

this method is called to instantiate a unique copy of the matrix data.

template<classTp>
void MdataC<Tp>::assign ( const Tp value )
 

assign data array with a constant value.

template<classTp>
void MdataC<Tp>::assign ( const int nr,
const Tp * value )
 

assign with a C-style double array.

template<classTp>
void MdataC<Tp>::assign ( const int nr,
const int nc,
const Tp ** value )
 

assign with the old LinAl C-style Matrix.

template<classTp>
void MdataC<Tp>::resize ( const int nr,
const int nc )
 

resize the data space allocated w/o loosing any data.


Member Data Documentation

template<classTp>
valarray< Tp > MdataC<Tp>::m
 

matrix coefficients are stored in an STL valarray.

template<classTp>
int MdataC<Tp>::nrow
 

number of rows.

template<classTp>
int MdataC<Tp>::ncol
 

number of columns.

template<classTp>
int MdataC<Tp>::nref
 

number of references to the data.

template<classTp>
int MdataC<Tp>::ku
 

the number of superdiagonals (if a banded matrix).

template<classTp>
int MdataC<Tp>::kl
 

the number of subdiagonals, kl=nr-ku-1; (if a banded matrix).


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