EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gbl::VMatrix Class Reference

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

#include <fun4all_GenFit/blob/master/GBL/include/VMatrix.h>

+ Collaboration diagram for gbl::VMatrix:

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

View newest version in sPHENIX GitHub at line 63 of file VMatrix.h

Constructor & Destructor Documentation

gbl::VMatrix::VMatrix ( const unsigned int  nRows = 0,
const unsigned int  nCols = 0 
)

Definition at line 37 of file VMatrix.cc.

View newest version in sPHENIX GitHub at line 37 of file VMatrix.cc

gbl::VMatrix::VMatrix ( const VMatrix aMatrix)

Definition at line 41 of file VMatrix.cc.

View newest version in sPHENIX GitHub at line 41 of file VMatrix.cc

gbl::VMatrix::~VMatrix ( )
virtual

Definition at line 47 of file VMatrix.cc.

View newest version in sPHENIX GitHub at line 47 of file VMatrix.cc

Member Function Documentation

unsigned int gbl::VMatrix::getNumCols ( ) const

Get number of columns.

Returns
Number of columns.

Definition at line 87 of file VMatrix.cc.

View newest version in sPHENIX GitHub at line 87 of file VMatrix.cc

References numCols.

Referenced by gbl::VSymMatrix::operator*(), operator=(), and gbl::BorderedBandMatrix::solveBand().

+ Here is the caller graph for this function:

unsigned int gbl::VMatrix::getNumRows ( ) const

Get number of rows.

Returns
Number of rows.

Definition at line 79 of file VMatrix.cc.

View newest version in sPHENIX GitHub at line 79 of file VMatrix.cc

References numRows.

Referenced by operator=(), and gbl::BorderedBandMatrix::solveBand().

+ Here is the caller graph for this function:

double & gbl::VMatrix::operator() ( unsigned int  i,
unsigned int  j 
)
inline

access element (i,j)

Definition at line 105 of file VMatrix.h.

View newest version in sPHENIX GitHub at line 105 of file VMatrix.h

References numCols, and theVec.

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

access element (i,j)

Definition at line 110 of file VMatrix.h.

View newest version in sPHENIX GitHub at line 110 of file VMatrix.h

References numCols, and theVec.

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

Multiplication Matrix*Vector.

Definition at line 108 of file VMatrix.cc.

View newest version in sPHENIX GitHub at line 108 of file VMatrix.cc

References numCols, numRows, and theVec.

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

Multiplication Matrix*Matrix.

Definition at line 121 of file VMatrix.cc.

View newest version in sPHENIX GitHub at line 121 of file VMatrix.cc

References k, numCols, numRows, and theVec.

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

Addition Matrix+Matrix.

Definition at line 137 of file VMatrix.cc.

View newest version in sPHENIX GitHub at line 137 of file VMatrix.cc

References numCols, numRows, and theVec.

VMatrix & gbl::VMatrix::operator= ( const VMatrix aMatrix)

Assignment Matrix=Matrix.

Definition at line 148 of file VMatrix.cc.

View newest version in sPHENIX GitHub at line 148 of file VMatrix.cc

References getNumCols(), getNumRows(), numCols, numRows, and theVec.

+ Here is the call graph for this function:

void gbl::VMatrix::print ( void  ) const

Print matrix.

Definition at line 92 of file VMatrix.cc.

View newest version in sPHENIX GitHub at line 92 of file VMatrix.cc

References min, numCols, numRows, and theVec.

Referenced by gbl::BorderedBandMatrix::printMatrix().

+ Here is the caller graph for this function:

void gbl::VMatrix::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.

View newest version in sPHENIX GitHub at line 55 of file VMatrix.cc

References numCols, numRows, and theVec.

Referenced by gbl::BorderedBandMatrix::resize().

+ Here is the caller graph for this function:

VMatrix gbl::VMatrix::transpose ( ) const

Get transposed matrix.

Returns
Transposed matrix.

Definition at line 65 of file VMatrix.cc.

View newest version in sPHENIX GitHub at line 65 of file VMatrix.cc

References numCols, numRows, and theVec.

Referenced by gbl::BorderedBandMatrix::solveAndInvertBorderedBand().

+ Here is the caller graph for this function:

Member Data Documentation

unsigned int gbl::VMatrix::numCols
private

Number of columns.

Definition at line 81 of file VMatrix.h.

View newest version in sPHENIX GitHub at line 81 of file VMatrix.h

Referenced by getNumCols(), operator()(), operator*(), operator+(), operator=(), print(), resize(), and transpose().

unsigned int gbl::VMatrix::numRows
private

Number of rows.

Definition at line 80 of file VMatrix.h.

View newest version in sPHENIX GitHub at line 80 of file VMatrix.h

Referenced by getNumRows(), operator*(), operator+(), operator=(), print(), resize(), and transpose().

std::vector<double> gbl::VMatrix::theVec
private

Data.

Definition at line 82 of file VMatrix.h.

View newest version in sPHENIX GitHub at line 82 of file VMatrix.h

Referenced by operator()(), operator*(), operator+(), operator=(), print(), resize(), and transpose().


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