Simple Matrix based on std::vector<double> More...
#include <VMatrix.h>
Public Member Functions | |
unsigned int | getNumCols () const |
Get number of columns. More... | |
unsigned int | getNumRows () const |
Get number of rows. More... | |
double & | operator() (unsigned int i, unsigned int j) |
access element (i,j) More... | |
double | operator() (unsigned int i, unsigned int j) const |
access element (i,j) More... | |
VVector | operator* (const VVector &aVector) const |
Multiplication Matrix*Vector. More... | |
VMatrix | operator* (const VMatrix &aMatrix) const |
Multiplication Matrix*Matrix. More... | |
VMatrix | operator+ (const VMatrix &aMatrix) const |
Addition Matrix+Matrix. More... | |
VMatrix & | operator= (const VMatrix &aMatrix) |
Assignment Matrix=Matrix. More... | |
void | print () const |
Print matrix. More... | |
void | resize (const unsigned int nRows, const unsigned int nCols) |
Resize Matrix. More... | |
VMatrix | transpose () const |
Get transposed matrix. More... | |
VMatrix (const unsigned int nRows=0, const unsigned int nCols=0) | |
VMatrix (const VMatrix &aMatrix) | |
virtual | ~VMatrix () |
Private Attributes | |
unsigned int | numCols |
Number of columns. More... | |
unsigned int | numRows |
Number of rows. More... | |
std::vector< double > | theVec |
Data. More... | |
gbl::VMatrix::VMatrix | ( | const unsigned int | nRows = 0 , |
const unsigned int | nCols = 0 |
||
) |
Definition at line 15 of file VMatrix.cc.
gbl::VMatrix::VMatrix | ( | const VMatrix & | aMatrix | ) |
Definition at line 19 of file VMatrix.cc.
|
virtual |
Definition at line 25 of file VMatrix.cc.
unsigned int gbl::VMatrix::getNumCols | ( | ) | const |
Get number of columns.
Definition at line 65 of file VMatrix.cc.
References numCols.
Referenced by gbl::VSymMatrix::operator*(), operator=(), and gbl::BorderedBandMatrix::solveBand().
unsigned int gbl::VMatrix::getNumRows | ( | ) | const |
Get number of rows.
Definition at line 57 of file VMatrix.cc.
References numRows.
Referenced by operator=(), and gbl::BorderedBandMatrix::solveBand().
|
inline |
|
inline |
Multiplication Matrix*Matrix.
Definition at line 99 of file VMatrix.cc.
References i, j, roll_playback::k, numCols, numRows, and theVec.
Addition Matrix+Matrix.
Definition at line 115 of file VMatrix.cc.
References i, j, numCols, numRows, and theVec.
Assignment Matrix=Matrix.
Definition at line 126 of file VMatrix.cc.
References getNumCols(), getNumRows(), i, j, numCols, numRows, and theVec.
void gbl::VMatrix::print | ( | void | ) | const |
Print matrix.
Definition at line 70 of file VMatrix.cc.
References gather_cfg::cout, i, j, min(), numCols, numRows, and theVec.
Referenced by gbl::BorderedBandMatrix::printMatrix().
void gbl::VMatrix::resize | ( | const unsigned int | nRows, |
const unsigned int | nCols | ||
) |
Resize Matrix.
[in] | nRows | Number of rows. |
[in] | nCols | Number of columns. |
Definition at line 33 of file VMatrix.cc.
References numCols, 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().
VMatrix gbl::VMatrix::transpose | ( | ) | const |
Get transposed matrix.
Definition at line 43 of file VMatrix.cc.
References i, j, numCols, numRows, and theVec.
Referenced by gbl::BorderedBandMatrix::solveAndInvertBorderedBand().
|
private |
Number of columns.
Definition at line 59 of file VMatrix.h.
Referenced by getNumCols(), operator()(), operator*(), operator+(), operator=(), print(), resize(), and transpose().
|
private |
Number of rows.
Definition at line 58 of file VMatrix.h.
Referenced by getNumRows(), operator*(), operator+(), operator=(), print(), resize(), and transpose().
|
private |
Data.
Definition at line 60 of file VMatrix.h.
Referenced by operator()(), operator*(), operator+(), operator=(), print(), resize(), and transpose().