#include <sofa/defaulttype/Vec.h>#include <assert.h>#include <sofa/helper/static_assert.h>


Go to the source code of this file.
Data Structures | |
| class | sofa::defaulttype::Mat< L, C, real > |
| class | sofa::defaulttype::MatNoInit< L, C, real > |
| Same as Mat except the values are not initialized by default. More... | |
Namespaces | |
| namespace | sofa |
| Main SOFA namespace. | |
| namespace | sofa::defaulttype |
| Default data types for the most common cases (1D/2D/3D vectors, rigid frames). | |
Typedefs | |
| typedef Mat< 2, 2, float > | sofa::defaulttype::Mat2x2f |
| typedef Mat< 2, 2, double > | sofa::defaulttype::Mat2x2d |
| typedef Mat< 3, 3, float > | sofa::defaulttype::Mat3x3f |
| typedef Mat< 3, 3, double > | sofa::defaulttype::Mat3x3d |
| typedef Mat< 3, 4, float > | sofa::defaulttype::Mat3x4f |
| typedef Mat< 3, 4, double > | sofa::defaulttype::Mat3x4d |
| typedef Mat< 4, 4, float > | sofa::defaulttype::Mat4x4f |
| typedef Mat< 4, 4, double > | sofa::defaulttype::Mat4x4d |
| typedef Mat2x2d | sofa::defaulttype::Matrix2 |
| typedef Mat3x3d | sofa::defaulttype::Matrix3 |
| typedef Mat4x4d | sofa::defaulttype::Matrix4 |
Functions | |
| template<class real > | |
| real | sofa::defaulttype::determinant (const Mat< 3, 3, real > &m) |
| Determinant of a 3x3 matrix. | |
| template<class real > | |
| real | sofa::defaulttype::determinant (const Mat< 2, 2, real > &m) |
| Determinant of a 2x2 matrix. | |
| template<int S, class real > | |
| bool | sofa::defaulttype::invertMatrix (Mat< S, S, real > &dest, const Mat< S, S, real > &from) |
| Matrix inversion (general case). | |
| template<class real > | |
| bool | sofa::defaulttype::invertMatrix (Mat< 3, 3, real > &dest, const Mat< 3, 3, real > &from) |
| Matrix inversion (special case 3x3). | |
| template<class real > | |
| bool | sofa::defaulttype::invertMatrix (Mat< 2, 2, real > &dest, const Mat< 2, 2, real > &from) |
| Matrix inversion (special case 2x2). | |
| template<int L, int C, typename real > | |
| std::ostream & | sofa::defaulttype::operator<< (std::ostream &o, const Mat< L, C, real > &m) |
| template<int L, int C, typename real > | |
| std::istream & | sofa::defaulttype::operator>> (std::istream &in, sofa::defaulttype::Mat< L, C, real > &m) |
| template<class T1 , class T2 > | |
| const T1 | sofa::defaulttype::S_MAX (const T1 &a, const T2 &b) |
| return the max of two values | |
| template<class T1 , class T2 > | |
| const T1 | sofa::defaulttype::S_MIN (const T1 &a, const T2 &b) |
| return the min of two values | |
| template<class T1 , class T2 > | |
| const T1 | sofa::defaulttype::S_SIGN (const T1 &a, const T2 &b) |
| template<class T > | |
| const T | sofa::defaulttype::S_SQR (const T a) |
| template<class T1 , class T2 > | |
| T1 | sofa::defaulttype::pythag (const T1 a, const T2 b) |
| Computes sqrt(aČ + bČ) without destructive underflow or overflow. | |
| template<int m, int n, typename Real > | |
| void | sofa::defaulttype::svddcmp (Mat< m, n, Real > &a, Vec< n, Real > &w, Mat< n, m, Real > &v) |
| Compute the SVD decomposition of matrix a (from nr). a is replaced by its pivoted LU decomposition. indx stores pivoting indices. | |
| template<int m, int n, typename Real > | |
| Real | sofa::defaulttype::cond (Mat< m, n, Real > &a) |
| return the condition number of the matrix a following the euclidian norm (using the svd decomposition to find singular values) | |
| template<int n, typename Real > | |
| void | sofa::defaulttype::ludcmp (Mat< n, n, Real > &a, Vec< n, int > &indx) |
| Compute the LU decomposition of matrix a. a is replaced by its pivoted LU decomposition. indx stores pivoting indices. | |
| template<int n, typename Real > | |
| void | sofa::defaulttype::lubksb (const Mat< n, n, Real > &a, const Vec< n, int > &indx, Vec< n, Real > &b) |
| Compute the solution of Mx=b. b is replaced by x. a and indx together represent the LU decomposition of m, as given my method ludcmp. | |
| template<int n, typename Real > | |
| void | sofa::defaulttype::luinv (Mat< n, n, Real > &inv, Mat< n, n, Real > &m) |
| Compute the inverse of matrix m. | |
| template<int L, int C, typename T > | |
| Mat< L, C, T > | sofa::defaulttype::dyad (const Vec< L, T > &u, const Vec< C, T > &v) |
Create a matrix as . | |
| template<int L, int C, typename real > | |
| sofa::defaulttype::Mat< L, C, real > | operator* (real r, const sofa::defaulttype::Mat< L, C, real > &m) |
| Scalar matrix multiplication operator. | |
| sofa::defaulttype::Mat<L,C,real> operator* | ( | real | r, | |
| const sofa::defaulttype::Mat< L, C, real > & | m | |||
| ) | [inline] |
1.5.7.1