GeneralBrokenLines  V01-11-00
Public Member Functions | Private Attributes
VMatrix Class Reference

Simple Matrix based on std::vector<double> More...

#include <VMatrix.h>

List of all members.

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.

Detailed Description

Simple Matrix based on std::vector<double>

Definition at line 36 of file VMatrix.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

unsigned int VMatrix::getNumCols ( ) const

Get number of columns.

Returns:
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.

Returns:
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]

access element (i,j)

Definition at line 77 of file VMatrix.h.

References numCols, and theVec.

double VMatrix::operator() ( unsigned int  i,
unsigned int  j 
) const [inline]

access element (i,j)

Definition at line 82 of file VMatrix.h.

References numCols, and theVec.

VVector VMatrix::operator* ( const VVector aVector) const

Multiplication Matrix*Vector.

Definition at line 85 of file VMatrix.cpp.

References numCols, numRows, and theVec.

VMatrix VMatrix::operator* ( const VMatrix aMatrix) const

Multiplication Matrix*Matrix.

Definition at line 98 of file VMatrix.cpp.

References numCols, numRows, and theVec.

VMatrix VMatrix::operator+ ( const VMatrix aMatrix) const

Addition Matrix+Matrix.

Definition at line 114 of file VMatrix.cpp.

References numCols, numRows, and theVec.

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.

Parameters:
[in]nRowsNumber of rows.
[in]nColsNumber of columns.

Definition at line 32 of file VMatrix.cpp.

References numCols, numRows, and theVec.

Referenced by BorderedBandMatrix::resize().

Get transposed matrix.

Returns:
Transposed matrix.

Definition at line 42 of file VMatrix.cpp.

References numCols, numRows, and theVec.

Referenced by BorderedBandMatrix::solveAndInvertBorderedBand().


Member Data Documentation

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().


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs