Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

fmatCore.h File Reference

Defines fmat namespace, for fixed-dimension matrix computation. More...

#include <cmath>
#include <cstring>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <stdexcept>
#include <limits>
#include "attributes.h"
#include <stdio.h>
Include dependency graph for fmatCore.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fmat::Length_mismatch_or_non_vector
struct  fmat::NonSquare_Matrix
struct  fmat::SubVector_is_longer_than_source
struct  fmat::SubMatrix_has_more_rows_than_source
struct  fmat::SubMatrix_has_more_columns_than_source
struct  fmat::Rotation_requires_larger_dimensions
struct  fmat::Matrix_multiplication_left_width_must_match_right_height
struct  fmat::fmat_internal::tmemset_pattern< T, W >
struct  fmat::fmat_internal::tmemset_pattern< T, 1 >
class  fmat::fmat_internal::CompileTimeAssert< MSG, true >
struct  fmat::fmat_internal::NoInit
struct  fmat::fmat_internal::precision_trait< T >
struct  fmat::fmat_internal::precision_trait< bool >
struct  fmat::fmat_internal::precision_trait< char >
struct  fmat::fmat_internal::precision_trait< unsigned char >
struct  fmat::fmat_internal::precision_trait< short >
struct  fmat::fmat_internal::precision_trait< unsigned short >
struct  fmat::fmat_internal::precision_trait< int >
struct  fmat::fmat_internal::precision_trait< unsigned int >
struct  fmat::fmat_internal::precision_trait< long >
struct  fmat::fmat_internal::precision_trait< unsigned long >
struct  fmat::fmat_internal::precision_trait< float >
struct  fmat::fmat_internal::precision_trait< double >
struct  fmat::fmat_internal::precision_trait< long double >
struct  fmat::fmat_internal::unconst< T >
struct  fmat::fmat_internal::unconst< const bool >
struct  fmat::fmat_internal::unconst< const char >
struct  fmat::fmat_internal::unconst< const unsigned char >
struct  fmat::fmat_internal::unconst< const short >
struct  fmat::fmat_internal::unconst< const unsigned short >
struct  fmat::fmat_internal::unconst< const int >
struct  fmat::fmat_internal::unconst< const unsigned int >
struct  fmat::fmat_internal::unconst< const long >
struct  fmat::fmat_internal::unconst< const unsigned long >
struct  fmat::fmat_internal::unconst< const float >
struct  fmat::fmat_internal::unconst< const double >
struct  fmat::fmat_internal::unconst< const long double >
struct  fmat::fmat_internal::do_promotion< T1, T2, promoteT1 >
struct  fmat::fmat_internal::do_promotion< T1, T2, false >
struct  fmat::fmat_internal::promotion_trait< T1, T2 >
struct  fmat::fmat_internal::mmops< T1, T2 >
struct  fmat::fmat_internal::mvops< M, V >
class  fmat::SubVector< N, R >
class  fmat::SubMatrix< H, W, R >
class  fmat::Matrix< H, W, R >
struct  fmat::Matrix< H, W, R >::IdentityMatrix< HH, WW, RR >
class  fmat::Column< N, R >
class  fmat::Row< N, R >
struct  fmat::fmat_internal::mvops< T1< 2, 2, R1 >, T2< 2, R2 > >
struct  fmat::fmat_internal::mvops< T1< 3, 3, R1 >, T2< 3, R2 > >
struct  fmat::fmat_internal::mvops< T1< 4, 4, R1 >, T2< 4, R2 > >
struct  fmat::fmat_internal::mmops< T1< 2, 2, R1 >, T2< 2, 2, R2 > >
struct  fmat::fmat_internal::mmops< T1< 3, 3, R1 >, T2< 3, 3, R2 > >
struct  fmat::fmat_internal::mmops< T1< 4, 4, R1 >, T2< 4, 4, R2 > >

Namespaces

namespace  fmat
 

fixed-size matrix routines for high performance with small allocations


namespace  fmat::fmat_internal

Typedefs

typedef float fmat::fmatReal

Functions

template<typename R >
Column< 2, R > fmat::packT (R x, R y)
 templated version to pack non fmatReal type, using a different name 'packT' so it needs to be explicitly called, e.g. pack(0,0,1) is generally intended as fmatReal, not int
template<typename R >
Column< 3, R > fmat::packT (R x, R y, R z)
template<typename R >
Column< 4, R > fmat::packT (R x, R y, R z, R d)
Column< 2, fmatRealfmat::pack (fmatReal x, fmatReal y)
 generic packing of N values into a Column<N> (note assumes fmatReal, see packT()
Column< 3, fmatRealfmat::pack (fmatReal x, fmatReal y, fmatReal z)
Column< 4, fmatRealfmat::pack (fmatReal x, fmatReal y, fmatReal z, fmatReal d)
template<typename R >
std::string fmat::fullfmt (const R *const data, size_t H, size_t W, std::string const &numberFormat, std::string const &firstLineStart, std::string const &nextLineStart, std::string const &lastLineEnd, std::string const &rowBegin, std::string const &elementSep, std::string const &rowEnd, std::string const &rowSep)
template<typename T >
void fmat::fmat_internal::tmemcpy (T *dst, const T *src, size_t n)
template<typename T >
void fmat::fmat_internal::tmemset (T *dst, const T &src, size_t n)
template<template< size_t N, typename R > class T, size_t N, typename R1 , typename R2 >
Column< N+1, typename
fmat_internal::unconst< R1 >
::type > 
fmat::pack (const T< N, R1 > &x, R2 y)
 packing columns: appending an element or concatenating two columns
template<template< size_t N, typename R > class T, size_t N, typename R1 , typename R2 >
Column< N+1, typename
fmat_internal::unconst< R2 >
::type > 
fmat::pack (R1 x, const T< N, R2 > &y)
template<template< size_t N, typename R > class T1, template< size_t N, typename R > class T2, size_t N1, size_t N2, typename R1 , typename R2 >
Column< N1+N2, typename
fmat_internal::promotion_trait
< R1, R2 >::type > 
fmat::pack (const T1< N1, R1 > &x, const T2< N2, R2 > &y)
template<size_t N, typename R1 , typename R2 >
Column< N+1, typename
fmat_internal::unconst< R1 >
::type > 
fmat::pack (const Column< N, R1 > &x, R2 y)
template<size_t N, typename R1 , typename R2 >
Column< N+1, typename
fmat_internal::unconst< R2 >
::type > 
fmat::pack (R1 x, const Column< N, R2 > &y)
template<size_t N1, size_t N2, typename R >
Column< N1+N2, typename
fmat_internal::unconst< R >
::type > 
fmat::pack (const Column< N1, R > &x, const Column< N2, R > &y)
template<size_t N, typename R1 , typename R2 >
Row< N+1, typename
fmat_internal::unconst< R1 >
::type > 
fmat::pack (const Row< N, R1 > &x, R2 y)
template<size_t N, typename R1 , typename R2 >
Row< N+1, typename
fmat_internal::unconst< R2 >
::type > 
fmat::pack (R1 x, const Row< N, R2 > &y)
template<size_t N1, size_t N2, typename R >
Row< N1+N2, typename
fmat_internal::unconst< R >
::type > 
fmat::pack (const Row< N1, R > &x, const Row< N2, R > &y)
template<size_t N, typename R >
std::ostream & fmat::operator<< (std::ostream &os, const SubVector< N, R > &x)
template<size_t H, size_t W, typename R >
std::ostream & fmat::operator<< (std::ostream &os, const SubMatrix< H, W, R > &x)
template<size_t H, size_t W, typename R >
std::ostream & fmat::operator<< (std::ostream &os, const Matrix< H, W, R > &x)
template<size_t N, typename R >
std::ostream & fmat::operator<< (std::ostream &os, const Column< N, R > &x)
template<size_t N, typename R >
std::ostream & fmat::operator<< (std::ostream &os, const Row< N, R > &x)
template<template< size_t H, size_t W, typename R > class T1, template< size_t H, size_t W, typename R > class T2, size_t H, size_t N, size_t W, typename R1 , typename R2 >
Matrix< H, W, typename
fmat_internal::promotion_trait
< R1, R2 >::type > 
fmat::operator* (const T1< H, N, R1 > &a, const T2< N, W, R2 > &b)
template<template< size_t H, size_t W, typename R > class T1, template< size_t H, size_t W, typename R > class T2, size_t D, typename R1 , typename R2 >
T1< D, D, R1 > & fmat::operator*= (T1< D, D, R1 > &a, const T2< D, D, R2 > &b)
template<template< size_t H, size_t W, typename R > class T2, size_t D, typename R1 , typename R2 >
const SubMatrix< D, D, R1 > & fmat::operator*= (const SubMatrix< D, D, R1 > &a, const T2< D, D, R2 > &b)
template<template< size_t H, size_t W, typename R > class T1, template< size_t N, typename R > class T2, size_t H, size_t N, typename R1 , typename R2 >
Column< H, typename
fmat_internal::promotion_trait
< R1, R2 >::type > 
fmat::operator* (const T1< H, N, R1 > &a, const T2< N, R2 > &b)
template<template< size_t W, typename R > class T1, template< size_t H, size_t W, typename R > class T2, size_t N, size_t W, typename R1 , typename R2 >
Row< W, typename
fmat_internal::promotion_trait
< R1, R2 >::type > 
fmat::operator* (const T1< N, R1 > &a, const T2< N, W, R2 > &b)
template<template< size_t N, typename R > class T, size_t N, typename R >
fmat::Column< N, typename
fmat_internal::unconst< R >
::type > 
fmat::abs (const T< N, R > &v)
template<template< size_t H, size_t W, typename R > class T, size_t H, size_t W, typename R >
fmat::Matrix< H, W, typename
fmat_internal::unconst< R >
::type > 
fmat::abs (const T< H, W, R > &m)
template<typename R >
fmat::atan (const Column< 2, R > &v)
template<typename R >
fmat::atan (const Row< 2, R > &v)
template<typename R >
fmat::atan (const SubVector< 2, R > &v)
template<template< size_t N, typename R > class T1, template< size_t N, typename R > class T2, size_t N, typename R1 , typename R2 >
fmat_internal::promotion_trait
< R1, R2 >::type 
fmat::dotProduct (const T1< N, R1 > &a, const T2< N, R2 > &b)
template<class Ta , class Tb >
fmat_internal::promotion_trait
< typename Ta::storage_t,
typename Tb::storage_t >::type 
fmat::dotProduct (const Ta &a, const Tb &b)
template<class Ta , class Tb >
Column< 3, typename
fmat_internal::promotion_trait
< typename Ta::storage_t,
typename Tb::storage_t >::type > 
fmat::crossProduct (const Ta &a, const Tb &b)
template<template< size_t H, size_t W, typename R > class M, typename R >
fmat_internal::unconst< R >::type fmat::determinant (const M< 2, 2, R > &m)
template<template< size_t H, size_t W, typename R > class M, typename R >
fmat_internal::unconst< R >::type fmat::determinant (const M< 3, 3, R > &m)
template<typename M >
Matrix< M::HEIGHT, M::WIDTH,
typename
fmat_internal::unconst
< typename M::storage_t >
::type > 
fmat::invert (const M &m)
 Computes and returns the inverse of a square matrix using Gauss-Jordan elimination.
template<template< size_t H, size_t W, typename R > class T, typename R >
fmat::det (const T< 2, 2, R > &m)
 returns the determinant for 2x2 matrices
template<template< size_t H, size_t W, typename R > class T, typename R >
fmat::det (const T< 3, 3, R > &m)
 returns the determinant for 3x3 matrices
template<template< size_t N, typename R > class V1, template< size_t N, typename R > class V2, typename R1 , typename R2 >
fmat_internal::promotion_trait
< R1, R2 >::type 
fmat::dotProduct (const V1< 2, R1 > &a, const V2< 2, R2 > &b)
template<template< size_t N, typename R > class V1, template< size_t N, typename R > class V2, typename R1 , typename R2 >
fmat_internal::promotion_trait
< R1, R2 >::type 
fmat::dotProduct (const V1< 3, R1 > &a, const V2< 3, R2 > &b)
template<template< size_t N, typename R > class V1, template< size_t N, typename R > class V2, typename R1 , typename R2 >
fmat_internal::promotion_trait
< R1, R2 >::type 
fmat::dotProduct (const V1< 4, R1 > &a, const V2< 4, R2 > &b)
float fmat::fmat_internal::hypot (float a, float b) ATTR_pure ATTR_always_inline
double fmat::fmat_internal::hypot (double a, double b) ATTR_pure ATTR_always_inline
long double fmat::fmat_internal::hypot (long double a, long double b) ATTR_pure ATTR_always_inline
template<class T >
fmat::fmat_internal::hypot (T a, T b)

Variables

const Column< 4 > fmat::ZEROH
 a length 4 column vector representing zero in homogenous coordinates (0,0,0,1)
const Column< 2 > fmat::UNIT2_X
 a length 2 column with '1' in the first dimension
const Column< 2 > fmat::UNIT2_Y
 a length 2 column with '1' in the second dimension
const Column< 3 > fmat::UNIT3_X
 a length 3 column with '1' in the first dimension
const Column< 3 > fmat::UNIT3_Y
 a length 3 column with '1' in the second dimension
const Column< 3 > fmat::UNIT3_Z
 a length 3 column with '1' in the third dimension

Detailed Description

Defines fmat namespace, for fixed-dimension matrix computation.

Author:
Ethan Tira-Thompson (ejt) (Creator)

Definition in file fmatCore.h.


Tekkotsu v5.1CVS
Generated Mon May 9 04:58:56 2016 by Doxygen 1.6.3