HyperspaceExplorer 0.7.1
Public Member Functions | Private Attributes
VecMath::Matrix< D, N > Class Template Reference

Matrix<D, N>: a D x D matrix of numbers of type N. More...

#include <Matrix.h>

Inheritance diagram for VecMath::Matrix< D, N >:
Inheritance graph
[legend]
Collaboration diagram for VecMath::Matrix< D, N >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Matrix ()
 default constructor: creates a unit DxD Matrix
 Matrix (unsigned ii, unsigned jj, N theta)
 creates a rotation about axes ii and jj of angle theta
N & operator() (unsigned i, unsigned j)
 Access operator.
const N & operator() (unsigned i, unsigned j) const
 Constant access operator.
Matrix< D, N > operator*= (const Matrix< D, N > &)
 In-place Matrix multiplication.
Matrix< D, N > operator- ()
 Negate every single element.
void scale (const Vector< D, N > &)
 Scale the Matrix separately for each dimension.
std::string toString () const
 String output, mainly for debugging purposes.
 operator std::string () const
 Alias for toString()

Private Attributes

_M [D][D]
 A static two-dimensional array storing the components.

Detailed Description

template<unsigned D, typename N = double>
class VecMath::Matrix< D, N >

Matrix<D, N>: a D x D matrix of numbers of type N.

Template Parameters:
Ddimension of the matrix
Nnumerical type of the matrix elements
Author:
Lene Preuss <lene.preuss@gmail.com>

Constructor & Destructor Documentation

template<unsigned D, typename N>
VecMath::Matrix< D, N >::Matrix ( unsigned  ii,
unsigned  jj,
theta 
)

creates a rotation about axes ii and jj of angle theta

Parameters:
iifirst (row) index
jjsecond (column) index
thetarotation angle

References cos(), and sin().

Here is the call graph for this function:


Member Function Documentation

template<unsigned D, typename N >
const N & VecMath::Matrix< D, N >::operator() ( unsigned  i,
unsigned  j 
) const

Constant access operator.

Parameters:
irow index
jcolumn index
Returns:
$ M_{ij} $
template<unsigned D, typename N >
N & VecMath::Matrix< D, N >::operator() ( unsigned  i,
unsigned  j 
)

Access operator.

Parameters:
irow index
jcolumn index
Returns:
$ M_{ij} $
template<unsigned D, typename N>
Matrix< D, N > VecMath::Matrix< D, N >::operator*= ( const Matrix< D, N > &  B)

In-place Matrix multiplication.

Parameters:
BMatrix to multiply with
Returns:
*this * B

References VecMath::Matrix< D, N >::_M.

template<unsigned D, typename N >
Matrix< D, N > VecMath::Matrix< D, N >::operator- ( )

Negate every single element.

Returns:
- *this

References VecMath::Matrix< D, N >::_M.

template<unsigned D, typename N>
void VecMath::Matrix< D, N >::scale ( const Vector< D, N > &  s)

Scale the Matrix separately for each dimension.

Parameters:
sScaling factor.

References VecMath::Vector< D, N >::dimension().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

Generated on Mon Apr 9 2012 20:25:19 for HyperspaceExplorer 0.7.1 by doxygen 1.7.4  -  Hosted bySourceForge.net Logo