Wrapper around FFPACK matrices with some additional functionality. Matrix data_m is stored row-by row. \*Namenskonsistenz zwischen Dateinamen und Klassennamen wiederherstellen.
#include <FFLASMatrix.h>
Public Types | |
typedef Field::Element | ElementType |
Public Member Functions | |
Constructors / Destuctor | |
FFpackMatrix (int _rows, int _cols, int characteristic, string name="unnamedFFPACKMatrix") | |
template<class TMatrix > | |
FFpackMatrix (const TMatrix &mat, int characteristic, bool transpose=false) | |
conversion is not very fast... | |
~FFpackMatrix () | |
Safety | |
void | checkBounds (int row, int col) const |
void | checkDimensions () const |
Data access | |
Field::Element | getVal (int row, int col) const |
void | setVal (int row, int col, typename Field::Element elem) |
Properties | |
string | getName () const |
int | getColNum () const |
int | getRowNum () const |
const Field * | getField () const |
bool | isZero () const |
operators | |
bool | operator== (const FFpackMatrix &mat) const |
FFpackMatrix * | getRightKernel (int &Rkdim) |
unsigned int | getRank () |
returns matrix rank. Attention: matrix data_m is destroyed! | |
FFpackMatrix * | getLeftInverse () |
Field::Element * | solveLGS (const typename Field::Element *rightHandSide, int &rankRef) |
io | |
void | printValue (std::ostream &os) const |
Protected Member Functions | |
Constructors | |
FFpackMatrix (typename Field::Element *data_m, int _rows, int _cols, int characteristic, string name) | |
Private Attributes | |
int | characteristic_m |
const Field * | F |
Matrix entries are elements of Field F. | |
int | rows_m |
number of matrix rows_m | |
int | cols_m |
number of matrix columns | |
int | blocksPerRow |
Field::Element * | data_m |
matrix data_m, row-by row. | |
string | name |
Definition at line 30 of file FFLASMatrix.h.
typedef Field::Element FFpackMatrix< Field >::ElementType |
Definition at line 35 of file FFLASMatrix.h.
FFpackMatrix< Field >::FFpackMatrix | ( | typename Field::Element * | data_m, | |
int | _rows, | |||
int | _cols, | |||
int | characteristic, | |||
string | name | |||
) | [inline, protected] |
Definition at line 155 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::checkDimensions().
FFpackMatrix< Field >::FFpackMatrix | ( | int | _rows, | |
int | _cols, | |||
int | characteristic, | |||
string | _name = "unnamedFFPACKMatrix" | |||
) | [inline] |
Definition at line 120 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::blocksPerRow, FFpackMatrix< Field >::checkDimensions(), FFpackMatrix< Field >::cols_m, FFpackMatrix< Field >::data_m, and FFpackMatrix< Field >::rows_m.
FFpackMatrix< Field >::FFpackMatrix | ( | const TMatrix & | mat, | |
int | characteristic, | |||
bool | transpose = false | |||
) | [inline] |
.getValue aus dieser FKT rauswerfen.
implement a RowByRow Matrix iterator
conversion is not very fast...
Definition at line 54 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::blocksPerRow, FFpackMatrix< Field >::checkDimensions(), FFpackMatrix< Field >::cols_m, FFpackMatrix< Field >::data_m, TMatrix< TRing >::getColNum(), TMatrix< TRing >::getRowNum(), TMatrix< TRing >::getVal(), and FFpackMatrix< Field >::rows_m.
FFpackMatrix< Field >::~FFpackMatrix | ( | ) | [inline] |
Definition at line 409 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::data_m, and FFpackMatrix< Field >::F.
void FFpackMatrix< Field >::checkBounds | ( | int | row, | |
int | col | |||
) | const [inline] |
Definition at line 378 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::cols_m, and FFpackMatrix< Field >::rows_m.
Referenced by FFpackMatrix< Field >::getVal(), and FFpackMatrix< Field >::setVal().
void FFpackMatrix< Field >::checkDimensions | ( | ) | const [inline] |
Definition at line 366 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::cols_m, and FFpackMatrix< Field >::rows_m.
Referenced by FFpackMatrix< Field >::FFpackMatrix().
int FFpackMatrix< Field >::getColNum | ( | ) | const [inline] |
Definition at line 102 of file FFLASMatrix.h.
References FFpackMatrix< Field >::cols_m.
Referenced by FFpackMatrix< Field >::operator==().
const Field* FFpackMatrix< Field >::getField | ( | ) | const [inline] |
Definition at line 105 of file FFLASMatrix.h.
References FFpackMatrix< Field >::F.
FFpackMatrix< Field > * FFpackMatrix< Field >::getLeftInverse | ( | ) | [inline] |
Definition at line 203 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::characteristic_m, FFpackMatrix< Field >::cols_m, FFpackMatrix< Field >::data_m, FFpackMatrix< Field >::F, FFpackMatrix< Field >::name, FFpackMatrix< Field >::printValue(), and FFpackMatrix< Field >::rows_m.
string FFpackMatrix< Field >::getName | ( | ) | const [inline] |
Definition at line 100 of file FFLASMatrix.h.
References FFpackMatrix< Field >::name.
unsigned int FFpackMatrix< Field >::getRank | ( | ) | [inline] |
Definition at line 337 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::cols_m, FFpackMatrix< Field >::data_m, FFpackMatrix< Field >::F, and FFpackMatrix< Field >::rows_m.
FFpackMatrix< Field > * FFpackMatrix< Field >::getRightKernel | ( | int & | Rkdim | ) | [inline] |
Definition at line 174 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::characteristic_m, FFpackMatrix< Field >::cols_m, FFpackMatrix< Field >::data_m, FFpackMatrix< Field >::F, FFpackMatrix< Field >::name, and FFpackMatrix< Field >::rows_m.
int FFpackMatrix< Field >::getRowNum | ( | ) | const [inline] |
Definition at line 103 of file FFLASMatrix.h.
References FFpackMatrix< Field >::rows_m.
Referenced by FFpackMatrix< Field >::operator==().
Field::Element FFpackMatrix< Field >::getVal | ( | int | row, | |
int | col | |||
) | const [inline] |
Definition at line 345 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::checkBounds(), FFpackMatrix< Field >::cols_m, and FFpackMatrix< Field >::data_m.
Referenced by FFpackMatrix< Field >::operator==(), and FFpackMatrix< Field >::printValue().
bool FFpackMatrix< Field >::isZero | ( | ) | const [inline] |
Definition at line 105 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::cols_m, FFpackMatrix< Field >::data_m, and FFpackMatrix< Field >::rows_m.
bool FFpackMatrix< Field >::operator== | ( | const FFpackMatrix< Field > & | mat | ) | const [inline] |
Definition at line 389 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::cols_m, FFpackMatrix< Field >::getColNum(), FFpackMatrix< Field >::getRowNum(), FFpackMatrix< Field >::getVal(), and FFpackMatrix< Field >::rows_m.
void FFpackMatrix< Field >::printValue | ( | std::ostream & | os | ) | const [inline] |
Definition at line 421 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::cols_m, FFpackMatrix< Field >::getVal(), and FFpackMatrix< Field >::rows_m.
Referenced by FFpackMatrix< Field >::getLeftInverse().
void FFpackMatrix< Field >::setVal | ( | int | row, | |
int | col, | |||
typename Field::Element | elem | |||
) | [inline] |
Definition at line 356 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::checkBounds(), FFpackMatrix< Field >::cols_m, and FFpackMatrix< Field >::data_m.
Field::Element * FFpackMatrix< Field >::solveLGS | ( | const typename Field::Element * | rightHandSide, | |
int & | rankRef | |||
) | [inline] |
[in] | rightHandSide | |
[out] | rankRef |
Definition at line 268 of file FFLASMatrix.cpp.
References FFpackMatrix< Field >::cols_m, FFpackMatrix< Field >::data_m, FFpackMatrix< Field >::F, and FFpackMatrix< Field >::rows_m.
int FFpackMatrix< Field >::blocksPerRow [private] |
Definition at line 45 of file FFLASMatrix.h.
Referenced by FFpackMatrix< Field >::FFpackMatrix().
int FFpackMatrix< Field >::characteristic_m [private] |
Definition at line 38 of file FFLASMatrix.h.
Referenced by FFpackMatrix< Field >::getLeftInverse(), and FFpackMatrix< Field >::getRightKernel().
int FFpackMatrix< Field >::cols_m [private] |
Definition at line 43 of file FFLASMatrix.h.
Referenced by FFpackMatrix< Field >::checkBounds(), FFpackMatrix< Field >::checkDimensions(), FFpackMatrix< Field >::FFpackMatrix(), FFpackMatrix< Field >::getColNum(), FFpackMatrix< Field >::getLeftInverse(), FFpackMatrix< Field >::getRank(), FFpackMatrix< Field >::getRightKernel(), FFpackMatrix< Field >::getVal(), FFpackMatrix< Field >::isZero(), FFpackMatrix< Field >::operator==(), FFpackMatrix< Field >::printValue(), FFpackMatrix< Field >::setVal(), and FFpackMatrix< Field >::solveLGS().
Field::Element* FFpackMatrix< Field >::data_m [private] |
Definition at line 48 of file FFLASMatrix.h.
Referenced by FFpackMatrix< Field >::FFpackMatrix(), FFpackMatrix< Field >::getLeftInverse(), FFpackMatrix< Field >::getRank(), FFpackMatrix< Field >::getRightKernel(), FFpackMatrix< Field >::getVal(), FFpackMatrix< Field >::isZero(), FFpackMatrix< Field >::setVal(), FFpackMatrix< Field >::solveLGS(), and FFpackMatrix< Field >::~FFpackMatrix().
const Field* FFpackMatrix< Field >::F [private] |
Definition at line 40 of file FFLASMatrix.h.
Referenced by FFpackMatrix< Field >::getField(), FFpackMatrix< Field >::getLeftInverse(), FFpackMatrix< Field >::getRank(), FFpackMatrix< Field >::getRightKernel(), FFpackMatrix< Field >::solveLGS(), and FFpackMatrix< Field >::~FFpackMatrix().
string FFpackMatrix< Field >::name [private] |
Definition at line 50 of file FFLASMatrix.h.
Referenced by FFpackMatrix< Field >::getLeftInverse(), FFpackMatrix< Field >::getName(), and FFpackMatrix< Field >::getRightKernel().
int FFpackMatrix< Field >::rows_m [private] |
Definition at line 42 of file FFLASMatrix.h.
Referenced by FFpackMatrix< Field >::checkBounds(), FFpackMatrix< Field >::checkDimensions(), FFpackMatrix< Field >::FFpackMatrix(), FFpackMatrix< Field >::getLeftInverse(), FFpackMatrix< Field >::getRank(), FFpackMatrix< Field >::getRightKernel(), FFpackMatrix< Field >::getRowNum(), FFpackMatrix< Field >::isZero(), FFpackMatrix< Field >::operator==(), FFpackMatrix< Field >::printValue(), and FFpackMatrix< Field >::solveLGS().