ionflux.org | Impressum

Ionflux::Tools::Matrix3 Class Reference
[Vector mathematics]

Matrix (R3 x R3). More...

#include <Matrix3.hpp>

Inheritance diagram for Ionflux::Tools::Matrix3:

Inheritance graph
[legend]
Collaboration diagram for Ionflux::Tools::Matrix3:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Matrix3 ()
 Constructor.
 Matrix3 (double initX11, double initX12, double initX13, double initX21, double initX22, double initX23, double initX31, double initX32, double initX33)
 Constructor.
 Matrix3 (const Matrix3 &initMat)
 Constructor.
 Matrix3 (const Vector3 &initC1, const Vector3 &initC2, const Vector3 &initC3)
 Constructor.
 Matrix3 (const double *initEntry)
 Constructor.
virtual ~Matrix3 ()
 Destructor.
virtual void setEntries (double newX11, double newX12, double newX13, double newX21, double newX22, double newX23, double newX31, double newX32, double newX33)
 Set entries.
virtual void setEntries (const double *newEntry)
 Set entries.
virtual void setColumns (const Vector3 &newC1, const Vector3 &newC2, const Vector3 &newC3)
 Set column vectors.
virtual void setRows (const Vector3 &newR1, const Vector3 &newR2, const Vector3 &newR3)
 Set row vectors.
virtual void setEntry (int rowIndex, int colIndex, double newEntry)
 Set entry.
virtual void setColumn (int colIndex, const Vector3 &newCol)
 Set column vector.
virtual void setRow (int rowIndex, const Vector3 &newRow)
 Set row vector.
virtual Vector3 getColumn (int colIndex) const
 Get column vector.
virtual Vector3 getRow (int rowIndex) const
 Get row vector.
virtual double getEntry (int rowIndex, int colIndex) const
 Get entry.
virtual Matrix3operator= (const Matrix3 &newMat)
 Assignment operator.
virtual Matrix3 operator+ (const Matrix3 &otherMat) const
 Add operator.
virtual Matrix3 operator- (const Matrix3 &otherMat) const
 Subtract operator.
virtual Matrix3 operator * (const Matrix3 &otherMat) const
 Multiply operator.
virtual Matrix3operator+= (const Matrix3 &otherMat)
 Add operator.
virtual Matrix3operator-= (const Matrix3 &otherMat)
 Subtract operator.
virtual Matrix3operator *= (const Matrix3 &otherMat)
 Multiply operator.
virtual Matrix3operator *= (double a)
 Multiply operator.
virtual Vector3 operator * (const Vector3 &argVec) const
 Multiply operator.
virtual Matrix3 operator * (double a) const
 Multiply operator.
virtual Vector3 operator[] (int rowIndex) const
 Subscript operator.
virtual std::string toString () const
 Create string representation.
virtual double getSubDet (int rowIndex, int colIndex) const
 Calculate subdeterminant.
virtual double getDet () const
 Calculate determinant.
virtual Matrix3 getAdjoint () const
 Get adjoint.
virtual Matrix3transpose ()
 Transpose.
virtual Matrix3invert ()
 Invert.
virtual Matrix3clear ()
 Clear.
virtual Matrix3setIdentity ()
 Set identity matrix.
virtual Matrix3setRotateX (double phi)
 Set rotation matrix (X).
virtual Matrix3setRotateY (double phi)
 Set rotation matrix (X).
virtual Matrix3setRotateZ (double phi)
 Set rotation matrix (Z).
virtual Matrix3setScale (double scaleX, double scaleY, double scaleZ)
 Set scale matrix.
virtual void setX11 (double newX11)
 Set x11 entry.
virtual void setX12 (double newX12)
 Set x13 entry.
virtual void setX13 (double newX13)
 Set x13 entry.
virtual void setX21 (double newX21)
 Set x21 entry.
virtual void setX22 (double newX22)
 Set x22 entry.
virtual void setX23 (double newX23)
 Set x23 entry.
virtual void setX31 (double newX31)
 Set x31 entry.
virtual void setX32 (double newX32)
 Set x32 entry.
virtual void setX33 (double newX33)
 Set x33 entry.
virtual double getX11 () const
 Get x11 entry.
virtual double getX12 () const
 Get x13 entry.
virtual double getX13 () const
 Get x13 entry.
virtual double getX21 () const
 Get x21 entry.
virtual double getX22 () const
 Get x22 entry.
virtual double getX23 () const
 Get x23 entry.
virtual double getX31 () const
 Get x31 entry.
virtual double getX32 () const
 Get x32 entry.
virtual double getX33 () const
 Get x33 entry.

Protected Attributes

double * entry
 Entries.

Detailed Description

Matrix (R3 x R3).

A matrix in three dimensional space.


Constructor & Destructor Documentation

Ionflux::Tools::Matrix3::Matrix3  ) 
 

Constructor.

Construct new Matrix3 object.

Ionflux::Tools::Matrix3::Matrix3 double  initX11,
double  initX12,
double  initX13,
double  initX21,
double  initX22,
double  initX23,
double  initX31,
double  initX32,
double  initX33
 

Constructor.

Construct new Matrix3 object.

Parameters:
initX11 x11 entry.
initX12 x12 entry.
initX13 x13 entry.
initX21 x21 entry.
initX22 x22 entry.
initX23 x23 entry.
initX31 x31 entry.
initX32 x32 entry.
initX33 x33 entry.

Ionflux::Tools::Matrix3::Matrix3 const Matrix3 initMat  ) 
 

Constructor.

Construct new Matrix3 object.

Parameters:
initMat Matrix (R3 x R3).

Ionflux::Tools::Matrix3::Matrix3 const Vector3 initC1,
const Vector3 initC2,
const Vector3 initC3
 

Constructor.

Construct new Matrix3 object.

Parameters:
initC1 First column vector.
initC2 Second column vector.
initC3 Third column vector.

Ionflux::Tools::Matrix3::Matrix3 const double *  initEntry  ) 
 

Constructor.

Construct new Matrix3 object.

Parameters:
initEntry Array of matrix entries.

Ionflux::Tools::Matrix3::~Matrix3  )  [virtual]
 

Destructor.

Destruct Matrix3 object.


Member Function Documentation

Matrix3 & Ionflux::Tools::Matrix3::clear  )  [virtual]
 

Clear.

Clear the matrix (set all entries to zero).

Returns:
Result of the operation.

Matrix3 Ionflux::Tools::Matrix3::getAdjoint  )  const [virtual]
 

Get adjoint.

Get the adjoint of the matrix.

Returns:
Adjoint matrix.

Vector3 Ionflux::Tools::Matrix3::getColumn int  colIndex  )  const [virtual]
 

Get column vector.

Get the specified column vector of the matrix.

Note:
If colIndex is out of range, this function returns the null vector.
Parameters:
colIndex Column index (0...2).
Returns:
Column vector.

double Ionflux::Tools::Matrix3::getDet  )  const [virtual]
 

Calculate determinant.

Calculate the determinant of the matrix.

Returns:
Determinant.

double Ionflux::Tools::Matrix3::getEntry int  rowIndex,
int  colIndex
const [virtual]
 

Get entry.

Get the specified entry of the matrix.

Note:
If either rowIndex or colIndex is out of range, this function does nothing.
Parameters:
rowIndex Row index (0...2).
colIndex Column index (0...2).
Returns:
Matrix entry.

Vector3 Ionflux::Tools::Matrix3::getRow int  rowIndex  )  const [virtual]
 

Get row vector.

Get the specified row vector of the matrix.

Note:
If rowIndex is out of range, this function returns the null vector.
Parameters:
rowIndex Row index (0...2).
Returns:
Row vector.

double Ionflux::Tools::Matrix3::getSubDet int  rowIndex,
int  colIndex
const [virtual]
 

Calculate subdeterminant.

Calculate a subdeterminant of the matrix. A subdeterminant is obtained by calculating the determinant of the matrix resulting from removing a row and a column from the original matrix.

Parameters:
rowIndex Row index of the row to be removed (0...2).
colIndex Column index of the column to be removed (0...2).
Returns:
Subdeterminant.

double Ionflux::Tools::Matrix3::getX11  )  const [virtual]
 

Get x11 entry.

Returns:
Current value of x11 entry.

double Ionflux::Tools::Matrix3::getX12  )  const [virtual]
 

Get x13 entry.

Returns:
Current value of x13 entry.

double Ionflux::Tools::Matrix3::getX13  )  const [virtual]
 

Get x13 entry.

Returns:
Current value of x13 entry.

double Ionflux::Tools::Matrix3::getX21  )  const [virtual]
 

Get x21 entry.

Returns:
Current value of x21 entry.

double Ionflux::Tools::Matrix3::getX22  )  const [virtual]
 

Get x22 entry.

Returns:
Current value of x22 entry.

double Ionflux::Tools::Matrix3::getX23  )  const [virtual]
 

Get x23 entry.

Returns:
Current value of x23 entry.

double Ionflux::Tools::Matrix3::getX31  )  const [virtual]
 

Get x31 entry.

Returns:
Current value of x31 entry.

double Ionflux::Tools::Matrix3::getX32  )  const [virtual]
 

Get x32 entry.

Returns:
Current value of x32 entry.

double Ionflux::Tools::Matrix3::getX33  )  const [virtual]
 

Get x33 entry.

Returns:
Current value of x33 entry.

Matrix3 & Ionflux::Tools::Matrix3::invert  )  [virtual]
 

Invert.

Invert the matrix.

Returns:
Result of the operation.

Matrix3 Ionflux::Tools::Matrix3::operator * double  a  )  const [virtual]
 

Multiply operator.

Calculate the product of the matrix and a scalar.

Parameters:
a Scalar.
Returns:
Result of the operation.

Vector3 Ionflux::Tools::Matrix3::operator * const Vector3 argVec  )  const [virtual]
 

Multiply operator.

Apply a matrix to a vector.

Parameters:
argVec Vector (R3).
Returns:
Result of the operation.

Matrix3 Ionflux::Tools::Matrix3::operator * const Matrix3 otherMat  )  const [virtual]
 

Multiply operator.

Calculate the product of two matrices.

Parameters:
otherMat Matrix (R3 x R3).
Returns:
Result of the operation.

Matrix3 & Ionflux::Tools::Matrix3::operator *= double  a  )  [virtual]
 

Multiply operator.

Calculate the product of the matrix and a scalar.

Parameters:
a Scalar.
Returns:
Result of the operation.

Matrix3 & Ionflux::Tools::Matrix3::operator *= const Matrix3 otherMat  )  [virtual]
 

Multiply operator.

Calculate the product of two matrices.

Parameters:
otherMat Matrix (R3 x R3).
Returns:
Result of the operation.

Matrix3 Ionflux::Tools::Matrix3::operator+ const Matrix3 otherMat  )  const [virtual]
 

Add operator.

Add one matrix to another matrix.

Parameters:
otherMat Matrix (R3 x R3).
Returns:
Result of the operation.

Matrix3 & Ionflux::Tools::Matrix3::operator+= const Matrix3 otherMat  )  [virtual]
 

Add operator.

Add one matrix to another matrix.

Parameters:
otherMat Matrix (R3 x R3).
Returns:
Result of the operation.

Matrix3 Ionflux::Tools::Matrix3::operator- const Matrix3 otherMat  )  const [virtual]
 

Subtract operator.

Subtract one matrix from another matrix.

Parameters:
otherMat Matrix (R3 x R3).
Returns:
Result of the operation.

Matrix3 & Ionflux::Tools::Matrix3::operator-= const Matrix3 otherMat  )  [virtual]
 

Subtract operator.

Subtract one matrix from another matrix.

Parameters:
otherMat Matrix (R3 x R3).
Returns:
Result of the operation.

Matrix3 & Ionflux::Tools::Matrix3::operator= const Matrix3 newMat  )  [virtual]
 

Assignment operator.

Assign one matrix to another matrix.

Parameters:
newMat Matrix (R3 x R3).
Returns:
Result of the operation.

Reimplemented in Ionflux::Tools::Cairo::Matrix.

Vector3 Ionflux::Tools::Matrix3::operator[] int  rowIndex  )  const [virtual]
 

Subscript operator.

Access a row vector of the matrix.

Note:
If rowIndex is out of range, the function returns the null vector.
Parameters:
rowIndex Row index (0...2).
Returns:
Row vector.

void Ionflux::Tools::Matrix3::setColumn int  colIndex,
const Vector3 newCol
[virtual]
 

Set column vector.

Set the specified column vector of the matrix.

Note:
If colIndex is out of range, this function does nothing.
Parameters:
colIndex Column index (0...2).
newCol Column vector.

void Ionflux::Tools::Matrix3::setColumns const Vector3 newC1,
const Vector3 newC2,
const Vector3 newC3
[virtual]
 

Set column vectors.

Set the column vectors of the matrix.

Parameters:
newC1 First column vector.
newC2 Second column vector.
newC3 Third column vector.

void Ionflux::Tools::Matrix3::setEntries const double *  newEntry  )  [virtual]
 

Set entries.

Set the entries of the matrix.

Note:
newEntry is expected to have a size of at least 9.
Parameters:
newEntry Array of entries.

void Ionflux::Tools::Matrix3::setEntries double  newX11,
double  newX12,
double  newX13,
double  newX21,
double  newX22,
double  newX23,
double  newX31,
double  newX32,
double  newX33
[virtual]
 

Set entries.

Set the entries of the matrix.

Parameters:
newX11 x11 entry.
newX12 x12 entry.
newX13 x13 entry.
newX21 x21 entry.
newX22 x22 entry.
newX23 x23 entry.
newX31 x31 entry.
newX32 x32 entry.
newX33 x33 entry.

void Ionflux::Tools::Matrix3::setEntry int  rowIndex,
int  colIndex,
double  newEntry
[virtual]
 

Set entry.

Set the specified entry of the matrix.

Note:
If either rowIndex or colIndex is out of range, this function does nothing.
Parameters:
rowIndex Row index (0...2).
colIndex Column index (0...2).
newEntry New value of entry.

Matrix3 & Ionflux::Tools::Matrix3::setIdentity  )  [virtual]
 

Set identity matrix.

Set the matrix to the identity matrix.

Returns:
Result of the operation.

Matrix3 & Ionflux::Tools::Matrix3::setRotateX double  phi  )  [virtual]
 

Set rotation matrix (X).

Set the matrix to a rotation matrix around the X axis.

Parameters:
phi Rotation angle (rad).
Returns:
Result of the operation.

Matrix3 & Ionflux::Tools::Matrix3::setRotateY double  phi  )  [virtual]
 

Set rotation matrix (X).

Set the matrix to a rotation matrix around the Y axis.

Parameters:
phi Rotation angle (rad).
Returns:
Result of the operation.

Matrix3 & Ionflux::Tools::Matrix3::setRotateZ double  phi  )  [virtual]
 

Set rotation matrix (Z).

Set the matrix to a rotation matrix around the Z axis.

Parameters:
phi Rotation angle (rad).
Returns:
Result of the operation.

void Ionflux::Tools::Matrix3::setRow int  rowIndex,
const Vector3 newRow
[virtual]
 

Set row vector.

Set the specified row vector of the matrix.

Note:
If rowIndex is out of range, this function does nothing.
Parameters:
rowIndex Row index (0...2).
newRow Row vector.

void Ionflux::Tools::Matrix3::setRows const Vector3 newR1,
const Vector3 newR2,
const Vector3 newR3
[virtual]
 

Set row vectors.

Set the row vectors of the matrix.

Parameters:
newR1 First row vector.
newR2 Second row vector.
newR3 Third row vector.

Matrix3 & Ionflux::Tools::Matrix3::setScale double  scaleX,
double  scaleY,
double  scaleZ
[virtual]
 

Set scale matrix.

Set the matrix to a scale matrix.

Parameters:
scaleX Scale factor (X).
scaleY Scale factor (Y).
scaleZ Scale factor (Z).
Returns:
Result of the operation.

void Ionflux::Tools::Matrix3::setX11 double  newX11  )  [virtual]
 

Set x11 entry.

Set new value of x11 entry.

Parameters:
newX11 New value of x11 entry.

void Ionflux::Tools::Matrix3::setX12 double  newX12  )  [virtual]
 

Set x13 entry.

Set new value of x13 entry.

Parameters:
newX12 New value of x13 entry.

void Ionflux::Tools::Matrix3::setX13 double  newX13  )  [virtual]
 

Set x13 entry.

Set new value of x13 entry.

Parameters:
newX13 New value of x13 entry.

void Ionflux::Tools::Matrix3::setX21 double  newX21  )  [virtual]
 

Set x21 entry.

Set new value of x21 entry.

Parameters:
newX21 New value of x21 entry.

void Ionflux::Tools::Matrix3::setX22 double  newX22  )  [virtual]
 

Set x22 entry.

Set new value of x22 entry.

Parameters:
newX22 New value of x22 entry.

void Ionflux::Tools::Matrix3::setX23 double  newX23  )  [virtual]
 

Set x23 entry.

Set new value of x23 entry.

Parameters:
newX23 New value of x23 entry.

void Ionflux::Tools::Matrix3::setX31 double  newX31  )  [virtual]
 

Set x31 entry.

Set new value of x31 entry.

Parameters:
newX31 New value of x31 entry.

void Ionflux::Tools::Matrix3::setX32 double  newX32  )  [virtual]
 

Set x32 entry.

Set new value of x32 entry.

Parameters:
newX32 New value of x32 entry.

void Ionflux::Tools::Matrix3::setX33 double  newX33  )  [virtual]
 

Set x33 entry.

Set new value of x33 entry.

Parameters:
newX33 New value of x33 entry.

std::string Ionflux::Tools::Matrix3::toString  )  const [virtual]
 

Create string representation.

Create a string representation of the matrix (i.e. "[&lt;R1&gt;,&lt;R2&gt;,&lt;R3&gt;]", R1...R3 being the string representations of the row vectors).

Returns:
String representation.

Matrix3 & Ionflux::Tools::Matrix3::transpose  )  [virtual]
 

Transpose.

Transpose the matrix.

Returns:
Result of the operation.


Member Data Documentation

double* Ionflux::Tools::Matrix3::entry [protected]
 

Entries.


The documentation for this class was generated from the following files:
Generated on Tue Mar 14 21:08:43 2006 for Ionflux Tools Class Library (iftools) by  doxygen 1.4.6