Diffpack Documentation


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

MatDiag(Type) Class Reference

diagonal matrix. More...

#include <MatDiag_Type.h>

Inheritance diagram for MatDiag(Type)::

Matrix_Type HandleId List of all members.

Public Methods

 MatDiag(Type) ()
 MatDiag(Type) (int n)
 MatDiag(Type) (int nrows, int ncolumns)
 MatDiag(Type) (const MatDiag(Type) &X)
 MatDiag(Type) (const Matrix(prm_Type) &pm)
virtual ~MatDiag(Type) ()
virtual int getNoRows () const
virtual int getNoColumns () const
virtual int getNoNonzeroes () const
virtual void size (int &m, int &n) const
int size () const
virtual int getWork (const MatrixWork work_tp=MATVEC_WORK) const
virtual real getStorage () const
virtual bool makeItSimilar (Handle(Matrix(Type)) &M) const
virtual bool redim (const Matrix(prm_Type) &pm)
bool redim (int n)
bool redim (int nrows, int ncolumns)
virtual bool redim (const VecSimple(int) &ivec, const VecSimple(int) &jvec, int new_nrows, int new_ncolumns)
virtual void getIndexSet (VecSimple(int) &ivec, VecSimple(int) &jvec) const
virtual bool validIndexSet (const VecSimple(int) &ivec, const VecSimple(int) &jvec, const int new_nrows, const int new_ncolumns)
virtual Type& elm (int i, int j)
Type& operator() (int i, int j)
const Type& operator() (int i, int j) const
Type& operator() (int i)
const Type& operator() (int i) const
virtual void fill (const Matrix(Type) &X)
virtual void fill (Type a)
MatDiag(Type)& operator= (const MatDiag(Type) &X)
MatDiag(Type)& operator= (Type a)
virtual void assemble (const Mat(Type) &em, const VecSimple(int) &idx_row_trans, const VecSimple(int) &idx_col_trans, int elm_no)
virtual void add (Matrix(Type) &bb, Matrix(Type) &cb)
virtual void add (Matrix(Type) &bb, char s, Matrix(Type) &cb)
virtual void add (Matrix(Type) &bb, Type b, Matrix(Type) &cb)
virtual void add (Type a, Matrix(Type) &bb, Type b, Matrix(Type) &cb)
void add (MatDiag(Type) &y, int power)
void add (Type value)
virtual void mult (Type value)
virtual void prod (const Vector(Type) &xb, Vector(Type) &yb, TransposeMode tpmode=NOT_TRANSPOSED, bool add_to_yb=false) const
bool factChol (bool zero_upper_part=true)
void forwBackChol (Vec(Type) &b, Vec(Type) &x)
bool factLU ()
void forwBackLU (Vec(Type) &b, Vec(Type) &x)
bool factRILU (real omega=0.0, int level=0)
void forwBackRILU (Vec(Type) &b, Vec(Type) &x)
virtual bool factorize (const FactStrategy &fstrategy)
virtual void forwBack (Vector(Type) &b, Vector(Type) &x)
virtual void inverse (Mat(Type) &inv)
void inverse (MatDiag(Type) &inv)
Type det ()
virtual void SSOR1it (Vector(Type) &xnew, const Vector(Type) &xold, const Vector(Type) &b, real omega, TransposeMode tpmode=NOT_TRANSPOSED) const
virtual void SSORsolve (Vector(Type) &y, const Vector(Type) &c, real omega, TransposeMode tpmode=NOT_TRANSPOSED) const
virtual void SOR1it (Vector(Type) &xnew, const Vector(Type) &xold, const Vector(Type) &b, real omega, TransposeMode tpmode=NOT_TRANSPOSED) const
virtual void SORsolve (Vector(Type) &y, const Vector(Type) &c, real omega, TransposeMode tpmode=NOT_TRANSPOSED) const
virtual void Jacobi1it (Vector(Type) &xnew, const Vector(Type) &xold, const Vector(Type) &b, TransposeMode tpmode=NOT_TRANSPOSED) const
virtual void Jacobisolve (Vector(Type) &y, const Vector(Type) &c, TransposeMode tpmode=NOT_TRANSPOSED) const
virtual void print (Os os, const char *header=NULL, int nentries_per_line=3) const
virtual void printAscii (Os os, const char *header=NULL) const
virtual void scan (Is is)
virtual void save (const char *filename, const char *name="X") const
virtual void load (const char *filename, const char *name="X")
CLASS_INFO VIRTUAL_CAST (MatDiag(Type))

Friends

Osoperator<< (Os &os, const MatDiag(Type) &X)
Isoperator>> (Is &is, MatDiag(Type) &X)

Detailed Description

diagonal matrix.

NAME: MatDiag(Type) - diagonal matrix

DESCRIPTION:

The class implements a diagonal matrix. Derivation from class "Matrix(Type)" ensures that the class is of matrix nature, while derivation from "Vec(Type)" enables implementation in terms of a vector.


Constructor & Destructor Documentation

MatDiag(Type)::MatDiag_Type ( ) [inline]
 

MatDiag(Type)::MatDiag_Type ( int n ) [inline]
 

MatDiag(Type)::MatDiag_Type ( int nrows,
int ncolumns )
 

See documentation of one of the overloaded constructor.

MatDiag(Type)::MatDiag_Type ( const MatDiag(Type) & X )
 

See documentation of one of the overloaded constructor.

MatDiag(Type)::MatDiag_Type ( const Matrix(prm_Type) & pm )
 

See documentation of one of the overloaded constructor.

MatDiag(Type)::~MatDiag(Type) ( ) [virtual]
 


Member Function Documentation

void MatDiag(Type)::Jacobi1it ( Vector(Type) & xnew,
const Vector(Type) & xold,
const Vector(Type) & b,
TransposeMode tpmode = NOT_TRANSPOSED ) const [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::Jacobisolve ( Vector(Type) & y,
const Vector(Type) & c,
TransposeMode tpmode = NOT_TRANSPOSED ) const [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::SOR1it ( Vector(Type) & xnew,
const Vector(Type) & xold,
const Vector(Type) & b,
real omega,
TransposeMode tpmode = NOT_TRANSPOSED ) const [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::SORsolve ( Vector(Type) & y,
const Vector(Type) & c,
real omega,
TransposeMode tpmode = NOT_TRANSPOSED ) const [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::SSOR1it ( Vector(Type) & xnew,
const Vector(Type) & xold,
const Vector(Type) & b,
real omega,
TransposeMode tpmode = NOT_TRANSPOSED ) const [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::SSORsolve ( Vector(Type) & y,
const Vector(Type) & c,
real omega,
TransposeMode tpmode = NOT_TRANSPOSED ) const [virtual]
 

Reimplemented from Matrix(Type).

CLASS_INFO MatDiag(Type)::VIRTUAL_CAST ( MatDiag(Type) )
 

void MatDiag(Type)::add ( Type value )
 

void MatDiag(Type)::add ( MatDiag(Type) & y,
int power )
 

void MatDiag(Type)::add ( Type a,
Matrix(Type) & bb,
Type b,
Matrix(Type) & cb ) [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::add ( Matrix(Type) & bb,
Type b,
Matrix(Type) & cb ) [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::add ( Matrix(Type) & bb,
char s,
Matrix(Type) & cb ) [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::add ( Matrix(Type) & bb,
Matrix(Type) & cb ) [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::assemble ( const Mat(Type) & em,
const VecSimple(int) & idx_row_trans,
const VecSimple(int) & idx_col_trans,
int elm_no ) [virtual]
 

Reimplemented from Matrix(Type).

Type MatDiag(Type)::det ( )
 

Type & MatDiag(Type)::elm ( int i,
int j ) [inline, virtual]
 

Reimplemented from Matrix(Type).

bool MatDiag(Type)::factChol ( bool zero_upper_part = true )
 

The Cholesky factorization is stored using the diagonal.

bool MatDiag(Type)::factLU ( )
 

This operation is dummy, since there is nothing to factorize (no fill-in).

bool MatDiag(Type)::factRILU ( real omega = 0.0,
int level = 0 )
 

This operation is dummy, since there is nothing to factorize (no fill-in). Consequently, the arguments to this function are of no use. However, they are included in order to maintain compatibility with the corresponding functionality implemented for other matrix formats.

bool MatDiag(Type)::factorize ( const FactStrategy & fstrategy ) [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::fill ( Type a ) [inline, virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::fill ( const Matrix(Type) & X ) [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::forwBack ( Vector(Type) & b,
Vector(Type) & x ) [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::forwBackChol ( Vec(Type) & b,
Vec(Type) & x )
 

void MatDiag(Type)::forwBackLU ( Vec(Type) & b,
Vec(Type) & x )
 

void MatDiag(Type)::forwBackRILU ( Vec(Type) & b,
Vec(Type) & x )
 

void MatDiag(Type)::getIndexSet ( VecSimple(int) & ivec,
VecSimple(int) & jvec ) const [virtual]
 

Reimplemented from Matrix(Type).

int MatDiag(Type)::getNoColumns ( ) const [inline, virtual]
 

returns the number of columns in the current object when viewed (logically) as a full matrix.

Reimplemented from Matrix(Type).

int MatDiag(Type)::getNoNonzeroes ( ) const [inline, virtual]
 

returns the number of nonzero entries represented in the current object. Note that this function does not take symmetric storage formats into account. That is, it also counts entry "a(j,i)" even if this value is not stored due to symmetry properties. This function does not check for stored zero entries, but counts all entries represented by the chosen matrix format.

Reimplemented from Matrix(Type).

int MatDiag(Type)::getNoRows ( ) const [inline, virtual]
 

returns the number of rows in the current object when viewed (logically) as a full matrix.

Reimplemented from Matrix(Type).

real MatDiag(Type)::getStorage ( ) const [virtual]
 

Reimplemented from Matrix(Type).

int MatDiag(Type)::getWork ( const MatrixWork work_tp = MATVEC_WORK ) const [virtual]
 

returns the operation count for the last computation of the type indicated by the "MatrixWork" argument.

Reimplemented from Matrix(Type).

void MatDiag(Type)::inverse ( MatDiag(Type) & inv )
 

See documentation of one of the overloaded functions.

void MatDiag(Type)::inverse ( Mat(Type) & inv ) [virtual]
 

In addition to the version taking a "Mat(Type)" object for storing the inverted matrix, there is another function accepting a "MatDiag(Type)" object as input. This choice is available since diagonal matrices are the only ones that in general produce banded (diagonal) inverses.

void MatDiag(Type)::load ( const char * filename,
const char * name = "X" ) [virtual]
 

quite similar to "save", this function permits Matlab data files to be entered into the current vector object. If available, the binary format is used, otherwise it reads plain ASCII files.

The version implemented in this base class is dummy, stating that the described functionality is not available. To overrule this behaviour, the "load" function should be implemented for the specific format(s).

Reimplemented from Matrix(Type).

bool MatDiag(Type)::makeItSimilar ( Handle(Matrix(Type)) & M ) const [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::mult ( Type value ) [virtual]
 

Reimplemented from Matrix(Type).

const Type & MatDiag(Type)::operator() ( int i ) const [inline]
 

Type & MatDiag(Type)::operator() ( int i ) [inline]
 

const Type & MatDiag(Type)::operator() ( int i,
int j ) const
 

Type & MatDiag(Type)::operator() ( int i,
int j )
 

MatDiag(Type) & MatDiag(Type)::operator= ( Type a ) [inline]
 

Reimplemented from Matrix(Type).

MatDiag(Type) & MatDiag(Type)::operator= ( const MatDiag(Type) & X )
 

void MatDiag(Type)::print ( Os os,
const char * header = NULL,
int nentries_per_line = 3 ) const [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::printAscii ( Os os,
const char * header = NULL ) const [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::prod ( const Vector(Type) & xb,
Vector(Type) & yb,
TransposeMode tpmode = NOT_TRANSPOSED,
bool add_to_yb = false ) const [virtual]
 

Reimplemented from Matrix(Type).

bool MatDiag(Type)::redim ( const VecSimple(int) & ivec,
const VecSimple(int) & jvec,
int new_nrows,
int new_ncolumns ) [virtual]
 

Reimplemented from Matrix(Type).

bool MatDiag(Type)::redim ( int nrows,
int ncolumns )
 

bool MatDiag(Type)::redim ( int n ) [inline]
 

bool MatDiag(Type)::redim ( const Matrix(prm_Type) & pm ) [virtual]
 

Reimplemented from Matrix(Type).

void MatDiag(Type)::save ( const char * filename,
const char * name = "X" ) const [virtual]
 

saves the current vector object in a file that is readable for Matlab. If available, the utilities for Matlab's internal binary data file format is used. Otherwise, the output is given as a plain ASCII file that can be loaded in Matlab.

The version implemented in this base class is dummy, stating that the described functionality is not available. To overrule this behaviour, the "save" function should be implemented for the specific format(s).

Reimplemented from Matrix(Type).

void MatDiag(Type)::scan ( Is is ) [virtual]
 

Reimplemented from Matrix(Type).

int MatDiag(Type)::size ( ) const [inline]
 

void MatDiag(Type)::size ( int & m,
int & n ) const [inline, virtual]
 

Reimplemented from Matrix(Type).

bool MatDiag(Type)::validIndexSet ( const VecSimple(int) & ivec,
const VecSimple(int) & jvec,
const int new_nrows,
const int new_ncolumns ) [virtual]
 

Reimplemented from Matrix(Type).


Friends And Related Function Documentation

Os & operator<< ( Os & os,
const MatDiag(Type) & X ) [friend]
 

Is & operator>> ( Is & is,
MatDiag(Type) & X ) [friend]
 


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.