Inheritance diagram for QMatrix:
Every class written within the CUORE framework should use this class for matrix handling
Public Member Functions | |
QMatrix () | |
default constructor | |
QMatrix (int nrow, int ncol) | |
constructor nrow x ncol | |
QMatrix (const QVector &vec) | |
constructor from QVector | |
QMatrix (const QMatrix &orig) | |
copy constructor | |
virtual | ~QMatrix () |
destructor | |
void | Resize (int nrow, int ncol) |
resize a QMatrix | |
int | GetNRow () const |
get number rows | |
int | GetNCol () const |
get number of columns | |
void | Initialize (double val=0) |
initialize all elements (default to 0) | |
void | SetToIdentity () |
initialize to identity | |
void | SetCol (int ncol, const QVector &vec) |
set column to specific vector | |
void | SetRow (int nrow, const QVector &vec) |
set row to specific vectors | |
void | Set (const std::map< int, int > &p) |
get a QMatrix from a map | |
QVector | GetCol (int ncol) const |
get column | |
QVector | GetRow (int nrow) const |
get row | |
QVector | GetRowByColumnIntValue (int col, int val) const |
get row matching the integer value val in column col if more than one value is found in column the first matching row is returned | |
double & | operator() (int i, int j) |
retrieve an element | |
double | operator() (int i, int j) const |
retrieve an element | |
const QMatrix & | operator= (const QMatrix &orig) |
copy the content of another matrix | |
QMatrix | operator- () |
revert sign to alla components | |
const QMatrix & | operator *= (double t) |
multiplication by scalar | |
const QMatrix & | operator *= (const QMatrix &other) |
multiplication by another QMatrix | |
const QMatrix & | operator/= (double t) |
division by scalar | |
const QMatrix & | operator+= (const QMatrix &mat) |
add a QMatrix | |
const QMatrix & | operator-= (const QMatrix &mat) |
subtract a QMatrix | |
const QMatrix & | Mult (const QMatrix &mat) |
Multiply element by element. | |
const QMatrix & | Div (const QMatrix &mat) |
Divide element by element. | |
QMatrix | operator * (const QMatrix &mat) |
Matrix product. | |
QMatrix | operator * (double t) |
Multiplication by scalar. | |
QMatrix | operator/ (double t) |
Division by scalar. | |
QMatrix | operator+ (const QMatrix &mat) |
sum matrix | |
QMatrix | operator- (const QMatrix &mat) |
subtract matrix | |
QVector | operator * (const QVector &vec) |
matrix-vector product | |
QMatrix | T () const |
transpose | |
const QMatrix & | Transpose () |
transpose | |
QMatrix | Inv () const |
inverse | |
const QMatrix & | Invert () |
inverse | |
double | Det () const |
Determinant. | |
Protected Member Functions | |
QMatrix (const gsl_matrix *mat) | |
constructor from gsl_matrix | |
Private Attributes | |
gsl_matrix * | m |
Friends | |
class | QVector |
QMatrix::QMatrix | ( | int | nrow, | |
int | ncol | |||
) |
constructor nrow x ncol
nrow | number of rows | |
ncol | number of columns |
QMatrix::QMatrix | ( | const gsl_matrix * | mat | ) | [protected] |
constructor from gsl_matrix
mat | gsl_matrix of origin |
void QMatrix::Resize | ( | int | nrow, | |
int | ncol | |||
) |
int QMatrix::GetNRow | ( | ) | const [inline] |
get number rows
int QMatrix::GetNCol | ( | ) | const [inline] |
get number of columns
void QMatrix::Initialize | ( | double | val = 0 |
) |
initialize all elements (default to 0)
val | initialization value |
void QMatrix::SetCol | ( | int | ncol, | |
const QVector & | vec | |||
) |
set column to specific vector
ncol | column index | |
vec | initialization vector |
void QMatrix::SetRow | ( | int | nrow, | |
const QVector & | vec | |||
) |
set row to specific vectors
nrow | row index | |
vec | initialization vector |
void QMatrix::Set | ( | const std::map< int, int > & | p | ) |
QVector QMatrix::GetCol | ( | int | ncol | ) | const |
get column
ncol | col index |
QVector QMatrix::GetRow | ( | int | nrow | ) | const |
get row
nrow | row index |
QVector QMatrix::GetRowByColumnIntValue | ( | int | col, | |
int | val | |||
) | const |
get row matching the integer value val in column col if more than one value is found in column the first matching row is returned
col | column index | |
val | value to be matched |
double & QMatrix::operator() | ( | int | i, | |
int | j | |||
) |
double QMatrix::operator() | ( | int | i, | |
int | j | |||
) | const |
copy the content of another matrix
orig | QMatrix of origin |
const QMatrix & QMatrix::operator *= | ( | double | t | ) |
multiplication by scalar
t |
multiplication by another QMatrix
A*=B; replaces A with a matrix with the appropriate dimensions of A*B (matrix product)
other |
const QMatrix & QMatrix::operator/= | ( | double | t | ) |
division by scalar
t |
Multiply element by element.
multiply element by element (a'_ij=a_ij*b_ij) --> NOT product between matrices
mat |
Divide element by element.
divide element by element (a'_ij=a_ij/b_ij) --> NOT division between matrices
mat |
Matrix product.
mat | right element |
QMatrix QMatrix::operator * | ( | double | t | ) |
Multiplication by scalar.
t | scalar |
QMatrix QMatrix::operator/ | ( | double | t | ) |
Division by scalar.
t | scalar |
sum matrix
mat | right element |
subtract matrix
mat | right element |
matrix-vector product
vec | right element |
QMatrix QMatrix::T | ( | ) | const |
transpose
const QMatrix & QMatrix::Transpose | ( | ) |
transpose
QMatrix QMatrix::Inv | ( | ) | const |
inverse
const QMatrix & QMatrix::Invert | ( | ) |
inverse
double QMatrix::Det | ( | ) | const |
Determinant.