|
| constexpr | MatSym () noexcept |
| |
| constexpr | MatSym (NoInit) noexcept |
| |
| template<sofa::Size TD = D, typename = std::enable_if_t<TD == 3>> |
| constexpr | MatSym (const real &v1, const real &v2, const real &v3, const real &v4, const real &v5, const real &v6) |
| | Constructor from 6 elements. More...
|
| |
| constexpr | MatSym (const sofa::Size sizeM, const real &v) |
| | Constructor from an element. More...
|
| |
| template<typename real2 > |
| | MatSym (const MatSym< D, real2 > &m) |
| | Constructor from another matrix. More...
|
| |
| template<typename real2 > |
| void | operator= (const MatSym< D, real2 > &m) |
| | Assignment from another matrix. More...
|
| |
| void | clear () |
| | Sets each element to 0. More...
|
| |
| void | fill (real r) |
| | Sets each element to r. More...
|
| |
| real & | operator() (const int i, const int j) |
| | Write access to element (i,j). More...
|
| |
| const real & | operator() (const int i, const int j) const |
| | Read-only access to element (i,j). More...
|
| |
| template<sofa::Size TD = D, typename = std::enable_if_t<TD == 3 || TD == 2>> |
| Vec< NumberStoredValues, real > | getVoigt () const |
| | convert to Voigt notation (supported only for D == 2 and D == 3) More...
|
| |
| constexpr void | identity () |
| | Set matrix to identity. More...
|
| |
| Mat< D, D, real > | SymSymMultiply (const MatSym< D, real > &m) const |
| | Matrix multiplication operator: product of two symmetric matrices. More...
|
| |
| Mat< D, D, real > | operator* (const MatSym< D, real > &m) const |
| |
| Mat< D, D, real > | SymMatMultiply (const Mat< D, D, real > &m) const |
| |
| Mat< D, D, real > | operator* (const Mat< D, D, real > &m) const |
| |
| Mat< D, D, real > | MatSymMultiply (const Mat< D, D, real > &m) const |
| |
| MatSym< D, real > | operator+ (const MatSym< D, real > &m) const |
| | Matrix addition operator with a symmetric matrix. More...
|
| |
| Mat< D, D, real > | operator+ (const Mat< D, D, real > &m) const |
| | Matrix addition operator with a non-symmetric matrix. More...
|
| |
| MatSym< D, real > | operator- (const MatSym< D, real > &m) const |
| | Matrix substractor operator with a symmetric matrix. More...
|
| |
| Mat< D, D, real > | operator- (const Mat< D, D, real > &m) const |
| | Matrix substractor operator with a non-symmetric matrix. More...
|
| |
| Coord | operator* (const Coord &v) const |
| | Multiplication operator Matrix * Vector. More...
|
| |
| MatSym< D, real > | operator* (real f) const |
| | Scalar multiplication operator. More...
|
| |
| MatSym< D, real > | operator/ (real f) const |
| | Scalar division operator. More...
|
| |
| void | operator*= (real r) |
| | Scalar multiplication assignment operator. More...
|
| |
| void | operator/= (real r) |
| | Scalar division assignment operator. More...
|
| |
| void | operator+= (const MatSym< D, real > &m) |
| | Addition assignment operator. More...
|
| |
| void | operator-= (const MatSym< D, real > &m) |
| | Subtraction assignment operator. More...
|
| |
| bool | invert (const MatSym< D, real > &m) |
| | Invert matrix m. More...
|
| |
|
| bool | operator== (const MatSym< D, real > &b) const |
| |
| bool | operator!= (const MatSym< D, real > &b) const |
| |
| constexpr | VecNoInit () noexcept |
| |
| constexpr | VecNoInit (const Vec< N, SReal > &v) noexcept |
| |
| constexpr | VecNoInit (Vec< N, SReal > &&v) noexcept |
| |
| constexpr | Vec ()=default |
| | Default constructor: sets all values to 0. More...
|
| |
| constexpr | Vec (NoInit) |
| | Fast constructor: no initialization. More...
|
| |
| template<Size NN = N, typename std::enable_if< NN==1, int >::type = 0> |
| constexpr | Vec (const ValueType r1) noexcept |
| | Specific constructor for 1-element vectors. More...
|
| |
| template<typename... ArgsT, typename = std::enable_if_t< (std::is_convertible_v<ArgsT, ValueType> && ...) >, typename = std::enable_if_t< (sizeof...(ArgsT) == N && sizeof...(ArgsT) > 1) >> |
| constexpr | Vec (ArgsT &&... r) noexcept |
| |
| template<typename R , typename T , Size NN = N, typename std::enable_if< NN==6, int >::type = 0> |
| | Vec (const Vec< 3, R > &a, const Vec< 3, T > &b) |
| | Specific constructor for 6-elements vectors, taking two 3-elements vectors. More...
|
| |
| template<Size NN = N, typename std::enable_if< NN==1, int >::type = 0> |
| constexpr void | set (const ValueType r1) noexcept |
| | Specific set function for 1-element vectors. More...
|
| |
| template<typename... ArgsT, typename = std::enable_if_t< (std::is_convertible_v<ArgsT, ValueType> && ...) >, typename = std::enable_if_t< (sizeof...(ArgsT) == N && sizeof...(ArgsT) > 1) >> |
| constexpr void | set (const ArgsT... r) noexcept |
| |
| template<Size N2, class real2 > |
| constexpr void | set (const Vec< N2, real2 > &v, ValueType defaultvalue=0) noexcept |
| | Specific set from a different size vector (given default value and ignored outside entries) More...
|
| |
| template<Size NN = N, typename std::enable_if<(NN >1), int >::type = 0> |
| constexpr | Vec (const Vec< N-1, ValueType > &v, ValueType r1) noexcept |
| | Constructor from an N-1 elements vector and an additional value (added at the end). More...
|
| |
| constexpr | Vec (const sofa::type::fixed_array< ValueType, N > &p) noexcept |
| |
| template<Size N2, typename real2 > |
| constexpr | Vec (const Vec< N2, real2 > &v) noexcept |
| | Constructor from a different size vector (null default value and ignoring outside entries) More...
|
| |
| template<typename real2 > |
| constexpr | Vec (const Vec< N, real2 > &p) noexcept |
| |
| template<typename real2 > |
| constexpr | Vec (const real2 *p) noexcept |
| | Constructor from an array of values. More...
|
| |
| template<Size NN = N, typename std::enable_if<(NN >=1), int >::type = 0> |
| constexpr ValueType & | x () noexcept |
| | Special access to first element. More...
|
| |
| template<Size NN = N, typename std::enable_if<(NN >=2), int >::type = 0> |
| constexpr ValueType & | y () noexcept |
| | Special access to second element. More...
|
| |
| template<Size NN = N, typename std::enable_if<(NN >=3), int >::type = 0> |
| constexpr ValueType & | z () noexcept |
| | Special access to third element. More...
|
| |
| template<Size NN = N, typename std::enable_if<(NN >=4), int >::type = 0> |
| constexpr ValueType & | w () noexcept |
| | Special access to fourth element. More...
|
| |
| template<Size NN = N, typename std::enable_if<(NN >=1), int >::type = 0> |
| constexpr const ValueType & | x () const noexcept |
| | Special const access to first element. More...
|
| |
| template<Size NN = N, typename std::enable_if<(NN >=2), int >::type = 0> |
| constexpr const ValueType & | y () const noexcept |
| | Special const access to second element. More...
|
| |
| template<Size NN = N, typename std::enable_if<(NN >=3), int >::type = 0> |
| constexpr const ValueType & | z () const noexcept |
| | Special const access to third element. More...
|
| |
| template<Size NN = N, typename std::enable_if<(NN >=4), int >::type = 0> |
| constexpr const ValueType & | w () const noexcept |
| | Special const access to fourth element. More...
|
| |
| template<Size NN = N, typename std::enable_if< NN==1, int >::type = 0> |
| constexpr void | operator= (const ValueType r1) noexcept |
| | Specific Assignment operator for 1-element vectors. More...
|
| |
| template<typename real2 > |
| constexpr void | operator= (const real2 *p) noexcept |
| | Assignment operator from an array of values. More...
|
| |
| template<Size M, typename real2 > |
| constexpr void | operator= (const Vec< M, real2 > &v) noexcept |
| | Assignment from a vector with different dimensions. More...
|
| |
| constexpr void | assign (const ValueType &value) noexcept |
| |
| constexpr void | clear () noexcept |
| | Sets every element to 0. More...
|
| |
| constexpr void | fill (ValueType r) noexcept |
| | Sets every element to r. More...
|
| |
| constexpr ValueType & | operator() (Size i) noexcept |
| | Access to i-th element. More...
|
| |
| constexpr const ValueType & | operator() (Size i) const noexcept |
| | Const access to i-th element. More...
|
| |
| constexpr const ValueType * | ptr () const noexcept |
| | Cast into a const array of values. More...
|
| |
| constexpr ValueType * | ptr () noexcept |
| | Cast into an array of values. More...
|
| |
| template<Size N2, std::enable_if_t<(N2< N), bool > = true> |
| constexpr void | getsub (const Size i, Vec< N2, ValueType > &m) const noexcept |
| |
| constexpr void | getsub (const Size i, ValueType &m) const noexcept |
| |
| constexpr Vec< N, ValueType > | mulscalar (const ValueType f) const noexcept |
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr Vec< N, ValueType > | mulscalar (const real2 f) const noexcept |
| | Multiplication by a scalar f. More...
|
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr Vec< N, ValueType > | operator* (const real2 f) const noexcept |
| |
| constexpr void | eqmulscalar (const ValueType f) noexcept |
| | In-place multiplication by a scalar f. More...
|
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr void | eqmulscalar (const real2 f) noexcept |
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr void | operator*= (const real2 f) noexcept |
| |
| constexpr Vec< N, ValueType > | divscalar (const ValueType f) const noexcept |
| | Division by a scalar f. More...
|
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr Vec< N, ValueType > | divscalar (const real2 f) const noexcept |
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr Vec< N, ValueType > | operator/ (const real2 f) const noexcept |
| |
| constexpr void | eqdivscalar (const ValueType f) noexcept |
| | In-place division by a scalar f. More...
|
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr void | eqdivscalar (const real2 f) noexcept |
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr void | operator/= (const real2 f) noexcept |
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr ValueType | operator* (const Vec< N, real2 > &v) const noexcept |
| | Dot product. More...
|
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr Vec< N, ValueType > | linearProduct (const Vec< N, real2 > &v) const noexcept |
| | linear product. More...
|
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr Vec< N, ValueType > | linearDivision (const Vec< N, real2 > &v) const noexcept |
| | linear division. More...
|
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr Vec< N, ValueType > | operator+ (const Vec< N, real2 > &v) const noexcept |
| | Vector addition. More...
|
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr void | operator+= (const Vec< N, real2 > &v) noexcept |
| | In-place vector addition. More...
|
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr Vec< N, ValueType > | operator- (const Vec< N, real2 > &v) const noexcept |
| | Vector subtraction. More...
|
| |
| template<class real2 , std::enable_if_t< std::is_convertible_v< real2, ValueType >, bool > = true> |
| constexpr void | operator-= (const Vec< N, real2 > &v) noexcept |
| | In-place vector subtraction. More...
|
| |
| template<typename T = ValueType, std::enable_if_t< !std::is_unsigned_v< T >, int > = 0> |
| constexpr Vec< N, ValueType > | operator- () const noexcept |
| | Vector negation. More...
|
| |
| constexpr ValueType | norm2 () const noexcept |
| | Squared norm. More...
|
| |
| ValueType | norm () const noexcept |
| | Euclidean norm. More...
|
| |
| ValueType | lNorm (int l) const |
| |
| constexpr bool | normalizeWithNorm (ValueType norm, ValueType threshold=std::numeric_limits< ValueType >::epsilon()) noexcept |
| |
| bool | normalize (ValueType threshold=std::numeric_limits< ValueType >::epsilon()) noexcept |
| |
| void | normalize (Vec< N, ValueType > failsafe, ValueType threshold=std::numeric_limits< ValueType >::epsilon()) noexcept |
| |
| Vec< N, ValueType > | normalized () const noexcept |
| |
| bool | isNormalized (ValueType threshold=std::numeric_limits< ValueType >::epsilon() *(ValueType) 10) const |
| | return true if norm()==1 More...
|
| |
| template<typename R , Size NN = N, typename std::enable_if<(NN==3), int >::type = 0> |
| constexpr Vec | cross (const Vec< 3, R > &b) const noexcept |
| |
| constexpr ValueType | sum () const noexcept |
| | sum of all elements of the vector More...
|
| |
| constexpr bool | operator== (const Vec &b) const noexcept |
| |
| constexpr bool | operator!= (const Vec &b) const noexcept |
| |
| constexpr reference | operator[] (size_type i) |
| |
| constexpr const_reference | operator[] (size_type i) const |
| |
| template<std::size_t I> |
| constexpr reference | get () &noexcept requires(I< N) |
| |
| template<std::size_t I> |
| constexpr const_reference | get () const &noexcept requires(I< N) |
| |
| template<std::size_t I> |
| constexpr ValueType && | get () &&noexcept requires(I< N) |
| |
| template<std::size_t I> |
| constexpr const ValueType && | get () const &&noexcept requires(I< N) |
| |
| constexpr const ValueType * | data () const noexcept |
| |
| constexpr iterator | begin () noexcept |
| |
| constexpr const_iterator | begin () const noexcept |
| |
| constexpr iterator | end () noexcept |
| |
| constexpr const_iterator | end () const noexcept |
| |
| constexpr reference | front () |
| |
| constexpr const_reference | front () const |
| |
| constexpr reference | back () |
| |
| constexpr const_reference | back () const |
| |