|
constexpr | Mat () noexcept=default |
|
constexpr | Mat (NoInit) noexcept |
|
template<sofa::Size TL = L, sofa::Size TC = C, typename = std::enable_if_t<(TL == 1 && TC != 1) || (TC == 1 && TL != 1)>> |
constexpr | Mat (std::initializer_list< Real > &&scalars) noexcept |
|
constexpr | Mat (std::initializer_list< std::initializer_list< Real >> &&rows) noexcept |
|
template<typename... ArgsT, typename = std::enable_if_t< (std::is_convertible_v<ArgsT, Line> && ...) >, typename = std::enable_if_t< (sizeof...(ArgsT) == L && sizeof...(ArgsT) > 1) >> |
constexpr | Mat (ArgsT &&... r) noexcept |
|
constexpr | Mat (const real &v) noexcept |
| Constructor from an element. More...
|
|
template<typename real2 > |
constexpr | Mat (const Mat< L, C, real2 > &m) noexcept |
| Constructor from another matrix. More...
|
|
template<Size L2, Size C2, typename real2 > |
constexpr | Mat (const Mat< L2, C2, real2 > &m) noexcept |
| Constructor from another matrix with different size (with null default entries and ignoring outside entries) More...
|
|
template<typename real2 > |
constexpr | Mat (const real2 *p) noexcept |
| Constructor from an array of elements (stored per line). More...
|
|
constexpr Size | getNbLines () const |
| number of lines More...
|
|
constexpr Size | getNbCols () const |
| number of columns More...
|
|
constexpr void | operator= (const real *p) noexcept |
| Assignment from an array of elements (stored per line). More...
|
|
template<typename real2 > |
constexpr void | operator= (const Mat< L, C, real2 > &m) noexcept |
| Assignment from another matrix. More...
|
|
template<Size L2, Size C2> |
constexpr void | operator= (const Mat< L2, C2, real > &m) noexcept |
| Assignment from a matrix of different size. More...
|
|
template<Size L2, Size C2> |
constexpr void | getsub (Size L0, Size C0, Mat< L2, C2, real > &m) const noexcept |
|
template<Size C2> |
constexpr void | getsub (const Size L0, const Size C0, Vec< C2, real > &m) const noexcept |
|
constexpr void | getsub (Size L0, Size C0, real &m) const noexcept |
|
template<Size L2, Size C2> |
constexpr void | setsub (Size L0, Size C0, const Mat< L2, C2, real > &m) noexcept |
|
template<Size L2> |
constexpr void | setsub (Size L0, Size C0, const Vec< L2, real > &v) noexcept |
|
constexpr void | clear () noexcept |
| Sets each element to 0. More...
|
|
constexpr void | fill (real r) noexcept |
| Sets each element to r. More...
|
|
constexpr const Line & | line (Size i) const noexcept |
| Read-only access to line i. More...
|
|
constexpr Col | col (Size j) const noexcept |
| Copy of column j. More...
|
|
constexpr LineNoInit & | operator[] (Size i) noexcept |
| Write access to line i. More...
|
|
constexpr const LineNoInit & | operator[] (Size i) const noexcept |
| Read-only access to line i. More...
|
|
constexpr LineNoInit & | operator() (Size i) noexcept |
| Write access to line i. More...
|
|
constexpr const LineNoInit & | operator() (Size i) const noexcept |
| Read-only access to line i. More...
|
|
constexpr real & | operator() (Size i, Size j) noexcept |
| Write access to element (i,j). More...
|
|
constexpr const real & | operator() (Size i, Size j) const noexcept |
| Read-only access to element (i,j). More...
|
|
constexpr const Line * | lptr () const noexcept |
| Cast into a standard C array of lines (read-only). More...
|
|
constexpr Line * | lptr () noexcept |
| Cast into a standard C array of lines. More...
|
|
constexpr const real * | ptr () const noexcept |
| Cast into a standard C array of elements (stored per line) (read-only). More...
|
|
constexpr real * | ptr () noexcept |
| Cast into a standard C array of elements (stored per line). More...
|
|
template<sofa::Size NbLine = L, typename = std::enable_if_t<NbLine >= 1> |
constexpr Line & | x () noexcept |
| Special access to first line. More...
|
|
template<sofa::Size NbLine = L, typename = std::enable_if_t<NbLine >= 2> |
constexpr Line & | y () noexcept |
| Special access to second line. More...
|
|
template<sofa::Size NbLine = L, typename = std::enable_if_t<NbLine >= 3> |
constexpr Line & | z () noexcept |
| Special access to third line. More...
|
|
template<sofa::Size NbLine = L, typename = std::enable_if_t<NbLine >= 4> |
constexpr Line & | w () noexcept |
| Special access to fourth line. More...
|
|
template<sofa::Size NbLine = L, typename = std::enable_if_t<NbLine >= 1> |
constexpr const Line & | x () const noexcept |
| Special access to first line (read-only). More...
|
|
template<sofa::Size NbLine = L, typename = std::enable_if_t<NbLine >= 2> |
constexpr const Line & | y () const noexcept |
| Special access to second line (read-only). More...
|
|
template<sofa::Size NbLine = L, typename = std::enable_if_t<NbLine >= 3> |
constexpr const Line & | z () const noexcept |
| Special access to third line (read-only). More...
|
|
template<sofa::Size NbLine = L, typename = std::enable_if_t<NbLine >= 4> |
constexpr const Line & | w () const noexcept |
| Special access to fourth line (read-only). More...
|
|
template<sofa::Size NbLine = L, sofa::Size NbColumn = C, typename = std::enable_if_t<NbLine == 1 && NbColumn == 1>> |
constexpr real | toReal () const |
|
template<sofa::Size NbLine = L, sofa::Size NbColumn = C, typename = std::enable_if_t<NbLine == 1 && NbColumn == 1>> |
constexpr | operator real () const |
|
template<sofa::Size NbLine = L, sofa::Size NbColumn = C, typename = std::enable_if_t<NbLine == NbColumn>> |
constexpr void | identity () noexcept |
| Set matrix to identity. More...
|
|
constexpr void | transpose (const Mat< C, L, real > &m) noexcept |
| Set matrix as the transpose of m. More...
|
|
constexpr Mat< C, L, real > | transposed () const noexcept |
| Return the transpose of m. More...
|
|
template<sofa::Size NbLine = L, sofa::Size NbColumn = C, typename = std::enable_if_t<NbLine == NbColumn>> |
constexpr void | transpose () noexcept |
| Transpose the square matrix. More...
|
|
constexpr Mat< L, C, real > | operator+ (const Mat< L, C, real > &m) const noexcept |
| Matrix addition operator. More...
|
|
constexpr Mat< L, C, real > | operator- (const Mat< L, C, real > &m) const noexcept |
| Matrix subtraction operator. More...
|
|
constexpr Mat< L, C, real > | operator- () const noexcept |
| Matrix negation operator. More...
|
|
constexpr Col | operator* (const Line &v) const noexcept |
| Multiplication operator Matrix * Line. More...
|
|
constexpr Mat< L, C, real > | multDiagonal (const Line &d) const noexcept |
| Multiplication with a diagonal Matrix CxC represented as a vector of size C. More...
|
|
constexpr Line | multTranspose (const Col &v) const noexcept |
| Multiplication of the transposed Matrix * Column. More...
|
|
template<Size P> |
constexpr Mat< C, P, real > | multTranspose (const Mat< L, P, real > &m) const noexcept |
|
template<Size P> |
constexpr Mat< L, P, real > | multTransposed (const Mat< P, C, real > &m) const noexcept |
| Multiplication with the transposed of the given matrix operator. More...
|
|
constexpr Mat< L, C, real > | plusTransposed (const Mat< C, L, real > &m) const noexcept |
| Addition with the transposed of the given matrix operator. More...
|
|
constexpr Mat< L, C, real > | minusTransposed (const Mat< C, L, real > &m) const noexcept |
| Subtraction with the transposed of the given matrix operator. More...
|
|
constexpr Mat< L, C, real > | operator* (real f) const noexcept |
| Scalar multiplication operator. More...
|
|
constexpr Mat< L, C, real > | operator/ (real f) const |
| Scalar division operator. More...
|
|
constexpr void | operator*= (real r) noexcept |
| Scalar multiplication assignment operator. More...
|
|
constexpr void | operator/= (real r) |
| Scalar division assignment operator. More...
|
|
constexpr void | operator+= (const Mat< L, C, real > &m) noexcept |
| Addition assignment operator. More...
|
|
constexpr void | addTransposed (const Mat< C, L, real > &m) noexcept |
| Addition of the transposed of m. More...
|
|
constexpr void | subTransposed (const Mat< C, L, real > &m) noexcept |
| Subtraction of the transposed of m. More...
|
|
constexpr void | operator-= (const Mat< L, C, real > &m) noexcept |
| Subtraction assignment operator. More...
|
|
template<sofa::Size NbLine = L, sofa::Size NbColumn = C, typename = std::enable_if_t<NbLine == NbColumn>> |
constexpr Mat< L, C, real > | inverted () const |
| invert this More...
|
|
template<sofa::Size NbLine = L, sofa::Size NbColumn = C, typename = std::enable_if_t<NbLine == NbColumn>> |
constexpr bool | invert (const Mat< L, C, real > &m) |
| Invert square matrix m. More...
|
|
constexpr bool | isTransform () const |
|
constexpr Vec< C-1, real > | transform (const Vec< C-1, real > &v) const noexcept |
| Multiplication operator Matrix * Vector considering the matrix as a transformation. More...
|
|
template<sofa::Size NbLine = L, sofa::Size NbColumn = C, typename = std::enable_if_t<NbLine == NbColumn>> |
constexpr bool | transformInvert (const Mat< L, C, real > &m) |
| Invert transformation matrix m. More...
|
|
template<sofa::Size NbLine = L, sofa::Size NbColumn = C, typename = std::enable_if_t<NbLine == NbColumn>> |
constexpr void | symmetrize () noexcept |
|
constexpr const real * | data () const noexcept |
|
constexpr ArrayLineType::iterator | begin () noexcept |
|
constexpr ArrayLineType::const_iterator | begin () const noexcept |
|
constexpr ArrayLineType::iterator | end () noexcept |
|
constexpr ArrayLineType::const_iterator | end () const noexcept |
|
constexpr reference | front () |
|
constexpr const_reference | front () const |
|
constexpr reference | back () |
|
constexpr const_reference | back () const |
|
|
constexpr bool | operator== (const Mat< L, C, real > &b) const noexcept |
|
constexpr bool | operator!= (const Mat< L, C, real > &b) const noexcept |
|
bool | isSymmetric () const |
|
bool | isDiagonal () const noexcept |
|