Belle II Software  release-08-01-10
VMatrix Class Reference

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

#include <VMatrix.h>

Collaboration diagram for VMatrix:

Public Member Functions

 VMatrix (const unsigned int nRows=0, const unsigned int nCols=0)
 
 VMatrix (const VMatrix &aMatrix)
 
void resize (const unsigned int nRows, const unsigned int nCols)
 Resize Matrix. More...
 
VMatrix transpose () const
 Get transposed matrix. More...
 
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. More...
 
unsigned int getNumCols () const
 Get number of columns. More...
 
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.
 
VMatrixoperator= (const VMatrix &aMatrix)
 Assignment 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 63 of file VMatrix.h.

Member Function Documentation

◆ getNumCols()

unsigned int getNumCols ( ) const

Get number of columns.

Returns
Number of columns.

Definition at line 87 of file VMatrix.cc.

◆ getNumRows()

unsigned int getNumRows ( ) const

Get number of rows.

Returns
Number of rows.

Definition at line 79 of file VMatrix.cc.

◆ resize()

void resize ( const unsigned int  nRows,
const unsigned int  nCols 
)

Resize Matrix.

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

Definition at line 55 of file VMatrix.cc.

◆ transpose()

VMatrix transpose ( ) const

Get transposed matrix.

Returns
Transposed matrix.

Definition at line 65 of file VMatrix.cc.


The documentation for this class was generated from the following files: