Diffpack Documentation


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

MatStructSparse(Type) Class Reference

structured sparse matrix. More...

#include <MatStructSparse_Type.h>

Inheritance diagram for MatStructSparse(Type)::

MatDense_Type List of all members.

Public Methods

 MatStructSparse(Type) ()
 MatStructSparse(Type) (int n, int ndiags, const VecSimple(int) &offset)
 MatStructSparse(Type) (int nrows, int ncolumns, int ndiags, const VecSimple(int) &offset)
 MatStructSparse(Type) (const MatStructSparse(Type) &X)
 MatStructSparse(Type) (const Matrix(prm_Type) &pm)
virtual ~MatStructSparse(Type) (;) virtual int getNoColumns() const
virtual int getNoNonzeroes () const
virtual void size (int &m, int &n) const
int getNoDiags () const
int offset2index (int d) const
int index2offset (int k) const
bool insideDiags (int i, int j) const
virtual bool makeItSimilar (Handle(Matrix(Type)) &M) const
virtual bool redim (const Matrix(prm_Type) &pm)
bool redim (int n, int ndiags, const VecSimple(int) &offset)
bool redim (int nrows, int ncolumns, int ndiags, const VecSimple(int) &offset)
virtual bool redim (const VecSimple(int) &ivec, const VecSimple(int) &jvec, int new_rows, int new_columns)
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)
virtual void fill (const Matrix(Type) &X)
virtual void fill (Type a)
MatStructSparse(Type)& operator= (const MatStructSparse(Type) &X)
MatStructSparse(Type)& operator= (const 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 (MatStructSparse(Type) &y, int power)
void add (Type value)
virtual void mult (Type value)
virtual void prod (const Matrix(Type) &, const Matrix(Type) &, TransposeMode=NOT_TRANSPOSED, TransposeMode=NOT_TRANSPOSED)
virtual void prod (const Vector(Type) &xb, Vector(Type) &yb, TransposeMode tpmode=NOT_TRANSPOSED, bool add_to_yb=false) const
virtual void transpose ()
virtual void conjTranspose ()
bool factRILU (real omega=0.0, int level=0)
void forwBackRILU (Vec(Type) &b, Vec(Type) &x)
virtual bool factSVD (Vec(Type) &, Mat(Type) &, real=1.0e-6)
virtual void forwBackSVD (const Vec(Type) &, const Mat(Type) &, const Vec(Type) &, Vec(Type) &)
virtual bool factChol (bool=true)
virtual void forwBackChol (Vec(Type) &, Vec(Type) &)
virtual bool factLU ()
virtual void forwBackLU (Vec(Type) &, Vec(Type) &)
virtual bool factLU (VecSimple(int) &, Vec(Type) &)
virtual bool factLU (VecSimple(int) &)
virtual void forwBackLU (Vec(Type) &, Vec(Type) &, const VecSimple(int) &)
virtual bool factorize (const FactStrategy &fstrategy)
virtual void forwBack (Vector(Type) &bb, Vector(Type) &xb)
virtual void inverse (Mat(Type) &inv)
virtual void inverse (Mat(Type) &inv, Vec(Type) &scratch)
virtual void inverse (Mat(Type) &inv, VecSimple(int) &perm, Vec(Type)&scratch)
virtual 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 (MatStructSparse(Type)) private
bool redim (int nrows_, int ncolumns_)
void add (Mat(Type) &y, int power)

Protected Methods

virtual void copy_matrix_attributes (const Matrix(Type) &X)
virtual void copy_matrix_attributes (const Mat(Type) &X)
virtual void copy_matrix_attributes (const MatStructSparse(Type) &X)
virtual void reset ()

Protected Attributes

int full_ncols
VecSort(int) offset
Type zero_entry
int& ndiags

Friends

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

Detailed Description

structured sparse matrix.

NAME: MatStructSparse(Type) - structured sparse matrix

DESCRIPTION:

The class is a specialization of class "Mat(Type)" and implements a standard structured sparse matrix format, where only the nonzero diagonals are stored. These diagonals are stacked together as columns of a rectangular matrix, such that the row numbers are preserved. The sparsity pattern is assumed to be symmetric (the matrix itself may be nonsymmetric in the sense that "a(i,j)" is different from "a(j,i)".


Constructor & Destructor Documentation

MatStructSparse(Type)::MatStructSparse_Type ( )
 

The available constructors are quite similar in syntax to those supported by class "Mat(Type)".

The "MatStructSparse" specific constructors require the number of nonzero diagonals and information on the offset for each stored diagonal.

Currently, "MatStructSparse(Type)" can only be used to represent square matrices. Some constructors still accept both row and column dimensions in order to provide compatibility with other matrix formats. If these parameters have different values, an error message is given. Please note that there is not yet support for a symmetric storage scheme.

MatStructSparse(Type)::MatStructSparse_Type ( int n,
int ndiags,
const VecSimple(int) & offset )
 

See documentation of one of the overloaded constructor.

MatStructSparse(Type)::MatStructSparse_Type ( int nrows,
int ncolumns,
int ndiags,
const VecSimple(int) & offset )
 

See documentation of one of the overloaded constructor.

MatStructSparse(Type)::MatStructSparse_Type ( const MatStructSparse(Type) & X )
 

See documentation of one of the overloaded constructor.

MatStructSparse(Type)::MatStructSparse_Type ( const Matrix(prm_Type) & pm )
 

See documentation of one of the overloaded constructor.

MatStructSparse(Type)::~MatStructSparse(Type) ( ; ) const [inline, virtual]
 


Member Function Documentation

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

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

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

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

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

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

CLASS_INFO MatStructSparse(Type)::VIRTUAL_CAST ( MatStructSparse(Type) ) [inline]
 

void MatStructSparse(Type)::add ( Mat(Type) & y,
int power ) [inline]
 

void MatStructSparse(Type)::add ( Type value )
 

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

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

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

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

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

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

void MatStructSparse(Type)::conjTranspose ( ) [inline, virtual]
 

void MatStructSparse(Type)::copy_matrix_attributes ( const MatStructSparse(Type) & X ) [protected, virtual]
 

void MatStructSparse(Type)::copy_matrix_attributes ( const Mat(Type) & X ) [protected, virtual]
 

void MatStructSparse(Type)::copy_matrix_attributes ( const Matrix(Type) & X ) [protected, virtual]
 

Type MatStructSparse(Type)::det ( ) [virtual]
 

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

This function returns entry "(i,j)" of the current matrix as if it was represented as a full "m" by "n" matrix, i.e., the arguments "i" and "j" can run from one to "m" and "n", respectively. This indexing functionality can be used both for assignments and extractions of matrix entries. However, assignments to an entry that is outside the allocated band is neglected since such positions is regarded as zeros by definition.

bool MatStructSparse(Type)::factChol ( bool = true ) [inline, virtual]
 

bool MatStructSparse(Type)::factLU ( VecSimple(int) & ) [inline, virtual]
 

bool MatStructSparse(Type)::factLU ( VecSimple(int) &,
Vec(Type) & ) [inline, virtual]
 

bool MatStructSparse(Type)::factLU ( ) [inline, virtual]
 

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

performs Relaxed Incomplete LU factorization using the relaxation parameter "omega". Currently, no fill-in is allowed.

bool MatStructSparse(Type)::factSVD ( Vec(Type) &,
Mat(Type) &,
real = 1.0e-6 ) [inline, virtual]
 

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

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

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

void MatStructSparse(Type)::forwBack ( Vector(Type) & bb,
Vector(Type) & xb ) [virtual]
 

void MatStructSparse(Type)::forwBackChol ( Vec(Type) &,
Vec(Type) & ) [inline, virtual]
 

void MatStructSparse(Type)::forwBackLU ( Vec(Type) &,
Vec(Type) &,
const VecSimple(int) & ) [inline, virtual]
 

void MatStructSparse(Type)::forwBackLU ( Vec(Type) &,
Vec(Type) & ) [inline, virtual]
 

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

performs the triangular solves needed in connection to a RILU factrorization, see "factRILU".

void MatStructSparse(Type)::forwBackSVD ( const Vec(Type) &,
const Mat(Type) &,
const Vec(Type) &,
Vec(Type) & ) [inline, virtual]
 

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

int MatStructSparse(Type)::getNoDiags ( ) const [inline]
 

int MatStructSparse(Type)::getNoNonzeroes ( ) const [virtual]
 

int MatStructSparse(Type)::index2offset ( int k ) const [inline]
 

This is the inverse action of "offset2index". If given an index "k" in the range 1 to "ndiags" (suitable for indexing the columns of the internal storage array), this function returns the corresponding offset value.

bool MatStructSparse(Type)::insideDiags ( int i,
int j ) const
 

void MatStructSparse(Type)::inverse ( Mat(Type) & inv,
VecSimple(int) & perm,
Vec(Type)& scratch ) [virtual]
 

void MatStructSparse(Type)::inverse ( Mat(Type) & inv,
Vec(Type) & scratch ) [virtual]
 

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

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

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

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

int MatStructSparse(Type)::offset2index ( int d ) const
 

Given a offset value, this function returns the corresponding column number of the internal storage array. That is, "operator (i,k)" refers to matrix position "(i,i+d)" where "k = offset2index(d)". If the requested diagonal is not stored, the returned value is zero, otherwise it is a number in the range from 1 to "ndiags".

MatStructSparse(Type) & MatStructSparse(Type)::operator= ( const Type & a ) [inline]
 

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

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

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

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

void MatStructSparse(Type)::prod ( const Matrix(Type) &,
const Matrix(Type) &,
TransposeMode = NOT_TRANSPOSED,
TransposeMode = NOT_TRANSPOSED ) [inline, virtual]
 

bool MatStructSparse(Type)::redim ( int nrows_,
int ncolumns_ ) [inline]
 

See documentation of one of the overloaded functions.

bool MatStructSparse(Type)::redim ( const VecSimple(int) & ivec,
const VecSimple(int) & jvec,
int new_rows,
int new_columns ) [virtual]
 

See documentation of one of the overloaded functions.

bool MatStructSparse(Type)::redim ( int nrows,
int ncolumns,
int ndiags,
const VecSimple(int) & offset )
 

See documentation of one of the overloaded functions.

bool MatStructSparse(Type)::redim ( int n,
int ndiags,
const VecSimple(int) & offset )
 

See documentation of one of the overloaded functions.

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

In addition to the "redim" accepting a "Matrix_prm(Type)" type argument, there are versions of this function that accept the argument sequences of the "MatStructSparse" specific constructors. The matrix is then redimensioned according to the given parameter values.

void MatStructSparse(Type)::reset ( ) [protected, virtual]
 

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

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

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

void MatStructSparse(Type)::transpose ( ) [inline, virtual]
 

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


Friends And Related Function Documentation

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

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


Member Data Documentation

int MatStructSparse(Type)::full_ncols [protected]
 

int & MatStructSparse(Type)::ndiags [protected]
 

VecSort(int) MatStructSparse(Type)::offset [protected]
 

Type MatStructSparse(Type)::zero_entry [protected]
 


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