Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Phx::BasicMatrix< Rows, Cols, value_type > Class Template Reference

Base class implementing standard matrix functionality. More...

#include <PhxMatrix.h>

Inheritance diagram for Phx::BasicMatrix< Rows, Cols, value_type >:

Phx::BasicIndexMatrix< Rows, Cols, value_type > Phx::BasicIndexMatrix< 1, 1, value_type > Phx::BasicIndexMatrix< 2, 1, value_type > Phx::BasicIndexMatrix< 2, 2, value_type > Phx::BasicIndexMatrix< 3, 1, value_type > Phx::BasicIndexMatrix< 3, 3, value_type > Phx::BasicIndexMatrix< 4, 1, value_type > Phx::BasicIndexMatrix< 4, 4, value_type > List of all members.

Public Member Functions

 BasicMatrix (const value_type *data)
uint32_t rows () const
uint32_t columns () const
value_type element (uint16_t row, uint16_t col) const
value_type & element (uint16_t row, uint16_t col)
void element (uint16_t row, uint16_t col, value_type value)
template<uint16_t RowRangeSize, uint16_t ColRangeSize>
Matrix< RowRangeSize, ColRangeSize,
value_type > 
subMatrix (const Matrix< 1, RowRangeSize, uint16_t > &rowRange, const Matrix< 1, ColRangeSize, uint16_t > &colRange)
template<uint32_t RowRangeSize, uint32_t ColRangeSize>
Matrix< RowRangeSize, ColRangeSize,
value_type > 
operator() (const Matrix< 1, RowRangeSize, uint16_t > &rowRange, const Matrix< 1, ColRangeSize, uint16_t > &colRange)
template<uint16_t RhsCols>
Matrix< Rows, RhsCols, value_type > operator * (const Matrix< Cols, RhsCols, value_type > &rhs) const
 Matrix multiplication operator.
Matrix< Rows, Cols, value_type > operator+ (const Matrix< Rows, Cols, value_type > &rhs) const
 Element-wise addition operator.
Matrix< Rows, Cols, value_type > operator- (const Matrix< Rows, Cols, value_type > &rhs) const
 Element-wise subtraction operator.
Matrix< Rows, Cols, value_type > operator * (value_type s) const
 Scalar multiplication operator.
Matrix< Rows, Cols, value_type > operator/ (value_type s) const
 Scalar division operator.
Matrix< Rows, Cols, value_type > operator- (void) const
 Unary negation operator.
Matrix< Cols, Rows, value_type > transpose (void) const
 Returns the matrix transpose of this matrix.
MatrixRow< Rows, Cols, value_type > * data ()
const MatrixRow< Rows, Cols,
value_type > * 
data () const

Static Public Member Functions

static Matrix< Rows, Cols,
value_type > 
identity ()
 Returns an "identity" matrix with dimensions given by the class's template parameters.
static Matrix< Rows, Cols,
value_type > 
zero ()
 Returns a zero matrix with dimensions given by the class's template parameters.
static Matrix< Rows, Cols,
value_type > 
rotationMatrixX (double rad)
 Creates a rotation matrix for rotation around the X axis (roll). rad is the rotation in radians. If matrix is smaler than 3x3 or Rows != Cols a zero filled matrix will be returned.
static Matrix< Rows, Cols,
value_type > 
rotationMatixY (double rad)
 Creates a rotation matrix for rotation around the Y axis (pitch). rad is the rotation in radians. If matrix is smaler than 3x3 or Rows != Cols a zero filled matrix will be returned.
static Matrix< Rows, Cols,
value_type > 
rotationMatixZ (double rad)
 Creates a rotation matrix for rotation around the Z axis (yaw). rad is the rotation in radians. If matrix is smaler than 2x2 or Rows != Cols a zero filled matrix will be returned.
static Matrix< Rows, Cols,
value_type > 
rotationMatix (double roll, double pitch, double yaw)
 Creates a rotation matrix from the euler angels roll, pitch and yaw is the rotation in radians. The order of the rotations is roll-pitch-yaw. Roll is defined as rotation around the X axis, pitch rotation around Y axis and yaw as rotation around the Z axis. If matrix is smaler than 3x3 or Rows != Cols a zero filled matrix will be returned.
static Matrix< Rows, Cols,
value_type > 
rotationMatix (Matrix< 3, 1 > axis, double rad)
 Creates a rotation matrix for rotation around a axis axis is a Matrix<3,1> or a Vector3 that defines the axis to rotate around. rad rotation in radians. If matrix is smaler then a 3x3 or Rows != Cols a zero filled matrix will be returned.

Protected Member Functions

 BasicMatrix (bool dummy)

Protected Attributes

MatrixRow< Rows, Cols, value_type > mData [Rows]

Friends

template<uint16_t Rows2, uint16_t Cols2, typename value_type2>
Matrix< Rows2, Cols2, value_type2 > operator * (double s, const Matrix< Rows2, Cols2, value_type2 > &m)
template<uint16_t Rows2, uint16_t Cols2, typename value_type2>
std::ostream & operator<< (std::ostream &os, const Matrix< Rows2, Cols2, value_type2 > &rhs)
template<uint16_t Rows2, uint16_t Cols2, typename value_type2>
std::istream & operator>> (std::istream &is, Matrix< Rows2, Cols2, value_type2 > &rhs)

Detailed Description

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
class Phx::BasicMatrix< Rows, Cols, value_type >

Base class implementing standard matrix functionality.


Member Function Documentation

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
static Matrix<Rows, Cols, value_type> Phx::BasicMatrix< Rows, Cols, value_type >::identity  )  [inline, static]
 

Returns an "identity" matrix with dimensions given by the class's template parameters.

In the case that Rows != Cols, this matrix is simply the one where the Aii elements for i < min(Rows, Cols) are 1, and all other elements are 0.

Returns:
A Matrix<Rows, Cols, value_type> with off-diagonal elements set to 0, and diagonal elements set to 1.

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
Matrix<Rows, Cols, value_type> Phx::BasicMatrix< Rows, Cols, value_type >::operator * value_type  s  )  const [inline]
 

Scalar multiplication operator.

Returns:
A matrix where result(i,j) = (*this)(i,j) * s.

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
template<uint16_t RhsCols>
Matrix<Rows, RhsCols, value_type> Phx::BasicMatrix< Rows, Cols, value_type >::operator * const Matrix< Cols, RhsCols, value_type > &  rhs  )  const [inline]
 

Matrix multiplication operator.

Returns:
A matrix where result is the matrix product (*this) * rhs.

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
Matrix<Rows, Cols, value_type> Phx::BasicMatrix< Rows, Cols, value_type >::operator+ const Matrix< Rows, Cols, value_type > &  rhs  )  const [inline]
 

Element-wise addition operator.

Returns:
A matrix where result(i,j) = (*this)(i,j) + rhs(i,j).

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
Matrix<Rows, Cols, value_type> Phx::BasicMatrix< Rows, Cols, value_type >::operator- void   )  const [inline]
 

Unary negation operator.

Returns:
A matrix where result(i,j) = -(*this)(i,j).

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
Matrix<Rows, Cols, value_type> Phx::BasicMatrix< Rows, Cols, value_type >::operator- const Matrix< Rows, Cols, value_type > &  rhs  )  const [inline]
 

Element-wise subtraction operator.

Returns:
A matrix where result(i,j) = (*this)(i,j) - rhs(i,j).

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
Matrix<Rows, Cols, value_type> Phx::BasicMatrix< Rows, Cols, value_type >::operator/ value_type  s  )  const [inline]
 

Scalar division operator.

Returns:
A matrix where result(i,j) = (*this)(i,j) / s.

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
static Matrix<Rows, Cols, value_type> Phx::BasicMatrix< Rows, Cols, value_type >::rotationMatix Matrix< 3, 1 >  axis,
double  rad
[inline, static]
 

Creates a rotation matrix for rotation around a axis axis is a Matrix<3,1> or a Vector3 that defines the axis to rotate around. rad rotation in radians. If matrix is smaler then a 3x3 or Rows != Cols a zero filled matrix will be returned.

Returns:
A Matrix<Rows, Cols, value_type> containing the rotation matrix

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
static Matrix<Rows, Cols, value_type> Phx::BasicMatrix< Rows, Cols, value_type >::rotationMatix double  roll,
double  pitch,
double  yaw
[inline, static]
 

Creates a rotation matrix from the euler angels roll, pitch and yaw is the rotation in radians. The order of the rotations is roll-pitch-yaw. Roll is defined as rotation around the X axis, pitch rotation around Y axis and yaw as rotation around the Z axis. If matrix is smaler than 3x3 or Rows != Cols a zero filled matrix will be returned.

Returns:
A Matrix<Rows, Cols, value_type> containing the rotation matrix

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
static Matrix<Rows, Cols, value_type> Phx::BasicMatrix< Rows, Cols, value_type >::rotationMatixY double  rad  )  [inline, static]
 

Creates a rotation matrix for rotation around the Y axis (pitch). rad is the rotation in radians. If matrix is smaler than 3x3 or Rows != Cols a zero filled matrix will be returned.

Returns:
A Matrix<Rows, Cols, value_type> containing the rotation matrix

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
static Matrix<Rows, Cols, value_type> Phx::BasicMatrix< Rows, Cols, value_type >::rotationMatixZ double  rad  )  [inline, static]
 

Creates a rotation matrix for rotation around the Z axis (yaw). rad is the rotation in radians. If matrix is smaler than 2x2 or Rows != Cols a zero filled matrix will be returned.

Returns:
A Matrix<Rows, Cols, value_type> containing the rotation matrix

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
static Matrix<Rows, Cols, value_type> Phx::BasicMatrix< Rows, Cols, value_type >::rotationMatrixX double  rad  )  [inline, static]
 

Creates a rotation matrix for rotation around the X axis (roll). rad is the rotation in radians. If matrix is smaler than 3x3 or Rows != Cols a zero filled matrix will be returned.

Returns:
A Matrix<Rows, Cols, value_type> containing the rotation matrix

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
Matrix<Cols, Rows, value_type> Phx::BasicMatrix< Rows, Cols, value_type >::transpose void   )  const [inline]
 

Returns the matrix transpose of this matrix.

Returns:
A Matrix of dimension Cols by Rows where result(i,j) = (*this)(j,i) for each element.

template<uint16_t Rows, uint16_t Cols, typename value_type = double>
static Matrix<Rows, Cols, value_type> Phx::BasicMatrix< Rows, Cols, value_type >::zero  )  [inline, static]
 

Returns a zero matrix with dimensions given by the class's template parameters.

Returns:
A Matrix<Rows, Cols, value_type> containing all 0.


The documentation for this class was generated from the following file:
Generated on Mon Jul 10 19:45:30 2006 for Phoenix OSFS by  doxygen 1.4.2