HepGenMatrix


This is the definition of the HepGenMatrix, base class for HepMatrix, HepSymMatrix and HepDiagMatrix. This is an abstract class.

Authors

Nobu Katayama and Mike Smyth

See also

HepMatrix, HepSymMatrix, HepDiagMatrix, HepVector, HepPile,

Declaration

#include "CLHEP/Matrix/GenMatrix.h"

class HepGenMatrix

Public Member Classes

HepGenMatrix_row
Helper class to implement m[i][j]
Declaration
class HepGenMatrix_row
Constructor
inline HepGenMatrix_row(HepGenMatrix&, int)
[]
HepDouble & operator[](int)

HepGenMatrix_row_const
Helper class to implement m[i][j]
Declaration
class HepGenMatrix_row_const
Constructor
inline HepGenMatrix_row_const(const HepGenMatrix&, int)
[]
const HepDouble & operator[](int) const

Public Member Functions

Destructor
virtual ~HepGenMatrix()
()
virtual HepDouble & operator()(int row, int col) = 0
virtual const HepDouble & operator()(int row, int col) const = 0
Read or write a matrix element.
** Note that the indexing starts from (1,1) **
[]
inline HepGenMatrix_row operator[] (int)
inline const HepGenMatrix_row_const operator[] (int) const
Read or write a matrix element.
While it may not look like it, you simply do m[i][j] to get an element.
** Note that the indexing starts from [0][0] **
error
static void error(const char *s)
invert
virtual void invert(int&) = 0
num_col
virtual int num_col() const = 0
num_row
virtual int num_row() const = 0
swap
inline static void swap(int&, int&)
inline static void swap(HepDouble *&, HepDouble *&)

Non-Member Functions

norm
HepDouble norm(const HepGenMatrix &m)
2-norm of a matrix.
norm1
HepDouble norm1(const HepGenMatrix &m)
1-norm of a matrix.
norm_infinity
HepDouble norm_infinity(const HepGenMatrix &m)
Infinity-norm of a matrix.

Example

CLHEP/test/testMatrix.cc


19 June 2001
EVC