BlockMatrix< TRing > Class Template Reference

Temlate block matrix data. The matrix is composed by submatrix blocks. These blocks are stored line by line. The data in submatrices is also stored line-by-line. Matrixsize is shrinked to 'int'. More...

#include <BlockMatrix.h>

Collaboration diagram for BlockMatrix< TRing >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef TRing::ElementType TNum

Public Member Functions

virtual ~BlockMatrix ()
Constructors

 BlockMatrix (int _rowBlockSize, int _colBlockSize, int _rows, int _cols, const TRing *_ring, string _name="unnamedMatrix")
 BlockMatrix (const BlockMatrix &mat)
init

void fillZero ()
void randomInit (long *randomSeed)
properties

int getColNum () const
int getRowNum () const
int getBlocksPerRow () const
 x-axis
int getBlocksPerCol () const
 y-axis
int getRowBlockSize () const
int getColBlockSize () const
int getBlockNum () const
int getBlockSize () const
size_t getSize () const
bool blocksAreSquare () const
std::string getName () const
void setName (string _name)
safety

void checkBounds (int row, int col) const
void checkBlockBounds (int _blockNum, int _blockPos) const
position transformation

tBlockPos computeBlockPos (int _row, int _col) const
tPos computeNormalPos (int _blockNr, int _blockPos) const
data access

void setVal (const int row, const int col, const TNum z)
TNum getVal (const int row, const int col) const
TNumgetValRef (const int row, const int col)
const TNumgetConstValRef (const int row, const int col) const
void setBlockVal (const int blockNr, const int blockPos, const TNum z)
TNum getBlockVal (const int blockNr, const int blockPos)
TNumgetBlockValAddr (const int blockNr, const int blockPos)
operators

bool isZero ()
 geht davon aus, das setVal sicher durchgefuehrt wird.
template<class TemplateMatrix >
bool operator== (const TemplateMatrix &mat) const
BlockMatrixoperator= (const BlockMatrix &mat)
convert

TMatrix< TRing > * unblock ()
IO

void outputMatrix (ostream &os) const
 output matrix in Macaulay style
void printValue (ostream &os) const

Static Public Member Functions

static int refit (int number, int multipleTo)

Protected Attributes

Block Matrix Data

int rows
 number of rows,
int cols
 number of columns
int rowBlockSize
 number of rows in a block submatrix
int colBlockSize
 number of cols in a block submatrix
const TRing * ring
 pointer to an object with operations on TRing elements TNum.
TNumdata
 matrix data
string name
 matrix name
redundand information

int extendedRowNum
 Anzahl der Zeilen, auf Vielfaches der Zeilenblockgroesse aufgefuellt.
int extendedColNum
 Anzahl der spalten, auf Vielfaches der Spaltenblockgroesse aufgefuellt.

Detailed Description

template<class TRing>
class BlockMatrix< TRing >

Definition at line 43 of file BlockMatrix.h.


Member Typedef Documentation

template<class TRing>
typedef TRing::ElementType BlockMatrix< TRing >::TNum

Definition at line 49 of file BlockMatrix.h.


Constructor & Destructor Documentation

template<class TRing >
BlockMatrix< TRing >::BlockMatrix ( int  _rowBlockSize,
int  _colBlockSize,
int  _rows,
int  _cols,
const TRing *  _ring,
string  _name = "unnamedMatrix" 
) [inline]
template<class TRing >
BlockMatrix< TRing >::BlockMatrix ( const BlockMatrix< TRing > &  mat  )  [inline]

copy data:

Definition at line 51 of file BlockMatrix.cpp.

References BlockMatrix< TRing >::data, BlockMatrix< TRing >::getBlockNum(), BlockMatrix< TRing >::getBlockSize(), and BlockMatrix< TRing >::getSize().

Here is the call graph for this function:

template<class TRing >
BlockMatrix< TRing >::~BlockMatrix (  )  [inline, virtual]

Definition at line 81 of file BlockMatrix.cpp.

References BlockMatrix< TRing >::data.


Member Function Documentation

template<class TRing>
bool BlockMatrix< TRing >::blocksAreSquare (  )  const [inline]
template<class TRing >
void BlockMatrix< TRing >::checkBlockBounds ( int  _blockNum,
int  _blockPos 
) const [inline]
template<class TRing >
void BlockMatrix< TRing >::checkBounds ( int  row,
int  col 
) const [inline]
template<class TRing >
tBlockPos BlockMatrix< TRing >::computeBlockPos ( int  _row,
int  _col 
) const [inline]
template<class TRing >
tPos BlockMatrix< TRing >::computeNormalPos ( int  _blockNr,
int  _blockPos 
) const [inline]
template<class TRing >
void BlockMatrix< TRing >::fillZero (  )  [inline]

Definition at line 118 of file BlockMatrix.cpp.

References BlockMatrix< TRing >::data, and BlockMatrix< TRing >::getSize().

Referenced by BlockMatrix< TRing >::BlockMatrix().

Here is the call graph for this function:

template<class TRing>
int BlockMatrix< TRing >::getBlockNum (  )  const [inline]
template<class TRing>
int BlockMatrix< TRing >::getBlockSize (  )  const [inline]
template<class TRing>
int BlockMatrix< TRing >::getBlocksPerCol (  )  const [inline]
template<class TRing>
int BlockMatrix< TRing >::getBlocksPerRow (  )  const [inline]
template<class TRing >
TRing::ElementType BlockMatrix< TRing >::getBlockVal ( const int  blockNr,
const int  blockPos 
) [inline]

Definition at line 251 of file BlockMatrix.cpp.

References BlockMatrix< TRing >::checkBlockBounds(), BlockMatrix< TRing >::data, and BlockMatrix< TRing >::getBlockSize().

Here is the call graph for this function:

template<class TRing >
TRing::ElementType * BlockMatrix< TRing >::getBlockValAddr ( const int  blockNr,
const int  blockPos 
) [inline]

Definition at line 242 of file BlockMatrix.cpp.

References BlockMatrix< TRing >::checkBlockBounds(), BlockMatrix< TRing >::data, and BlockMatrix< TRing >::getBlockSize().

Here is the call graph for this function:

template<class TRing>
int BlockMatrix< TRing >::getColBlockSize (  )  const [inline]
template<class TRing>
int BlockMatrix< TRing >::getColNum (  )  const [inline]

Definition at line 114 of file BlockMatrix.h.

References BlockMatrix< TRing >::cols.

template<class TRing >
const TRing::ElementType & BlockMatrix< TRing >::getConstValRef ( const int  row,
const int  col 
) const [inline]
template<class TRing>
std::string BlockMatrix< TRing >::getName (  )  const [inline]

Definition at line 133 of file BlockMatrix.h.

References BlockMatrix< TRing >::name.

template<class TRing>
int BlockMatrix< TRing >::getRowBlockSize (  )  const [inline]
template<class TRing>
int BlockMatrix< TRing >::getRowNum (  )  const [inline]

Definition at line 115 of file BlockMatrix.h.

References BlockMatrix< TRing >::rows.

template<class TRing>
size_t BlockMatrix< TRing >::getSize (  )  const [inline]
template<class TRing >
TRing::ElementType BlockMatrix< TRing >::getVal ( const int  row,
const int  col 
) const [inline]
template<class TRing >
TRing::ElementType & BlockMatrix< TRing >::getValRef ( const int  row,
const int  col 
) [inline]
template<class TRing >
bool BlockMatrix< TRing >::isZero (  )  [inline]

Definition at line 374 of file BlockMatrix.cpp.

References BlockMatrix< TRing >::data, and BlockMatrix< TRing >::getSize().

Here is the call graph for this function:

template<class TRing >
BlockMatrix< TRing > & BlockMatrix< TRing >::operator= ( const BlockMatrix< TRing > &  mat  )  [inline]
template<class TRing >
template<class TemplateMatrix >
bool BlockMatrix< TRing >::operator== ( const TemplateMatrix &  mat  )  const [inline]

Definition at line 274 of file BlockMatrix.cpp.

References BlockMatrix< TRing >::cols, BlockMatrix< TRing >::getVal(), and BlockMatrix< TRing >::rows.

Here is the call graph for this function:

template<class TRing >
void BlockMatrix< TRing >::outputMatrix ( ostream &  os  )  const [inline]

output Matrix in Macaulay style

Definition at line 415 of file BlockMatrix.cpp.

References BlockMatrix< TRing >::cols, BlockMatrix< TRing >::getVal(), BlockMatrix< TRing >::name, and BlockMatrix< TRing >::rows.

Here is the call graph for this function:

template<class TRing >
void BlockMatrix< TRing >::printValue ( ostream &  os  )  const [inline]
Todo:
manche Funktionen eine Ebene nach oben ziehen

Definition at line 387 of file BlockMatrix.cpp.

References BlockMatrix< TRing >::cols, BlockMatrix< TRing >::getVal(), and BlockMatrix< TRing >::rows.

Here is the call graph for this function:

template<class TRing >
void BlockMatrix< TRing >::randomInit ( long *  randomSeed  )  [inline]

Definition at line 128 of file BlockMatrix.cpp.

References BlockMatrix< TRing >::data, BlockMatrix< TRing >::getSize(), random(), and BlockMatrix< TRing >::ring.

Here is the call graph for this function:

template<class TRing >
int BlockMatrix< TRing >::refit ( int  number,
int  multipleTo 
) [inline, static]

Definition at line 6 of file BlockMatrix.cpp.

template<class TRing >
void BlockMatrix< TRing >::setBlockVal ( const int  blockNr,
const int  blockPos,
const TNum  z 
) [inline]

Definition at line 260 of file BlockMatrix.cpp.

References BlockMatrix< TRing >::checkBlockBounds(), BlockMatrix< TRing >::data, and BlockMatrix< TRing >::getBlockSize().

Referenced by TMatrix< TRing >::getBlocked().

Here is the call graph for this function:

template<class TRing>
void BlockMatrix< TRing >::setName ( string  _name  )  [inline]

Definition at line 134 of file BlockMatrix.h.

References BlockMatrix< TRing >::name.

template<class TRing >
void BlockMatrix< TRing >::setVal ( const int  row,
const int  col,
const TNum  z 
) [inline]
template<class TRing >
TMatrix< TRing > * BlockMatrix< TRing >::unblock (  )  [inline]
Todo:
diese Funktion testen

Definition at line 331 of file BlockMatrix.cpp.

References BlockMatrix< TRing >::cols, BlockMatrix< TRing >::getVal(), BlockMatrix< TRing >::ring, BlockMatrix< TRing >::rows, and TMatrix< TRing >::setVal().

Here is the call graph for this function:


Member Data Documentation

template<class TRing>
int BlockMatrix< TRing >::colBlockSize [protected]
template<class TRing>
int BlockMatrix< TRing >::cols [protected]
template<class TRing>
TNum* BlockMatrix< TRing >::data [protected]
template<class TRing>
int BlockMatrix< TRing >::extendedColNum [protected]
template<class TRing>
int BlockMatrix< TRing >::extendedRowNum [protected]
template<class TRing>
string BlockMatrix< TRing >::name [protected]
template<class TRing>
const TRing* BlockMatrix< TRing >::ring [protected]
template<class TRing>
int BlockMatrix< TRing >::rowBlockSize [protected]
template<class TRing>
int BlockMatrix< TRing >::rows [protected]

The documentation for this class was generated from the following files:
Generated on Tue Nov 23 13:10:53 2010 for centerfocus by  doxygen 1.6.3