List of all members | Public Member Functions | Private Attributes | Friends
FdEnergyDepositFinderKG::DiagonalMatrix Class Reference

#include <LinearAlgebra.h>

Public Member Functions

void Clear ()
 Free the matrix (requiring another SetSize(n) call for reuse) More...
 
 DiagonalMatrix (const int n)
 (n*n) diagonal matrix More...
 
 DiagonalMatrix (const int n, const double x)
 (n*n) diagonal matrix, elements intialized to x More...
 
 DiagonalMatrix ()
 Empty matrix (needs SetSize() later) More...
 
DiagonalMatrix GetInverse () const
 
unsigned int GetSize () const
 
const double & operator() (const int row, const int col) const
 Read-only access to a matrix element. More...
 
double & operator() (const int row, const int col)
 Read/write access to a matrix element. More...
 
const double & operator() (const int iDiagonal) const
 Read-only access to a diagonal matrix element. More...
 
double & operator() (const int iDiagonal)
 Read/write access to a diagonal matrix element. More...
 
ColumnVector operator* (const ColumnVector &rhs) const
 
DiagonalMatrix operator+ (const DiagonalMatrix &rhs) const
 
void Print () const
 Dump ASCII representation to STDOUT (for debugging) More...
 
void SetSize (const int n)
 
void Zero ()
 Set all elements to 0. More...
 

Private Attributes

std::vector< double > fElements
 

Friends

class LowerTriangularMatrix
 

Detailed Description

Definition at line 107 of file LinearAlgebra.h.

Constructor & Destructor Documentation

FdEnergyDepositFinderKG::DiagonalMatrix::DiagonalMatrix ( const int  n)
inline

(n*n) diagonal matrix

Definition at line 110 of file LinearAlgebra.h.

FdEnergyDepositFinderKG::DiagonalMatrix::DiagonalMatrix ( const int  n,
const double  x 
)
inline

(n*n) diagonal matrix, elements intialized to x

Definition at line 113 of file LinearAlgebra.h.

FdEnergyDepositFinderKG::DiagonalMatrix::DiagonalMatrix ( )
inline

Empty matrix (needs SetSize() later)

Definition at line 117 of file LinearAlgebra.h.

Member Function Documentation

void FdEnergyDepositFinderKG::DiagonalMatrix::Clear ( )
inline

Free the matrix (requiring another SetSize(n) call for reuse)

Definition at line 132 of file LinearAlgebra.h.

References fElements.

DiagonalMatrix FdEnergyDepositFinderKG::DiagonalMatrix::GetInverse ( ) const

Definition at line 247 of file LinearAlgebra.cc.

References GetSize().

unsigned int FdEnergyDepositFinderKG::DiagonalMatrix::GetSize ( ) const
inline
const double & FdEnergyDepositFinderKG::DiagonalMatrix::operator() ( const int  row,
const int  col 
) const

Read-only access to a matrix element.

Definition at line 164 of file LinearAlgebra.cc.

References fElements.

double & FdEnergyDepositFinderKG::DiagonalMatrix::operator() ( const int  row,
const int  col 
)

Read/write access to a matrix element.

Definition at line 174 of file LinearAlgebra.cc.

References fElements.

const double& FdEnergyDepositFinderKG::DiagonalMatrix::operator() ( const int  iDiagonal) const
inline

Read-only access to a diagonal matrix element.

Definition at line 125 of file LinearAlgebra.h.

References fElements.

double& FdEnergyDepositFinderKG::DiagonalMatrix::operator() ( const int  iDiagonal)
inline

Read/write access to a diagonal matrix element.

Definition at line 128 of file LinearAlgebra.h.

References fElements.

ColumnVector FdEnergyDepositFinderKG::DiagonalMatrix::operator* ( const ColumnVector rhs) const
DiagonalMatrix FdEnergyDepositFinderKG::DiagonalMatrix::operator+ ( const DiagonalMatrix rhs) const

Definition at line 215 of file LinearAlgebra.cc.

References fElements, and GetSize().

void FdEnergyDepositFinderKG::DiagonalMatrix::Print ( ) const

Dump ASCII representation to STDOUT (for debugging)

Definition at line 190 of file LinearAlgebra.cc.

References GetSize().

void FdEnergyDepositFinderKG::DiagonalMatrix::SetSize ( const int  n)
inline

Set the size of the matrix (the n in n*n). Does NOT initialize elements to 0.

Definition at line 138 of file LinearAlgebra.h.

References fElements.

void FdEnergyDepositFinderKG::DiagonalMatrix::Zero ( )

Set all elements to 0.

Definition at line 183 of file LinearAlgebra.cc.

References fElements.

Friends And Related Function Documentation

friend class LowerTriangularMatrix
friend

Definition at line 152 of file LinearAlgebra.h.

Member Data Documentation

std::vector<double> FdEnergyDepositFinderKG::DiagonalMatrix::fElements
private

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

, generated on Tue Sep 26 2023.