Simple symmetric Matrix based on std::vector<double> More...
#include <VMatrix.h>
Public Member Functions | |
unsigned int | getNumRows () const |
Get number of rows (= number of colums). More... | |
unsigned int | invert () |
Matrix inversion. More... | |
double & | operator() (unsigned int i, unsigned int j) |
access element (i,j) assuming i>=j More... | |
double | operator() (unsigned int i, unsigned int j) const |
access element (i,j) assuming i>=j More... | |
VVector | operator* (const VVector &aVector) const |
Multiplication SymMatrix*Vector. More... | |
VMatrix | operator* (const VMatrix &aMatrix) const |
Multiplication SymMatrix*Matrix. More... | |
VSymMatrix | operator- (const VMatrix &aMatrix) const |
Subtraction SymMatrix-(sym)Matrix. More... | |
void | print () const |
Print matrix. More... | |
void | resize (const unsigned int nRows) |
Resize symmetric matrix. More... | |
VSymMatrix (const unsigned int nRows=0) | |
virtual | ~VSymMatrix () |
Private Attributes | |
unsigned int | numRows |
Number of rows. More... | |
std::vector< double > | theVec |
Data (symmetric storage) More... | |
gbl::VSymMatrix::VSymMatrix | ( | const unsigned int | nRows = 0 | ) |
Definition at line 142 of file VMatrix.cc.
|
virtual |
Definition at line 146 of file VMatrix.cc.
unsigned int gbl::VSymMatrix::getNumRows | ( | ) | const |
Get number of rows (= number of colums).
Definition at line 162 of file VMatrix.cc.
References numRows.
unsigned int gbl::VSymMatrix::invert | ( | ) |
Matrix inversion.
Invert symmetric N-by-N matrix V in symmetric storage mode V(1) = V11, V(2) = V12, V(3) = V22, V(4) = V13, . . . replaced by inverse matrix
Method of solution is by elimination selecting the pivot on the diagonal each stage. The rank of the matrix is returned in NRANK. For NRANK ne N, all remaining rows and cols of the resulting matrix V are set to zero.
1 | : matrix is singular. |
Definition at line 326 of file VMatrix.cc.
References first, i, j, findQualityFiles::jj, roll_playback::k, GetRecoTauVFromDQM_MC_cff::kk, prof2calltree::l, prof2calltree::last, bookConverter::max, GetRecoTauVFromDQM_MC_cff::next, numRows, and theVec.
Referenced by gbl::BorderedBandMatrix::solveAndInvertBorderedBand().
|
inline |
access element (i,j) assuming i>=j
Definition at line 103 of file VMatrix.h.
References theVec.
|
inline |
access element (i,j) assuming i>=j
Definition at line 108 of file VMatrix.h.
References theVec.
Multiplication SymMatrix*Vector.
Definition at line 194 of file VMatrix.cc.
References i, j, numRows, and theVec.
Multiplication SymMatrix*Matrix.
Definition at line 207 of file VMatrix.cc.
References gbl::VMatrix::getNumCols(), i, j, prof2calltree::l, numRows, and theVec.
VSymMatrix gbl::VSymMatrix::operator- | ( | const VMatrix & | aMatrix | ) | const |
Subtraction SymMatrix-(sym)Matrix.
Definition at line 183 of file VMatrix.cc.
References i, j, numRows, and theVec.
void gbl::VSymMatrix::print | ( | void | ) | const |
Print matrix.
Definition at line 167 of file VMatrix.cc.
References gather_cfg::cout, i, j, min(), numRows, and theVec.
Referenced by gbl::BorderedBandMatrix::printMatrix().
void gbl::VSymMatrix::resize | ( | const unsigned int | nRows | ) |
Resize symmetric matrix.
[in] | nRows | Number of rows. |
Definition at line 153 of file VMatrix.cc.
References numRows, and theVec.
Referenced by Vispa.Gui.TextDialog.TextDialog::__init__(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::__init__(), Vispa.Main.MainWindow.MainWindow::_loadIni(), gbl::BorderedBandMatrix::resize(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().
|
private |
Number of rows.
Definition at line 78 of file VMatrix.h.
Referenced by getNumRows(), invert(), operator*(), operator-(), print(), and resize().
|
private |
Data (symmetric storage)
Definition at line 79 of file VMatrix.h.
Referenced by invert(), operator()(), operator*(), operator-(), print(), and resize().