![]() |
GeneralBrokenLines
V01-11-00
|
Simple symmetric Matrix based on std::vector<double> More...
#include <VMatrix.h>
Public Member Functions | |
| VSymMatrix (const unsigned int nRows=0) | |
| virtual | ~VSymMatrix () |
| void | resize (const unsigned int nRows) |
| Resize symmetric matrix. | |
| unsigned int | invert () |
| Matrix inversion. | |
| double & | operator() (unsigned int i, unsigned int j) |
| access element (i,j) assuming i>=j | |
| double | operator() (unsigned int i, unsigned int j) const |
| access element (i,j) assuming i>=j | |
| unsigned int | getNumRows () const |
| Get number of rows (= number of colums). | |
| void | print () const |
| Print matrix. | |
| VSymMatrix | operator- (const VMatrix &aMatrix) const |
| Subtraction SymMatrix-(sym)Matrix. | |
| VVector | operator* (const VVector &aVector) const |
| Multiplication SymMatrix*Vector. | |
| VMatrix | operator* (const VMatrix &aMatrix) const |
| Multiplication SymMatrix*Matrix. | |
Private Attributes | |
| unsigned int | numRows |
| Number of rows. | |
| std::vector< double > | theVec |
| Data (symmetric storage) | |
| VSymMatrix::VSymMatrix | ( | const unsigned int | nRows = 0 | ) |
Definition at line 126 of file VMatrix.cpp.
| VSymMatrix::~VSymMatrix | ( | ) | [virtual] |
Definition at line 131 of file VMatrix.cpp.
| unsigned int VSymMatrix::getNumRows | ( | ) | const |
Get number of rows (= number of colums).
Definition at line 148 of file VMatrix.cpp.
References numRows.
| unsigned int 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 302 of file VMatrix.cpp.
References numRows, and theVec.
Referenced by BorderedBandMatrix::solveAndInvertBorderedBand().
| double & VSymMatrix::operator() | ( | unsigned int | i, |
| unsigned int | j | ||
| ) | [inline] |
| double VSymMatrix::operator() | ( | unsigned int | i, |
| unsigned int | j | ||
| ) | const [inline] |
Multiplication SymMatrix*Vector.
Definition at line 180 of file VMatrix.cpp.
Multiplication SymMatrix*Matrix.
Definition at line 193 of file VMatrix.cpp.
References VMatrix::getNumCols(), numRows, and theVec.
| VSymMatrix VSymMatrix::operator- | ( | const VMatrix & | aMatrix | ) | const |
Subtraction SymMatrix-(sym)Matrix.
Definition at line 169 of file VMatrix.cpp.
| void VSymMatrix::print | ( | ) | const |
Print matrix.
Definition at line 153 of file VMatrix.cpp.
References numRows, and theVec.
Referenced by BorderedBandMatrix::printMatrix().
| void VSymMatrix::resize | ( | const unsigned int | nRows | ) |
Resize symmetric matrix.
| [in] | nRows | Number of rows. |
Definition at line 139 of file VMatrix.cpp.
References numRows, and theVec.
Referenced by BorderedBandMatrix::resize().
unsigned int VSymMatrix::numRows [private] |
Number of rows.
Definition at line 72 of file VMatrix.h.
Referenced by getNumRows(), invert(), operator*(), operator-(), print(), and resize().
std::vector<double> VSymMatrix::theVec [private] |
Data (symmetric storage)
Definition at line 73 of file VMatrix.h.
Referenced by invert(), operator()(), operator*(), operator-(), print(), and resize().
1.7.6.1