VectorNav C++ Library
Classes | Typedefs | Functions
matrix.h File Reference
#include <cassert>
#include <iostream>
#include "vector.h"
#include "exceptions.h"

Go to the source code of this file.

Classes

struct  vn::math::mat< m, n, T >
 Template for a matrix. More...
 
struct  vn::math::mat< 2, 2, T >
 2x2 matrix specialization. More...
 
struct  vn::math::mat< 3, 3, T >
 3x3 matrix specialization. More...
 
struct  vn::math::mat< 4, 4, T >
 4x4 matrix specialization. More...
 

Typedefs

typedef mat< 2 > vn::math::mat2
 2x2 matrix using float as its underlying data type.
 
typedef mat< 3 > vn::math::mat3
 3x3 matrix using float as its underlying data type.
 
typedef mat< 4 > vn::math::mat4
 4x4 matrix using float as its underlying data type.
 
typedef mat< 2 > vn::math::mat22
 2x2 matrix using float as its underlying data type.
 
typedef mat< 3 > vn::math::mat33
 3x3 matrix using float as its underlying data type.
 
typedef mat< 4 > vn::math::mat44
 4x4 matrix using float as its underlying data type.
 
typedef mat< 2, 2, float > vn::math::mat2f
 2x2 matrix using float as its underlying data type.
 
typedef mat< 3, 3, float > vn::math::mat3f
 3x3 matrix using float as its underlying data type.
 
typedef mat< 4, 4, float > vn::math::mat4f
 4x4 matrix using float as its underlying data type.
 
typedef mat< 2, 2, double > vn::math::mat2d
 2x2 matrix using double as its underlying data type.
 
typedef mat< 3, 3, double > vn::math::mat3d
 3x3 matrix using double as its underlying data type.
 
typedef mat< 4, 4, double > vn::math::mat4d
 4x4 matrix using double as its underlying data type.
 
typedef mat< 2, 2, long double > vn::math::mat2ld
 2x2 matrix using long double as its underlying data type.
 
typedef mat< 3, 3, long double > vn::math::mat3ld
 3x3 matrix using long double as its underlying data type.
 
typedef mat< 4, 4, long double > vn::math::mat4ld
 4x4 matrix using long double as its underlying data type.
 
typedef mat< 2, 2, float > vn::math::mat22f
 2x2 matrix using float as its underlying data type.
 
typedef mat< 3, 3, float > vn::math::mat33f
 3x3 matrix using float as its underlying data type.
 
typedef mat< 4, 3, float > vn::math::mat44f
 4x4 matrix using float as its underlying data type.
 
typedef mat< 2, 2, double > vn::math::mat22d
 2x2 matrix using double as its underlying data type.
 
typedef mat< 3, 3, double > vn::math::mat33d
 3x3 matrix using double as its underlying data type.
 
typedef mat< 4, 4, double > vn::math::mat44d
 4x4 matrix using double as its underlying data type.
 
typedef mat< 2, 2, long double > vn::math::mat22ld
 2x2 matrix using long double as its underlying data type.
 
typedef mat< 3, 3, long double > vn::math::mat33ld
 3x3 matrix using long double as its underlying data type.
 
typedef mat< 4, 4, long double > vn::math::mat44ld
 4x4 matrix using long double as its underlying data type.
 

Functions

template<size_t m, size_t n, typename T , typename S >
mat< m, n, T > vn::math::operator* (mat< m, n, T > lhs, const S &rhs)
 Multiplies a matrix by a scalar. More...
 
template<size_t m, size_t n, typename T , typename S >
mat< m, n, T > vn::math::operator* (const S &lhs, mat< m, n, T > rhs)
 Multiplies a matrix by a scalar. More...
 
template<size_t m, size_t n, typename T , size_t r, size_t s, typename S >
mat< m, n, T > vn::math::operator* (mat< m, n, T > &lhs, const mat< r, s, S > &rhs)
 Multiplies two matrices together. More...
 
template<size_t m, size_t n, typename T , typename S >
mat< m, n, T > vn::math::operator/ (mat< m, n, T > lhs, const S &rhs)
 Divides a matrix by a scalar. More...
 
template<size_t m, size_t n, typename T , typename S >
mat< m, n, T > vn::math::operator+ (mat< m, n, T > lhs, const mat< m, n, S > &rhs)
 Adds two matrices together. More...
 
template<size_t m, size_t n, typename T , typename S >
mat< m, n, T > vn::math::operator- (mat< m, n, T > lhs, const mat< m, n, S > &rhs)
 Subtracts a matrix from another matrix. More...
 
template<size_t mDim, size_t nDim, typename T >
std::string vn::math::str (mat< mDim, nDim, T > m)
 Provides a method to generate a representable string from a provided matrix. More...
 
template<size_t mDim, size_t nDim, typename T >
std::ostream & vn::math::operator<< (std::ostream &out, mat< mDim, nDim, T > m)
 Overloads the ostream << operator for easy usage in displaying matrices. More...
 

Detailed Description

{COMMON_HEADER}

DESCRIPTION

This header file provides may types for working with matrices.