Ceylan::Maths::Linear::Matrix Class Reference

#include <CeylanMatrix.h>

Inheritance diagram for Ceylan::Maths::Linear::Matrix:

Inheritance graph
[legend]
Collaboration diagram for Ceylan::Maths::Linear::Matrix:

Collaboration graph
[legend]

List of all members.

Public Types

enum  TextOutputFormat { rawText, html }
 Defines what text output formats for TextDisplayable instances are available. More...

Public Member Functions

 Matrix ()
 Constructs a new matrix.
virtual ~Matrix () throw ()
 Basic virtual destructor.
virtual void nullify ()
 Sets this matrix to the null matrix (all elements zeroed).
virtual void setAllElementsTo (Real commonValue)=0
 Sets this matrix so that all its elements equal commonValue.
virtual Real getElementAt (MatrixIndex abscissa, MatrixIndex ordinate) const =0
 Returns indexed element.
virtual void setElementAt (MatrixIndex abscissa, MatrixIndex ordinate, Real newValue)=0
 Sets indexed element to specified value.
virtual void setToIdentity ()
 Sets this matrix to the identity matrix.
virtual void setToDiagonal (Real diagonalTerm)=0
 Sets this matrix to the a diagonal matrix whose diagonal term is diagonalTerm.
virtual void transpose ()=0
 Tranposes this matrix.
virtual Real trace () const =0
 Computes this matrix's trace.
virtual Real determinant () const =0
 Computes this matrix's determinant.
virtual const std::string toString (VerbosityLevels level=high) const
 Returns a user-friendly description of the state of this object.

Static Public Member Functions

static const std::string ToString (std::list< TextDisplayable * > displayables, Ceylan::VerbosityLevels level=Ceylan::high)
 Returns a user-friendly description of this list of pointers to text displayable instances.
static TextOutputFormat GetOutputFormat ()
 Returns the current overall text format to be used by TextDisplayable instances.
static void SetOutputFormat (TextOutputFormat newOutputFormat)
 Sets the current overall text format to be used by TextDisplayable instances.

Static Public Attributes

static const MatrixIndex Dimensions = 0
 Tells what is the dimension for this Matrix.

Static Protected Attributes

static TextOutputFormat _OutputFormat = rawText
 The text format to be used currently by TextDisplayable instances.


Detailed Description

Definition at line 83 of file CeylanMatrix.h.


Member Enumeration Documentation

Defines what text output formats for TextDisplayable instances are available.

Enumerator:
rawText 
html 

Definition at line 124 of file CeylanTextDisplayable.h.


Constructor & Destructor Documentation

Matrix::Matrix (  ) 

Constructs a new matrix.

Definition at line 39 of file CeylanMatrix.cc.

Matrix::~Matrix (  )  throw () [virtual]

Basic virtual destructor.

Definition at line 46 of file CeylanMatrix.cc.


Member Function Documentation

virtual Real Ceylan::Maths::Linear::Matrix::determinant (  )  const [pure virtual]

Computes this matrix's determinant.

Implemented in Ceylan::Maths::Linear::Matrix2, and Ceylan::Maths::Linear::Matrix3.

virtual Real Ceylan::Maths::Linear::Matrix::getElementAt ( MatrixIndex  abscissa,
MatrixIndex  ordinate 
) const [pure virtual]

Returns indexed element.

Index ranges from 0 to Dimensions-1 for both dimensions.

Exceptions:
MathsException if index is out of bounds and if in debug mode.

Implemented in Ceylan::Maths::Linear::Matrix2, and Ceylan::Maths::Linear::Matrix3.

TextDisplayable::TextOutputFormat TextDisplayable::GetOutputFormat (  )  [static, inherited]

void Matrix::nullify (  )  [virtual]

Sets this matrix to the null matrix (all elements zeroed).

Definition at line 53 of file CeylanMatrix.cc.

References setAllElementsTo().

virtual void Ceylan::Maths::Linear::Matrix::setAllElementsTo ( Real  commonValue  )  [pure virtual]

Sets this matrix so that all its elements equal commonValue.

Implemented in Ceylan::Maths::Linear::Matrix2, and Ceylan::Maths::Linear::Matrix3.

Referenced by nullify().

virtual void Ceylan::Maths::Linear::Matrix::setElementAt ( MatrixIndex  abscissa,
MatrixIndex  ordinate,
Real  newValue 
) [pure virtual]

Sets indexed element to specified value.

Index ranges from 0 to Dimensions-1 for both dimensions.

Exceptions:
MathsException if index is out of bounds and if in debug mode.

Implemented in Ceylan::Maths::Linear::Matrix2, and Ceylan::Maths::Linear::Matrix3.

void TextDisplayable::SetOutputFormat ( TextOutputFormat  newOutputFormat  )  [static, inherited]

Sets the current overall text format to be used by TextDisplayable instances.

Parameters:
newOutputFormat the new output format.

Definition at line 72 of file CeylanTextDisplayable.cc.

References Ceylan::TextDisplayable::_OutputFormat.

Referenced by Ceylan::Log::LogHolder::LogHolder().

virtual void Ceylan::Maths::Linear::Matrix::setToDiagonal ( Real  diagonalTerm  )  [pure virtual]

Sets this matrix to the a diagonal matrix whose diagonal term is diagonalTerm.

Implemented in Ceylan::Maths::Linear::Matrix2, and Ceylan::Maths::Linear::Matrix3.

Referenced by setToIdentity().

void Matrix::setToIdentity (  )  [virtual]

Sets this matrix to the identity matrix.

Reimplemented in Ceylan::Maths::Linear::Matrix2, and Ceylan::Maths::Linear::Matrix3.

Definition at line 62 of file CeylanMatrix.cc.

References setToDiagonal().

Referenced by Ceylan::Locatable2D::blankLocalReferential().

const std::string TextDisplayable::ToString ( std::list< TextDisplayable * >  displayables,
Ceylan::VerbosityLevels  level = Ceylan::high 
) [static, inherited]

Returns a user-friendly description of this list of pointers to text displayable instances.

Parameters:
displayables a list of pointers to TextDisplayable instances/
level the requested verbosity level.
Note:
Text output format is determined from overall settings.
See also:
toString, Ceylan::VerbosityLevels

Definition at line 45 of file CeylanTextDisplayable.cc.

References Ceylan::formatStringList().

const string Matrix::toString ( VerbosityLevels  level = high  )  const [virtual]

Returns a user-friendly description of the state of this object.

Parameters:
level the requested verbosity level.
Note:
Text output format is determined from overall settings.
See also:
TextDisplayable

Implements Ceylan::TextDisplayable.

Reimplemented in Ceylan::Maths::Linear::HomogeneousMatrix3, Ceylan::Maths::Linear::Matrix2, and Ceylan::Maths::Linear::Matrix3.

Definition at line 71 of file CeylanMatrix.cc.

Referenced by Ceylan::Locatable::describe().

virtual Real Ceylan::Maths::Linear::Matrix::trace (  )  const [pure virtual]

Computes this matrix's trace.

Implemented in Ceylan::Maths::Linear::Matrix2, and Ceylan::Maths::Linear::Matrix3.

virtual void Ceylan::Maths::Linear::Matrix::transpose (  )  [pure virtual]

Tranposes this matrix.

Implemented in Ceylan::Maths::Linear::Matrix2, and Ceylan::Maths::Linear::Matrix3.


Member Data Documentation

TextDisplayable::TextOutputFormat TextDisplayable::_OutputFormat = rawText [static, protected, inherited]

The text format to be used currently by TextDisplayable instances.

Note:
Defaults to raw text.

Definition at line 158 of file CeylanTextDisplayable.h.

Referenced by Ceylan::TextDisplayable::GetOutputFormat(), and Ceylan::TextDisplayable::SetOutputFormat().

Tells what is the dimension for this Matrix.

Note:
To be redefined by each Matrix child class.

Reimplemented in Ceylan::Maths::Linear::HomogeneousMatrix3, Ceylan::Maths::Linear::Matrix2, and Ceylan::Maths::Linear::Matrix3.

Definition at line 202 of file CeylanMatrix.h.


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

Generated on Thu Jun 4 20:40:32 2009 for Ceylan by  doxygen 1.5.8