CluE  1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CluE::Matrix Class Reference

Weighted matrix of arbitrary dimension. More...

#include <matrix.h>

Collaboration diagram for CluE::Matrix:
Collaboration graph

Public Member Functions

 Matrix (size_t r=0, size_t c=0)
 Constructs a matrix. More...
 
 Matrix (size_t r, size_t c, std::vector< double > const &e)
 Constructs a matrix. More...
 
 Matrix (Point const &p, bool isRow=false)
 Constructs a matrix. More...
 
virtual ~Matrix ()
 
Matrix transpose () const
 
Matrix cholesky () const
 
bool isSPD () const
 
double spdDeterminant () const
 
Matrix spdInverse () const
 
Matrix gramSchmidt () const
 
Matrixoperator+= (Matrix const &m)
 
Matrixoperator-= (Matrix const &m)
 
Matrixoperator*= (Matrix const &m)
 
Matrix operator+ (Matrix const &m) const
 
Matrix operator- (Matrix const &m) const
 
Matrix operator* (Matrix const &m) const
 
double & operator() (size_t row, size_t col)
 
double operator() (size_t row, size_t col) const
 
size_t numRows () const
 
size_t numColumns () const
 

Static Public Member Functions

static Matrix identity (double dimension)
 
static Matrix ltInverse (Matrix const &lt)
 

Private Attributes

size_t rows
 
size_t cols
 
std::vector< double > entries
 

Detailed Description

Weighted matrix of arbitrary dimension.

Definition at line 17 of file matrix.h.

Constructor & Destructor Documentation

CluE::Matrix::Matrix ( size_t  r = 0,
size_t  c = 0 
)
inline

Constructs a matrix.

Definition at line 23 of file matrix.h.

Matrix::Matrix ( size_t  r,
size_t  c,
std::vector< double > const &  e 
)

Constructs a matrix.

Definition at line 14 of file matrix.cpp.

Matrix::Matrix ( Point const &  p,
bool  isRow = false 
)

Constructs a matrix.

Definition at line 22 of file matrix.cpp.

virtual CluE::Matrix::~Matrix ( )
inlinevirtual

Definition at line 37 of file matrix.h.

Member Function Documentation

Matrix Matrix::transpose ( ) const

Definition at line 40 of file matrix.cpp.

Matrix Matrix::cholesky ( ) const

Definition at line 49 of file matrix.cpp.

bool Matrix::isSPD ( ) const

Definition at line 82 of file matrix.cpp.

double Matrix::spdDeterminant ( ) const

Definition at line 112 of file matrix.cpp.

Matrix Matrix::spdInverse ( ) const

Definition at line 124 of file matrix.cpp.

Matrix Matrix::gramSchmidt ( ) const

Definition at line 146 of file matrix.cpp.

Matrix & Matrix::operator+= ( Matrix const &  m)
Exceptions
InvalidArgumentException[0] Incompatible dimensions!

Definition at line 171 of file matrix.cpp.

Matrix & Matrix::operator-= ( Matrix const &  m)
Exceptions
InvalidArgumentException[0] Incompatible dimensions!

Definition at line 186 of file matrix.cpp.

Matrix & Matrix::operator*= ( Matrix const &  m)
Exceptions
InvalidArgumentException[0] Incompatible dimensions!

Definition at line 211 of file matrix.cpp.

Matrix Matrix::operator+ ( Matrix const &  m) const
Exceptions
InvalidArgumentException[0] Incompatible dimensions!

Definition at line 201 of file matrix.cpp.

Matrix Matrix::operator- ( Matrix const &  m) const
Exceptions
InvalidArgumentException[0] Incompatible dimensions!

Definition at line 206 of file matrix.cpp.

Matrix Matrix::operator* ( Matrix const &  m) const
Exceptions
InvalidArgumentException[0] Incompatible dimensions!

Definition at line 217 of file matrix.cpp.

double& CluE::Matrix::operator() ( size_t  row,
size_t  col 
)
inline

Accesses one particular matrix entry.

Definition at line 86 of file matrix.h.

double CluE::Matrix::operator() ( size_t  row,
size_t  col 
) const
inline

Returns one particular matrix entry.

Definition at line 94 of file matrix.h.

size_t CluE::Matrix::numRows ( ) const
inline

Returns the number of rows of this matrix.

Definition at line 102 of file matrix.h.

size_t CluE::Matrix::numColumns ( ) const
inline

Returns the number of columns of this matrix.

Definition at line 110 of file matrix.h.

Matrix Matrix::identity ( double  dimension)
static

Definition at line 303 of file matrix.cpp.

Matrix Matrix::ltInverse ( Matrix const &  lt)
static

Definition at line 312 of file matrix.cpp.

Member Data Documentation

size_t CluE::Matrix::rows
private

Definition at line 120 of file matrix.h.

size_t CluE::Matrix::cols
private

Definition at line 120 of file matrix.h.

std::vector<double> CluE::Matrix::entries
private

Definition at line 121 of file matrix.h.


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