Simbody  3.6
SmallMatrixMixed.h File Reference

This file defines global functions and class members which use a mix of Vec, Row, and Mat types and hence need to wait until everything is defined. More...

Go to the source code of this file.

Namespaces

 SimTK
 This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with other symbols.
 

Functions

template<int M, class EL , int CSL, int RSL, class ER , int RSR>
bool SimTK::operator== (const Mat< M, M, EL, CSL, RSL > &l, const SymMat< M, ER, RSR > &r)
 
template<int M, class EL , int CSL, int RSL, class ER , int RSR>
bool SimTK::operator!= (const Mat< M, M, EL, CSL, RSL > &l, const SymMat< M, ER, RSR > &r)
 
template<int M, class EL , int RSL, class ER , int CSR, int RSR>
bool SimTK::operator== (const SymMat< M, EL, RSL > &l, const Mat< M, M, ER, CSR, RSR > &r)
 
template<int M, class EL , int RSL, class ER , int CSR, int RSR>
bool SimTK::operator!= (const SymMat< M, EL, RSL > &l, const Mat< M, M, ER, CSR, RSR > &r)
 
template<int M, class E1 , int S1, class E2 , int S2>
CNT< typename CNT< E1 >::THerm >::template Result< E2 >::Mul SimTK::dot (const Vec< M, E1, S1 > &r, const Vec< M, E2, S2 > &v)
 
template<class E1 , int S1, class E2 , int S2>
CNT< typename CNT< E1 >::THerm >::template Result< E2 >::Mul SimTK::dot (const Vec< 1, E1, S1 > &r, const Vec< 1, E2, S2 > &v)
 
template<int N, class E1 , int S1, class E2 , int S2>
CNT< E1 >::template Result< E2 >::Mul SimTK::operator* (const Row< N, E1, S1 > &r, const Vec< N, E2, S2 > &v)
 
template<class E1 , int S1, class E2 , int S2>
CNT< E1 >::template Result< E2 >::Mul SimTK::operator* (const Row< 1, E1, S1 > &r, const Vec< 1, E2, S2 > &v)
 
template<int N, class E1 , int S1, class E2 , int S2>
CNT< E1 >::template Result< E2 >::Mul SimTK::dot (const Row< N, E1, S1 > &r, const Vec< N, E2, S2 > &v)
 
template<int M, class E1 , int S1, class E2 , int S2>
CNT< E1 >::template Result< E2 >::Mul SimTK::dot (const Vec< M, E1, S1 > &v, const Row< M, E2, S2 > &r)
 
template<int N, class E1 , int S1, class E2 , int S2>
CNT< E1 >::template Result< E2 >::Mul SimTK::dot (const Row< N, E1, S1 > &r, const Row< N, E2, S2 > &s)
 
template<int M, class E1 , int S1, class E2 , int S2>
Mat< M, M, typename CNT< E1 >::template Result< typename CNT< E2 >::THerm >::Mul > SimTK::outer (const Vec< M, E1, S1 > &v, const Vec< M, E2, S2 > &w)
 
template<int M, class E1 , int S1, class E2 , int S2>
Vec< M, E1, S1 >::template Result< Row< M, E2, S2 > >::Mul SimTK::operator* (const Vec< M, E1, S1 > &v, const Row< M, E2, S2 > &r)
 
template<int M, class E1 , int S1, class E2 , int S2>
Mat< M, M, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::outer (const Vec< M, E1, S1 > &v, const Row< M, E2, S2 > &r)
 
template<int M, class E1 , int S1, class E2 , int S2>
Mat< M, M, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::outer (const Row< M, E1, S1 > &r, const Vec< M, E2, S2 > &v)
 
template<int M, class E1 , int S1, class E2 , int S2>
Mat< M, M, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::outer (const Row< M, E1, S1 > &r, const Row< M, E2, S2 > &s)
 
template<int M, int N, class ME , int CS, int RS, class E , int S>
Mat< M, N, ME, CS, RS >::template Result< Vec< N, E, S > >::Mul SimTK::operator* (const Mat< M, N, ME, CS, RS > &m, const Vec< N, E, S > &v)
 
template<int M, class E , int S, int N, class ME , int CS, int RS>
Row< M, E, S >::template Result< Mat< M, N, ME, CS, RS > >::Mul SimTK::operator* (const Row< M, E, S > &r, const Mat< M, N, ME, CS, RS > &m)
 
template<int N, class ME , int RS, class E , int S>
SymMat< N, ME, RS >::template Result< Vec< N, E, S > >::Mul SimTK::operator* (const SymMat< N, ME, RS > &m, const Vec< N, E, S > &v)
 
template<class ME , int RS, class E , int S>
SymMat< 1, ME, RS >::template Result< Vec< 1, E, S > >::Mul SimTK::operator* (const SymMat< 1, ME, RS > &m, const Vec< 1, E, S > &v)
 
template<class ME , int RS, class E , int S>
SymMat< 2, ME, RS >::template Result< Vec< 2, E, S > >::Mul SimTK::operator* (const SymMat< 2, ME, RS > &m, const Vec< 2, E, S > &v)
 
template<class ME , int RS, class E , int S>
SymMat< 3, ME, RS >::template Result< Vec< 3, E, S > >::Mul SimTK::operator* (const SymMat< 3, ME, RS > &m, const Vec< 3, E, S > &v)
 
template<int M, class E , int S, class ME , int RS>
Row< M, E, S >::template Result< SymMat< M, ME, RS > >::Mul SimTK::operator* (const Row< M, E, S > &r, const SymMat< M, ME, RS > &m)
 
template<class E , int S, class ME , int RS>
Row< 1, E, S >::template Result< SymMat< 1, ME, RS > >::Mul SimTK::operator* (const Row< 1, E, S > &r, const SymMat< 1, ME, RS > &m)
 
template<class E , int S, class ME , int RS>
Row< 2, E, S >::template Result< SymMat< 2, ME, RS > >::Mul SimTK::operator* (const Row< 2, E, S > &r, const SymMat< 2, ME, RS > &m)
 
template<class E , int S, class ME , int RS>
Row< 3, E, S >::template Result< SymMat< 3, ME, RS > >::Mul SimTK::operator* (const Row< 3, E, S > &r, const SymMat< 3, ME, RS > &m)
 
template<int M, class E1 , int S1, int N, class E2 , int S2>
Vec< M, E1, S1 >::template Result< Row< N, E2, S2 > >::MulNon SimTK::operator* (const Vec< M, E1, S1 > &v, const Row< N, E2, S2 > &r)
 
template<int M, class E1 , int S1, int MM, int NN, class E2 , int CS2, int RS2>
Vec< M, E1, S1 >::template Result< Mat< MM, NN, E2, CS2, RS2 > >::MulNon SimTK::operator* (const Vec< M, E1, S1 > &v, const Mat< MM, NN, E2, CS2, RS2 > &m)
 
template<int M, class E1 , int S1, int MM, class E2 , int RS2>
Vec< M, E1, S1 >::template Result< SymMat< MM, E2, RS2 > >::MulNon SimTK::operator* (const Vec< M, E1, S1 > &v, const SymMat< MM, E2, RS2 > &m)
 
template<int M, class E1 , int S1, int MM, class E2 , int S2>
Vec< M, E1, S1 >::template Result< Vec< MM, E2, S2 > >::MulNon SimTK::operator* (const Vec< M, E1, S1 > &v1, const Vec< MM, E2, S2 > &v2)
 
template<int M, class E , int S, int MM, int NN, class ME , int CS, int RS>
Row< M, E, S >::template Result< Mat< MM, NN, ME, CS, RS > >::MulNon SimTK::operator* (const Row< M, E, S > &r, const Mat< MM, NN, ME, CS, RS > &m)
 
template<int N, class E1 , int S1, int M, class E2 , int S2>
Row< N, E1, S1 >::template Result< Vec< M, E2, S2 > >::MulNon SimTK::operator* (const Row< N, E1, S1 > &r, const Vec< M, E2, S2 > &v)
 
template<int N1, class E1 , int S1, int N2, class E2 , int S2>
Row< N1, E1, S1 >::template Result< Row< N2, E2, S2 > >::MulNon SimTK::operator* (const Row< N1, E1, S1 > &r1, const Row< N2, E2, S2 > &r2)
 
template<int M, int N, class ME , int CS, int RS, int MM, class E , int S>
Mat< M, N, ME, CS, RS >::template Result< Vec< MM, E, S > >::MulNon SimTK::operator* (const Mat< M, N, ME, CS, RS > &m, const Vec< MM, E, S > &v)
 
template<int M, int N, class ME , int CS, int RS, int NN, class E , int S>
Mat< M, N, ME, CS, RS >::template Result< Row< NN, E, S > >::MulNon SimTK::operator* (const Mat< M, N, ME, CS, RS > &m, const Row< NN, E, S > &r)
 
template<int M, int N, class ME , int CS, int RS, int Dim, class E , int S>
Mat< M, N, ME, CS, RS >::template Result< SymMat< Dim, E, S > >::MulNon SimTK::operator* (const Mat< M, N, ME, CS, RS > &m, const SymMat< Dim, E, S > &sy)
 
template<class E1 , int S1, class E2 , int S2>
Vec< 3, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::cross (const Vec< 3, E1, S1 > &a, const Vec< 3, E2, S2 > &b)
 
template<class E1 , int S1, class E2 , int S2>
Vec< 3, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::operator% (const Vec< 3, E1, S1 > &a, const Vec< 3, E2, S2 > &b)
 
template<class E1 , int S1, class E2 , int S2>
Row< 3, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::cross (const Vec< 3, E1, S1 > &a, const Row< 3, E2, S2 > &b)
 
template<class E1 , int S1, class E2 , int S2>
Row< 3, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::operator% (const Vec< 3, E1, S1 > &a, const Row< 3, E2, S2 > &b)
 
template<class E1 , int S1, class E2 , int S2>
Row< 3, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::cross (const Row< 3, E1, S1 > &a, const Vec< 3, E2, S2 > &b)
 
template<class E1 , int S1, class E2 , int S2>
Row< 3, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::operator% (const Row< 3, E1, S1 > &a, const Vec< 3, E2, S2 > &b)
 
template<class E1 , int S1, class E2 , int S2>
Row< 3, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::cross (const Row< 3, E1, S1 > &a, const Row< 3, E2, S2 > &b)
 
template<class E1 , int S1, class E2 , int S2>
Row< 3, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::operator% (const Row< 3, E1, S1 > &a, const Row< 3, E2, S2 > &b)
 
template<class E1 , int S1, int N, class E2 , int CS, int RS>
Mat< 3, N, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::cross (const Vec< 3, E1, S1 > &v, const Mat< 3, N, E2, CS, RS > &m)
 
template<class E1 , int S1, int N, class E2 , int CS, int RS>
Mat< 3, N, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::operator% (const Vec< 3, E1, S1 > &v, const Mat< 3, N, E2, CS, RS > &m)
 
template<class E1 , int S1, int N, class E2 , int S2, int S3>
Row< N, Vec< 3, typename CNT< E1 >::template Result< E2 >::Mul > > SimTK::cross (const Vec< 3, E1, S1 > &v, const Row< N, Vec< 3, E2, S2 >, S3 > &m)
 
template<class E1 , int S1, class E2 , int S2, int S3>
Row< 3, Vec< 3, typename CNT< E1 >::template Result< E2 >::Mul > > SimTK::cross (const Vec< 3, E1, S1 > &v, const Row< 3, Vec< 3, E2, S2 >, S3 > &m)
 
template<class E1 , int S1, int N, class E2 , int S2, int S3>
Row< N, Vec< 3, typename CNT< E1 >::template Result< E2 >::Mul > > SimTK::operator% (const Vec< 3, E1, S1 > &v, const Row< N, Vec< 3, E2, S2 >, S3 > &m)
 
template<class E1 , int S1, class E2 , int S2, int S3>
Row< 3, Vec< 3, typename CNT< E1 >::template Result< E2 >::Mul > > SimTK::operator% (const Vec< 3, E1, S1 > &v, const Row< 3, Vec< 3, E2, S2 >, S3 > &m)
 
template<class EV , int SV, class EM , int RS>
Mat< 3, 3, typename CNT< EV >::template Result< EM >::Mul > SimTK::cross (const Vec< 3, EV, SV > &v, const SymMat< 3, EM, RS > &s)
 
template<class EV , int SV, class EM , int RS>
Mat< 3, 3, typename CNT< EV >::template Result< EM >::Mul > SimTK::operator% (const Vec< 3, EV, SV > &v, const SymMat< 3, EM, RS > &s)
 
template<class E1 , int S1, int N, class E2 , int CS, int RS>
Mat< 3, N, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::cross (const Row< 3, E1, S1 > &r, const Mat< 3, N, E2, CS, RS > &m)
 
template<class E1 , int S1, int N, class E2 , int CS, int RS>
Mat< 3, N, typename CNT< E1 >::template Result< E2 >::Mul > SimTK::operator% (const Row< 3, E1, S1 > &r, const Mat< 3, N, E2, CS, RS > &m)
 
template<class EV , int SV, class EM , int RS>
Mat< 3, 3, typename CNT< EV >::template Result< EM >::Mul > SimTK::cross (const Row< 3, EV, SV > &r, const SymMat< 3, EM, RS > &s)
 
template<class EV , int SV, class EM , int RS>
Mat< 3, 3, typename CNT< EV >::template Result< EM >::Mul > SimTK::operator% (const Row< 3, EV, SV > &r, const SymMat< 3, EM, RS > &s)
 
template<int M, class EM , int CS, int RS, class EV , int S>
Mat< M, 3, typename CNT< EM >::template Result< EV >::Mul > SimTK::cross (const Mat< M, 3, EM, CS, RS > &m, const Vec< 3, EV, S > &v)
 
template<int M, class EM , int CS, int RS, class EV , int S>
Mat< M, 3, typename CNT< EM >::template Result< EV >::Mul > SimTK::operator% (const Mat< M, 3, EM, CS, RS > &m, const Vec< 3, EV, S > &v)
 
template<class EM , int RS, class EV , int SV>
Mat< 3, 3, typename CNT< EM >::template Result< EV >::Mul > SimTK::cross (const SymMat< 3, EM, RS > &s, const Vec< 3, EV, SV > &v)
 
template<class EM , int RS, class EV , int SV>
Mat< 3, 3, typename CNT< EM >::template Result< EV >::Mul > SimTK::operator% (const SymMat< 3, EM, RS > &s, const Vec< 3, EV, SV > &v)
 
template<int M, class EM , int CS, int RS, class ER , int S>
Mat< M, 3, typename CNT< EM >::template Result< ER >::Mul > SimTK::cross (const Mat< M, 3, EM, CS, RS > &m, const Row< 3, ER, S > &r)
 
template<int M, class EM , int CS, int RS, class ER , int S>
Mat< M, 3, typename CNT< EM >::template Result< ER >::Mul > SimTK::operator% (const Mat< M, 3, EM, CS, RS > &m, const Row< 3, ER, S > &r)
 
template<class EM , int RS, class EV , int SV>
Mat< 3, 3, typename CNT< EM >::template Result< EV >::Mul > SimTK::cross (const SymMat< 3, EM, RS > &s, const Row< 3, EV, SV > &r)
 
template<class EM , int RS, class EV , int SV>
Mat< 3, 3, typename CNT< EM >::template Result< EV >::Mul > SimTK::operator% (const SymMat< 3, EM, RS > &s, const Row< 3, EV, SV > &r)
 
template<class E1 , int S1, class E2 , int S2>
CNT< E1 >::template Result< E2 >::Mul SimTK::cross (const Vec< 2, E1, S1 > &a, const Vec< 2, E2, S2 > &b)
 
template<class E1 , int S1, class E2 , int S2>
CNT< E1 >::template Result< E2 >::Mul SimTK::operator% (const Vec< 2, E1, S1 > &a, const Vec< 2, E2, S2 > &b)
 
template<class E1 , int S1, class E2 , int S2>
CNT< E1 >::template Result< E2 >::Mul SimTK::cross (const Row< 2, E1, S1 > &a, const Vec< 2, E2, S2 > &b)
 
template<class E1 , int S1, class E2 , int S2>
CNT< E1 >::template Result< E2 >::Mul SimTK::operator% (const Row< 2, E1, S1 > &a, const Vec< 2, E2, S2 > &b)
 
template<class E1 , int S1, class E2 , int S2>
CNT< E1 >::template Result< E2 >::Mul SimTK::cross (const Vec< 2, E1, S1 > &a, const Row< 2, E2, S2 > &b)
 
template<class E1 , int S1, class E2 , int S2>
CNT< E1 >::template Result< E2 >::Mul SimTK::operator% (const Vec< 2, E1, S1 > &a, const Row< 2, E2, S2 > &b)
 
template<class E1 , int S1, class E2 , int S2>
CNT< E1 >::template Result< E2 >::Mul SimTK::cross (const Row< 2, E1, S1 > &a, const Row< 2, E2, S2 > &b)
 
template<class E1 , int S1, class E2 , int S2>
CNT< E1 >::template Result< E2 >::Mul SimTK::operator% (const Row< 2, E1, S1 > &a, const Row< 2, E2, S2 > &b)
 
template<class E , int S>
Mat< 3, 3, E > SimTK::crossMat (const Vec< 3, E, S > &v)
 Calculate matrix M(v) such that M(v)*w = v % w. More...
 
template<class E , int S>
Mat< 3, 3, E > SimTK::crossMat (const Vec< 3, negator< E >, S > &v)
 Specialize crossMat() for negated scalar types. More...
 
template<class E , int S>
Mat< 3, 3, E > SimTK::crossMat (const Row< 3, E, S > &r)
 Form cross product matrix from a Row vector; 3 flops. More...
 
template<class E , int S>
Mat< 3, 3, E > SimTK::crossMat (const Row< 3, negator< E >, S > &r)
 Form cross product matrix from a Row vector whose elements are negated scalars; 3 flops. More...
 
template<class E , int S>
Row< 2, E > SimTK::crossMat (const Vec< 2, E, S > &v)
 Calculate 2D cross product matrix M(v) such that M(v)*w = v0*w1-v1*w0 = v % w (a scalar). More...
 
template<class E , int S>
Row< 2, E > SimTK::crossMat (const Vec< 2, negator< E >, S > &v)
 Specialize 2D cross product matrix for negated scalar types; 1 flop. More...
 
template<class E , int S>
Row< 2, E > SimTK::crossMat (const Row< 2, E, S > &r)
 Form 2D cross product matrix from a Row<2>; 1 flop. More...
 
template<class E , int S>
Row< 2, E > SimTK::crossMat (const Row< 2, negator< E >, S > &r)
 Form 2D cross product matrix from a Row<2> with negated scalar elements; 1 flop. More...
 
template<class E , int S>
SymMat< 3, E > SimTK::crossMatSq (const Vec< 3, E, S > &v)
 Calculate matrix S(v) such that S(v)*w = -v % (v % w) = (v % w) % v. More...
 
template<class E , int S>
SymMat< 3, E > SimTK::crossMatSq (const Vec< 3, negator< E >, S > &v)
 
template<class E , int S>
SymMat< 3, E > SimTK::crossMatSq (const Row< 3, E, S > &r)
 
template<class E , int S>
SymMat< 3, E > SimTK::crossMatSq (const Row< 3, negator< E >, S > &r)
 
template<class E , int CS, int RS>
SimTK::det (const Mat< 1, 1, E, CS, RS > &m)
 Special case Mat 1x1 determinant. No computation. More...
 
template<class E , int RS>
SimTK::det (const SymMat< 1, E, RS > &s)
 Special case SymMat 1x1 determinant. No computation. More...
 
template<class E , int CS, int RS>
SimTK::det (const Mat< 2, 2, E, CS, RS > &m)
 Special case Mat 2x2 determinant. 3 flops (if elements are Real). More...
 
template<class E , int RS>
SimTK::det (const SymMat< 2, E, RS > &s)
 Special case 2x2 SymMat determinant. 3 flops (if elements are Real). More...
 
template<class E , int CS, int RS>
SimTK::det (const Mat< 3, 3, E, CS, RS > &m)
 Special case Mat 3x3 determinant. 14 flops (if elements are Real). More...
 
template<class E , int RS>
SimTK::det (const SymMat< 3, E, RS > &s)
 Special case SymMat 3x3 determinant. 14 flops (if elements are Real). More...
 
template<int M, class E , int CS, int RS>
SimTK::det (const Mat< M, M, E, CS, RS > &m)
 Calculate the determinant of a square matrix larger than 3x3 by recursive template expansion. More...
 
template<int M, class E , int RS>
SimTK::det (const SymMat< M, E, RS > &s)
 Determinant of SymMat larger than 3x3. More...
 
template<class E , int CS, int RS>
Mat< 1, 1, E, CS, RS >::TInvert SimTK::lapackInverse (const Mat< 1, 1, E, CS, RS > &m)
 Specialized 1x1 lapackInverse(): costs one divide. More...
 
template<int M, class E , int CS, int RS>
Mat< M, M, E, CS, RS >::TInvert SimTK::lapackInverse (const Mat< M, M, E, CS, RS > &m)
 General inverse of small, fixed-size, square (mXm), non-singular matrix with scalar elements: use Lapack's LU routine with pivoting. More...
 
template<class E , int CS, int RS>
Mat< 1, 1, E, CS, RS >::TInvert SimTK::inverse (const Mat< 1, 1, E, CS, RS > &m)
 Specialized 1x1 Mat inverse: costs one divide. More...
 
template<class E , int RS>
SymMat< 1, E, RS >::TInvert SimTK::inverse (const SymMat< 1, E, RS > &s)
 Specialized 1x1 SymMat inverse: costs one divide. More...
 
template<class E , int CS, int RS>
Mat< 2, 2, E, CS, RS >::TInvert SimTK::inverse (const Mat< 2, 2, E, CS, RS > &m)
 Specialized 2x2 Mat inverse: costs one divide plus 9 flops. More...
 
template<class E , int RS>
SymMat< 2, E, RS >::TInvert SimTK::inverse (const SymMat< 2, E, RS > &s)
 Specialized 2x2 SymMat inverse: costs one divide plus 7 flops. More...
 
template<class E , int CS, int RS>
Mat< 3, 3, E, CS, RS >::TInvert SimTK::inverse (const Mat< 3, 3, E, CS, RS > &m)
 Specialized 3x3 inverse: costs one divide plus 41 flops (for real-valued matrices). More...
 
template<class E , int RS>
SymMat< 3, E, RS >::TInvert SimTK::inverse (const SymMat< 3, E, RS > &s)
 Specialized 3x3 inverse for symmetric or Hermitian: costs one divide plus 29 flops (for real-valued matrices). More...
 
template<int M, class E , int CS, int RS>
Mat< M, M, E, CS, RS >::TInvert SimTK::inverse (const Mat< M, M, E, CS, RS > &m)
 For any matrix larger than 3x3, we just punt to the Lapack implementation. More...
 

Detailed Description

This file defines global functions and class members which use a mix of Vec, Row, and Mat types and hence need to wait until everything is defined.

Some of them may depend on Lapack also.