linal::Matrix Class Reference

#include <Matrix.h>


Public Member Functions

 Matrix (const int rows, const int columns)
 Matrix (int rows, int columns, const LTree *a)
 Create a Matrix object directly from a Variable[][].
 Matrix (const Matrix &)
 Matrix ()
 ~Matrix ()
Matrixoperator= (const Matrix &)
LTreegetMatrix () const
const int numberOfColumns () const
const int numberOfRows () const
const int numberOfElements () const
DString toDString () const
void stdOut () const
int * getDim () const
 Returns the Dimensions of the Matrix as int[].
void editElement (int m, int n, const LTree &newValue)
 Edits an Element of the Matrix.
LTreegetElement (int m, int n) const
 Returns the Element (m,n).
void print () const
 Prints the Matrix.
Matrix addMatrix (const Matrix &B) const
 Adds the Matrix to the Matrix B, returns the sum.
Matrix subtractMatrix (const Matrix &B) const
 Subtracts the Matrix B from this Matrix, return the difference (this - B).
Matrix scalarMultiplication (const LTree &b) const
 Returns a Matrix which is the scalar product of the matrix and the specified LTree.
Matrix multiplyMatrix (const Matrix &B) const
void fillWith (const LTree &bean)
 Fills the matrix with the specified Variable.
void makeIdentity ()
 Makes the matrix an identity matrix.
void makeDiag (const LTree *a)
 Makes the Matrix a diagonal matrix of elements of the array.
LTree getDeterminate () const
 Returns the determinate of the Matrix.
LTree getTrace () const
 Gives the trace of the matrix.
Matrix getTranspose () const
bool operator== (const Matrix &) const
bool operator!= (const Matrix &rhs) const

Static Public Member Functions

static DString getVersion ()

Private Attributes

int columns
int rows
LTreem


Constructor & Destructor Documentation

linal::Matrix::Matrix ( const int  rows,
const int  columns 
)

linal::Matrix::Matrix ( int  rows,
int  columns,
const LTree a 
)

Create a Matrix object directly from a Variable[][].

Parameters:
columns 
rows 
a LTree[][] array

linal::Matrix::Matrix ( const Matrix  ) 

linal::Matrix::Matrix (  ) 

linal::Matrix::~Matrix (  ) 


Member Function Documentation

Matrix & linal::Matrix::operator= ( const Matrix  ) 

static DString linal::Matrix::getVersion (  )  [inline, static]

LTree* linal::Matrix::getMatrix (  )  const [inline]

const int linal::Matrix::numberOfColumns (  )  const [inline]

const int linal::Matrix::numberOfRows (  )  const [inline]

const int linal::Matrix::numberOfElements (  )  const [inline]

DString linal::Matrix::toDString (  )  const

void linal::Matrix::stdOut (  )  const

int * linal::Matrix::getDim (  )  const

Returns the Dimensions of the Matrix as int[].

Returns:
int[]

void linal::Matrix::editElement ( int  m,
int  n,
const LTree newValue 
)

Edits an Element of the Matrix.

Parameters:
m Column number(as matrix not array, ie at least 1)
n Row number(similar to Column)
newValue LTree Value of the Element (m,n)

LTree & linal::Matrix::getElement ( int  m,
int  n 
) const

Returns the Element (m,n).

Parameters:
m Column
n Row
Returns:
LTree

void linal::Matrix::print (  )  const

Prints the Matrix.

Matrix linal::Matrix::addMatrix ( const Matrix B  )  const

Adds the Matrix to the Matrix B, returns the sum.

Parameters:
B Matrix being added to this Matrix
Returns:
Matrix sum

Matrix linal::Matrix::subtractMatrix ( const Matrix B  )  const

Subtracts the Matrix B from this Matrix, return the difference (this - B).

Parameters:
B Matrix being subtracted from this Matrix
Returns:
Matrix difference

Matrix linal::Matrix::scalarMultiplication ( const LTree b  )  const

Returns a Matrix which is the scalar product of the matrix and the specified LTree.

Returns:
Matrix Product

Matrix linal::Matrix::multiplyMatrix ( const Matrix B  )  const

void linal::Matrix::fillWith ( const LTree bean  ) 

Fills the matrix with the specified Variable.

Parameters:
bean LTree to fill the matrix with

void linal::Matrix::makeIdentity (  ) 

Makes the matrix an identity matrix.

void linal::Matrix::makeDiag ( const LTree a  ) 

Makes the Matrix a diagonal matrix of elements of the array.

Parameters:
a LTree[] Array of diagonal elements

LTree linal::Matrix::getDeterminate (  )  const

Returns the determinate of the Matrix.

Returns:
String determinate of Matrix

LTree linal::Matrix::getTrace (  )  const

Gives the trace of the matrix.

Parameters:
la LinAl Stores Variables
Returns:
LTree

Matrix linal::Matrix::getTranspose (  )  const

bool linal::Matrix::operator== ( const Matrix  )  const

bool linal::Matrix::operator!= ( const Matrix rhs  )  const [inline]


Field Documentation

int linal::Matrix::columns [private]

int linal::Matrix::rows [private]

LTree* linal::Matrix::m [private]


The documentation for this class was generated from the following files:
Generated on Wed Jan 23 14:53:55 2008 by  doxygen 1.5.2