queso-0.53.0
|
Class for matrix operations (virtual). More...
#include <Matrix.h>
Public Member Functions | |
Constructor/Destructor methods | |
Matrix (const BaseEnvironment &env, const Map &map) | |
Shaped constructor. More... | |
virtual | ~Matrix () |
Virtual Destructor. More... | |
Environment and Map methods | |
const BaseEnvironment & | env () const |
const Map & | map () const |
unsigned int | numOfProcsForStorage () const |
Attribute methods | |
virtual unsigned int | numRowsLocal () const =0 |
Returns the number of rows local of the matrix. More... | |
virtual unsigned int | numRowsGlobal () const =0 |
Returns the number of rows global of the matrix. More... | |
virtual unsigned int | numCols () const =0 |
Returns the number of columns local of the matrix. More... | |
Mathematical methods | |
virtual int | chol ()=0 |
Performs Cholesky factorization of the matrix. More... | |
Get/Set methods | |
virtual void | zeroLower (bool includeDiagonal=false)=0 |
Sets to zero all the elements bellow (including or not) the diagonal of the matrix. More... | |
virtual void | zeroUpper (bool includeDiagonal=false)=0 |
Sets to zero all the elements above (including or not) the diagonal of the matrix. More... | |
I/O and Miscellaneous methods | |
virtual void | print (std::ostream &os) const =0 |
Print this matrix. More... | |
void | setPrintHorizontally (bool value) const |
Determines whether the matrix should be printed horizontally. More... | |
bool | getPrintHorizontally () const |
Checks if matrix will be is printed horizontally. More... | |
void | setInDebugMode (bool value) const |
Determines whether QUESO will run through this class in debug mode. More... | |
bool | getInDebugMode () const |
Checks if QUESO will run through this class in debug mode. More... | |
Protected Member Functions | |
virtual void | base_copy (const Matrix &src) |
Copies base data from matrix src to this matrix. More... | |
Protected Attributes | |
const BaseEnvironment & | m_env |
QUESO environment variable. More... | |
const Map & | m_map |
Mapping variable. More... | |
bool | m_printHorizontally |
Flag for either or not print this matrix. More... | |
bool | m_inDebugMode |
Flag for either or not QUESO is in debug mode. More... | |
Private Member Functions | |
Matrix () | |
Default constructor. More... | |
Class for matrix operations (virtual).
Base matrix class. The matrix class is an abstract class designed to be used as a base class for different matrix implementations (all actual matrix classes in QUESO).
QUESO::Matrix::Matrix | ( | const BaseEnvironment & | env, |
const Map & | map | ||
) |
Shaped constructor.
Definition at line 31 of file Matrix.C.
|
virtual |
|
private |
Default constructor.
Copies base data from matrix src
to this
matrix.
Definition at line 99 of file Matrix.C.
References m_inDebugMode, and m_printHorizontally.
Referenced by QUESO::GslMatrix::GslMatrix().
|
pure virtual |
Performs Cholesky factorization of the matrix.
Implemented in QUESO::GslMatrix, and QUESO::GslBlockMatrix.
const BaseEnvironment & QUESO::Matrix::env | ( | ) | const |
Definition at line 47 of file Matrix.C.
References m_env.
Referenced by QUESO::GslMatrix::mpiSum(), and QUESO::operator*().
bool QUESO::Matrix::getInDebugMode | ( | ) | const |
Checks if QUESO will run through this class in debug mode.
Definition at line 92 of file Matrix.C.
References m_inDebugMode.
bool QUESO::Matrix::getPrintHorizontally | ( | ) | const |
Checks if matrix will be is printed horizontally.
Definition at line 77 of file Matrix.C.
References m_printHorizontally.
const Map & QUESO::Matrix::map | ( | ) | const |
Definition at line 54 of file Matrix.C.
References m_map.
Referenced by QUESO::GslMatrix::internalSvd(), QUESO::operator*(), and QUESO::GslMatrix::svdSolve().
|
pure virtual |
Returns the number of columns local of the matrix.
Implemented in QUESO::GslMatrix, and QUESO::GslBlockMatrix.
unsigned int QUESO::Matrix::numOfProcsForStorage | ( | ) | const |
Definition at line 62 of file Matrix.C.
References QUESO::Map::Comm(), m_map, and QUESO::MpiComm::NumProc().
Referenced by QUESO::GslMatrix::subReadContents(), and QUESO::GslMatrix::subWriteContents().
|
pure virtual |
Returns the number of rows global of the matrix.
Implemented in QUESO::GslMatrix, and QUESO::GslBlockMatrix.
|
pure virtual |
Returns the number of rows local of the matrix.
Implemented in QUESO::GslMatrix, and QUESO::GslBlockMatrix.
|
pure virtual |
Print this matrix.
Implemented in QUESO::GslMatrix, and QUESO::GslBlockMatrix.
void QUESO::Matrix::setInDebugMode | ( | bool | value | ) | const |
Determines whether QUESO will run through this class in debug mode.
Definition at line 84 of file Matrix.C.
References m_inDebugMode.
void QUESO::Matrix::setPrintHorizontally | ( | bool | value | ) | const |
Determines whether the matrix should be printed horizontally.
Definition at line 69 of file Matrix.C.
References m_printHorizontally.
|
pure virtual |
Sets to zero all the elements bellow (including or not) the diagonal of the matrix.
Implemented in QUESO::GslMatrix, and QUESO::GslBlockMatrix.
|
pure virtual |
Sets to zero all the elements above (including or not) the diagonal of the matrix.
Implemented in QUESO::GslMatrix, and QUESO::GslBlockMatrix.
|
protected |
QUESO environment variable.
Definition at line 116 of file Matrix.h.
Referenced by QUESO::GslMatrix::chol(), QUESO::GslMatrix::determinant(), env(), QUESO::GslMatrix::getColumn(), QUESO::GslMatrix::getRow(), QUESO::GslBlockMatrix::GslBlockMatrix(), QUESO::GslMatrix::internalSvd(), QUESO::GslMatrix::inverse(), QUESO::GslMatrix::invertMultiply(), QUESO::GslMatrix::invertMultiplyForceLU(), QUESO::GslMatrix::largestEigen(), QUESO::GslMatrix::lnDeterminant(), QUESO::GslMatrix::multiply(), QUESO::GslMatrix::rank(), QUESO::GslMatrix::smallestEigen(), QUESO::GslMatrix::subReadContents(), QUESO::GslMatrix::subWriteContents(), QUESO::GslMatrix::svdSolve(), and QUESO::GslMatrix::transpose().
|
mutableprotected |
Flag for either or not QUESO is in debug mode.
Definition at line 134 of file Matrix.h.
Referenced by base_copy(), getInDebugMode(), QUESO::GslMatrix::invertMultiply(), and setInDebugMode().
|
protected |
Mapping variable.
Definition at line 126 of file Matrix.h.
Referenced by QUESO::GslMatrix::determinant(), QUESO::GslMatrix::getColumn(), QUESO::GslMatrix::getRow(), QUESO::GslMatrix::inverse(), QUESO::GslMatrix::invertMultiply(), QUESO::GslMatrix::invertMultiplyForceLU(), QUESO::GslMatrix::largestEigen(), QUESO::GslMatrix::lnDeterminant(), map(), QUESO::GslMatrix::multiply(), numOfProcsForStorage(), QUESO::GslMatrix::smallestEigen(), and QUESO::GslMatrix::transpose().
|
mutableprotected |
Flag for either or not print this matrix.
Definition at line 131 of file Matrix.h.
Referenced by base_copy(), getPrintHorizontally(), QUESO::GslMatrix::print(), and setPrintHorizontally().