queso-0.57.1
|
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... | |
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.
|
protectedvirtual |
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(), and QUESO::TeuchosMatrix::TeuchosMatrix().
|
pure virtual |
Performs Cholesky factorization of the matrix.
Implemented in QUESO::GslMatrix, QUESO::TeuchosMatrix, 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::TeuchosMatrix::internalSvd(), QUESO::GslMatrix::internalSvd(), QUESO::operator*(), QUESO::TeuchosMatrix::svdSolve(), QUESO::GslMatrix::svdSolve(), and QUESO::GslMatrix::transpose().
|
pure virtual |
Returns the number of columns local of the matrix.
Implemented in QUESO::GslMatrix, QUESO::TeuchosMatrix, 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::TeuchosMatrix::subReadContents(), QUESO::GslMatrix::subReadContents(), QUESO::TeuchosMatrix::subWriteContents(), and QUESO::GslMatrix::subWriteContents().
|
pure virtual |
Returns the number of rows global of the matrix.
Implemented in QUESO::GslMatrix, QUESO::TeuchosMatrix, and QUESO::GslBlockMatrix.
|
pure virtual |
Returns the number of rows local of the matrix.
Implemented in QUESO::GslMatrix, QUESO::TeuchosMatrix, and QUESO::GslBlockMatrix.
|
pure virtual |
Print this matrix.
Implemented in QUESO::GslMatrix, QUESO::TeuchosMatrix, 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, QUESO::TeuchosMatrix, and QUESO::GslBlockMatrix.
|
pure virtual |
Sets to zero all the elements above (including or not) the diagonal of the matrix.
Implemented in QUESO::GslMatrix, QUESO::TeuchosMatrix, and QUESO::GslBlockMatrix.
|
protected |
QUESO environment variable.
Definition at line 116 of file Matrix.h.
Referenced by QUESO::TeuchosMatrix::chol(), QUESO::GslMatrix::chol(), QUESO::TeuchosMatrix::determinant(), QUESO::GslMatrix::determinant(), env(), QUESO::GslMatrix::getColumn(), QUESO::TeuchosMatrix::getColumn(), QUESO::GslMatrix::getRow(), QUESO::TeuchosMatrix::getRow(), QUESO::GslBlockMatrix::GslBlockMatrix(), QUESO::TeuchosMatrix::internalSvd(), QUESO::GslMatrix::internalSvd(), QUESO::TeuchosMatrix::inverse(), QUESO::GslMatrix::inverse(), QUESO::TeuchosMatrix::invertMultiply(), QUESO::GslMatrix::invertMultiply(), QUESO::TeuchosMatrix::invertMultiplyForceLU(), QUESO::GslMatrix::invertMultiplyForceLU(), QUESO::GslMatrix::largestEigen(), QUESO::TeuchosMatrix::lnDeterminant(), QUESO::GslMatrix::lnDeterminant(), QUESO::TeuchosMatrix::multiply(), QUESO::GslMatrix::multiply(), QUESO::TeuchosMatrix::rank(), QUESO::GslMatrix::rank(), QUESO::GslMatrix::smallestEigen(), QUESO::TeuchosMatrix::subReadContents(), QUESO::GslMatrix::subReadContents(), QUESO::TeuchosMatrix::subWriteContents(), QUESO::GslMatrix::subWriteContents(), QUESO::TeuchosMatrix::svdSolve(), QUESO::GslMatrix::svdSolve(), QUESO::TeuchosMatrix::transpose(), 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::TeuchosMatrix::invertMultiply(), QUESO::GslMatrix::invertMultiply(), and setInDebugMode().
|
protected |
Mapping variable.
Definition at line 121 of file Matrix.h.
Referenced by QUESO::TeuchosMatrix::determinant(), QUESO::GslMatrix::determinant(), QUESO::GslMatrix::getColumn(), QUESO::TeuchosMatrix::getColumn(), QUESO::GslMatrix::getRow(), QUESO::TeuchosMatrix::getRow(), QUESO::TeuchosMatrix::inverse(), QUESO::GslMatrix::inverse(), QUESO::TeuchosMatrix::invertMultiply(), QUESO::GslMatrix::invertMultiply(), QUESO::TeuchosMatrix::invertMultiplyForceLU(), QUESO::GslMatrix::invertMultiplyForceLU(), QUESO::GslMatrix::largestEigen(), QUESO::TeuchosMatrix::lnDeterminant(), QUESO::GslMatrix::lnDeterminant(), map(), QUESO::TeuchosMatrix::multiply(), QUESO::GslMatrix::multiply(), numOfProcsForStorage(), QUESO::GslMatrix::smallestEigen(), and QUESO::TeuchosMatrix::transpose().
|
protected |
|
mutableprotected |
Flag for either or not print this matrix.
Definition at line 131 of file Matrix.h.
Referenced by base_copy(), getPrintHorizontally(), QUESO::TeuchosMatrix::print(), QUESO::GslMatrix::print(), and setPrintHorizontally().