![]() |
GeneralBrokenLines
V01-11-00
|
Simple Matrix based on std::vector<double> More...
#include <VMatrix.h>
Public Member Functions | |
| VMatrix (const unsigned int nRows=0, const unsigned int nCols=0) | |
| VMatrix (const VMatrix &aMatrix) | |
| virtual | ~VMatrix () |
| void | resize (const unsigned int nRows, const unsigned int nCols) |
| Resize Matrix. | |
| VMatrix | transpose () const |
| Get transposed matrix. | |
| double & | operator() (unsigned int i, unsigned int j) |
| access element (i,j) | |
| double | operator() (unsigned int i, unsigned int j) const |
| access element (i,j) | |
| unsigned int | getNumRows () const |
| Get number of rows. | |
| unsigned int | getNumCols () const |
| Get number of columns. | |
| void | print () const |
| Print matrix. | |
| VVector | operator* (const VVector &aVector) const |
| Multiplication Matrix*Vector. | |
| VMatrix | operator* (const VMatrix &aMatrix) const |
| Multiplication Matrix*Matrix. | |
| VMatrix | operator+ (const VMatrix &aMatrix) const |
| Addition Matrix+Matrix. | |
Private Attributes | |
| unsigned int | numRows |
| Number of rows. | |
| unsigned int | numCols |
| Number of columns. | |
| std::vector< double > | theVec |
| Data. | |
| VMatrix::VMatrix | ( | const unsigned int | nRows = 0, |
| const unsigned int | nCols = 0 |
||
| ) |
Definition at line 12 of file VMatrix.cpp.
| VMatrix::VMatrix | ( | const VMatrix & | aMatrix | ) |
Definition at line 17 of file VMatrix.cpp.
| VMatrix::~VMatrix | ( | ) | [virtual] |
Definition at line 23 of file VMatrix.cpp.
| unsigned int VMatrix::getNumCols | ( | ) | const |
Get number of columns.
Definition at line 64 of file VMatrix.cpp.
References numCols.
Referenced by VSymMatrix::operator*(), and BorderedBandMatrix::solveBand().
| unsigned int VMatrix::getNumRows | ( | ) | const |
Get number of rows.
Definition at line 56 of file VMatrix.cpp.
References numRows.
Referenced by BorderedBandMatrix::solveBand().
| double & VMatrix::operator() | ( | unsigned int | i, |
| unsigned int | j | ||
| ) | [inline] |
| double VMatrix::operator() | ( | unsigned int | i, |
| unsigned int | j | ||
| ) | const [inline] |
Multiplication Matrix*Vector.
Definition at line 85 of file VMatrix.cpp.
Multiplication Matrix*Matrix.
Definition at line 98 of file VMatrix.cpp.
Addition Matrix+Matrix.
Definition at line 114 of file VMatrix.cpp.
| void VMatrix::print | ( | ) | const |
Print matrix.
Definition at line 69 of file VMatrix.cpp.
References numCols, numRows, and theVec.
Referenced by BorderedBandMatrix::printMatrix().
| void 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 32 of file VMatrix.cpp.
References numCols, numRows, and theVec.
Referenced by BorderedBandMatrix::resize().
| VMatrix VMatrix::transpose | ( | ) | const |
Get transposed matrix.
Definition at line 42 of file VMatrix.cpp.
References numCols, numRows, and theVec.
Referenced by BorderedBandMatrix::solveAndInvertBorderedBand().
unsigned int VMatrix::numCols [private] |
Number of columns.
Definition at line 53 of file VMatrix.h.
Referenced by getNumCols(), operator()(), operator*(), operator+(), print(), resize(), and transpose().
unsigned int VMatrix::numRows [private] |
Number of rows.
Definition at line 52 of file VMatrix.h.
Referenced by getNumRows(), operator*(), operator+(), print(), resize(), and transpose().
std::vector<double> VMatrix::theVec [private] |
Data.
Definition at line 54 of file VMatrix.h.
Referenced by operator()(), operator*(), operator+(), print(), resize(), and transpose().
1.7.6.1