Matrix.inl File Reference

Provides basic functionality for a templated, arbitrarily-sized matrix. More...

#include <iostream>

Go to the source code of this file.

Functions

template<unsigned M, unsigned N, typename T>
Vector< N, T > operator* (const Vector< M, T > &lhs, const Matrix< M, N, T > &rhs)
 1xM row vector * MxN matrix yields a 1xN vector
template<unsigned M, unsigned N, typename T>
Matrix< M, N, T > operator* (const T &scale, const Matrix< M, N, T > &rhs)
template<unsigned M, unsigned N, typename T>
std::ostream & operator<< (std::ostream &os, const Matrix< M, N, T > &m)
 Prints a Matrix to an output stream.


Detailed Description

Provides basic functionality for a templated, arbitrarily-sized matrix.

Author:
Travis Fischer (fisch0920@gmail.com)
Date:
Fall 2008
A Matrix is templated to store M rows and N columns of data of type T. If left off, T will default to a "real_t" data type. Also, if N is not specified, the template will default to a square MxM matrix.

Included in this definition are typedefs for the most commonly used matrices (4x4, 3x3, etc), and these can be thought of as shortcuts to reference their associated Matrix templates. For example, Matrix4x4 can be used to refer to Matrix<4, 4, real_t>.

A Matrix stores each of its M rows internally as an N-length Vector called rows which has been defined as:

Vector<N, T> rows[M];

Definition in file Matrix.inl.


Function Documentation

template<unsigned M, unsigned N, typename T>
Matrix<M, N, T> operator* ( const T &  scale,
const Matrix< M, N, T > &  rhs 
) [inline]

Returns:
the MxN matrix resulting from multiplying a scalar by an MxN matrix

Definition at line 361 of file Matrix.inl.

template<unsigned M, unsigned N, typename T>
Vector<N, T> operator* ( const Vector< M, T > &  lhs,
const Matrix< M, N, T > &  rhs 
) [inline]

1xM row vector * MxN matrix yields a 1xN vector

Definition at line 349 of file Matrix.inl.

template<unsigned M, unsigned N, typename T>
std::ostream& operator<< ( std::ostream &  os,
const Matrix< M, N, T > &  m 
) [inline]

Prints a Matrix to an output stream.

Definition at line 368 of file Matrix.inl.


Generated on 28 Feb 2009 for Milton by doxygen 1.5.6