SOFA API  ea9ab574
Open source framework for multi-physics simuation
sofa::type Namespace Reference

for std::pair More...

Namespaces

 pairwise
 
 trait
 

Classes

class  BoundingBox
 
class  TBoundingBox
 
class  BoundingBox2D
 bounding rectangle More...
 
class  BoundingBox1D
 bounding interval More...
 
class  DualQuatCoord3
 
class  fixed_array
 
class  Frame
 
class  Vec
 
class  VecNoInit
 Same as Vec except the values are not initialized by default. More...
 
class  Mat
 
class  MatNoInit
 Same as Mat except the values are not initialized by default. More...
 
class  Quat
 
struct  CleanupCheck
 
struct  detect
 
struct  detect< T, Op, void_t< Op< T > > >
 
class  Material
 
class  MatSym
 
class  PrimitiveGroup
 
struct  qNoInit
 
class  QuatNoInit
 Same as Quat except the values are not initialized by default. More...
 
class  Ray
 
class  RGBAColor
 encode a 4 RGBA component color More...
 
class  SpatialVector
 
class  SVector
 Same as type::vector, + delimiters on serialization. More...
 
struct  HasRebindTypedef
 
struct  HasRebindTypedef< T, OtherType, std::void_t< typename T::template rebind_to< OtherType > > >
 
struct  Rebind
 
struct  Rebind< _T, _OtherType, std::enable_if_t< HasRebindTypedef< _T, _OtherType >::value > >
 Specialization for types that do have a nested rebind_to member. In this implementation, Rebind has a public member typedef to. It corresponds to the typedef rebind_to. More...
 
struct  Rebind< _T, _OtherType, std::enable_if_t<!HasRebindTypedef< _T, _OtherType >::value > >
 Specialization for types that do NOT have a nested rebind_to member. In this implementation, Rebind has no public member typedef to. If this implementation is chosen by the compiler (the number of template parameters is probably different from 1), a compilation error occurs. More...
 
struct  Rebind< _T< A >, _OtherType, std::enable_if_t<!HasRebindTypedef< _T< A >, _OtherType >::value > >
 Specialization for types that do NOT have a nested rebind_to member. In this implementation, Rebind has a public member typedef to. More...
 
class  Transform
 
struct  NoInit
 
class  vector_device
 
class  CPUMemoryManager
 
class  vector
 

Typedefs

typedef Vec< 1, floatVec1f
 
typedef Vec< 1, double > Vec1d
 
typedef Vec< 1, int > Vec1i
 
typedef Vec< 1, unsignedVec1u
 
typedef Vec< 1, SReal > Vec1
 
typedef Vec< 2, floatVec2f
 
typedef Vec< 2, double > Vec2d
 
typedef Vec< 2, int > Vec2i
 
typedef Vec< 2, unsignedVec2u
 
typedef Vec< 2, SReal > Vec2
 
typedef Vec< 3, floatVec3f
 
typedef Vec< 3, double > Vec3d
 
typedef Vec< 3, int > Vec3i
 
typedef Vec< 3, unsignedVec3u
 
typedef Vec< 3, SReal > Vec3
 
typedef Vec< 4, floatVec4f
 
typedef Vec< 4, double > Vec4d
 
typedef Vec< 4, int > Vec4i
 
typedef Vec< 4, unsignedVec4u
 
typedef Vec< 4, SReal > Vec4
 
typedef Vec< 6, floatVec6f
 
typedef Vec< 6, double > Vec6d
 
typedef Vec< 6, int > Vec6i
 
typedef Vec< 6, unsignedVec6u
 
typedef Vec< 6, SReal > Vec6
 
typedef Mat< 1, 1, floatMat1x1f
 
typedef Mat< 1, 1, double > Mat1x1d
 
typedef Mat< 2, 2, floatMat2x2f
 
typedef Mat< 2, 2, double > Mat2x2d
 
typedef Mat< 3, 3, floatMat3x3f
 
typedef Mat< 3, 3, double > Mat3x3d
 
typedef Mat< 3, 4, floatMat3x4f
 
typedef Mat< 3, 4, double > Mat3x4d
 
typedef Mat< 4, 4, floatMat4x4f
 
typedef Mat< 4, 4, double > Mat4x4d
 
typedef Mat< 6, 6, floatMat6x6f
 
typedef Mat< 6, 6, double > Mat6x6d
 
typedef Mat< 2, 2, SReal > Mat2x2
 
typedef Mat< 3, 3, SReal > Mat3x3
 
typedef Mat< 4, 4, SReal > Mat4x4
 
typedef Mat< 6, 6, SReal > Mat6x6
 
typedef Mat< 2, 2, SReal > Matrix2
 
typedef Mat< 3, 3, SReal > Matrix3
 
typedef Mat< 4, 4, SReal > Matrix4
 
using Quatd = type::Quat< double >
 
using Quatf = type::Quat< float >
 
using BoundingBox3D = BoundingBox
 
using FixedArray1i = fixed_array< int, 1 >
 
using FixedArray1I = fixed_array< unsigned int, 1 >
 
using FixedArray2i = fixed_array< int, 2 >
 
using FixedArray2I = fixed_array< unsigned int, 2 >
 
using FixedArray3i = fixed_array< int, 3 >
 
using FixedArray3I = fixed_array< unsigned int, 3 >
 
using FixedArray4i = fixed_array< int, 4 >
 
using FixedArray4I = fixed_array< unsigned int, 4 >
 
using FixedArray5i = fixed_array< int, 5 >
 
using FixedArray5I = fixed_array< unsigned int, 5 >
 
using FixedArray6i = fixed_array< int, 6 >
 
using FixedArray6I = fixed_array< unsigned int, 6 >
 
using FixedArray7i = fixed_array< int, 7 >
 
using FixedArray7I = fixed_array< unsigned int, 7 >
 
using FixedArray8i = fixed_array< int, 8 >
 
using FixedArray8I = fixed_array< unsigned int, 8 >
 
using FixedArray1f = fixed_array< float, 1 >
 
using FixedArray1d = fixed_array< double, 1 >
 
using FixedArray2f = fixed_array< float, 2 >
 
using FixedArray2d = fixed_array< double, 2 >
 
using FixedArray3f = fixed_array< float, 3 >
 
using FixedArray3d = fixed_array< double, 3 >
 
using FixedArray4f = fixed_array< float, 4 >
 
using FixedArray4d = fixed_array< double, 4 >
 
using FixedArray5f = fixed_array< float, 5 >
 
using FixedArray5d = fixed_array< double, 5 >
 
using FixedArray6f = fixed_array< float, 6 >
 
using FixedArray6d = fixed_array< double, 6 >
 
using FixedArray7f = fixed_array< float, 7 >
 
using FixedArray7d = fixed_array< double, 7 >
 
using FixedArray8f = fixed_array< float, 8 >
 
using FixedArray8d = fixed_array< double, 8 >
 
template<typename... >
using void_t = void
 
template<typename T >
using isRigid_t = decltype(std::declval< typename T::Coord >().getOrientation())
 
template<typename T >
using isRigidType = detect< T, isRigid_t >
 
template<class T , class A = std::allocator<T>>
using stable_vector = boost::container::stable_vector< T, A >
 
template<class T , class B >
using rebind_to = typename Rebind< T, B >::to
 

Functions

BoundingBox::bbox_t make_neutralBBox ()
 
template<typename... Ts>
constexpr auto make_array (Ts &&... ts) -> fixed_array< std::common_type_t< Ts... >, sizeof...(Ts)>
 
template<typename T , sofa::Size N>
constexpr sofa::type::fixed_array< T, N > makeHomogeneousArray (const T &value)
 Builds a fixed_array in which all elements have the same value. More...
 
template<typename FixedArray >
constexpr FixedArray makeHomogeneousArray (const typename FixedArray::value_type &value)
 Builds a fixed_array in which all elements have the same value. More...
 
template<typename T , sofa::Size N>
constexpr bool operator< (const fixed_array< T, N > &v1, const fixed_array< T, N > &v2) noexcept
 Checks if v1 is lexicographically less than v2. Similar to std::lexicographical_compare. More...
 
template<typename T , sofa::Size N>
constexpr bool operator> (const fixed_array< T, N > &v1, const fixed_array< T, N > &v2) noexcept
 
std::ostream & operator<< (std::ostream &out, const sofa::type::Frame &c)
 
SOFA_TYPE_API void init ()
 Initialize the SofaHelper library. More...
 
SOFA_TYPE_API bool isInitialized ()
 Return true if and only if the SofaHelper library has been initialized. More...
 
SOFA_TYPE_API void cleanup ()
 Clean up the resources used by the SofaHelper library. More...
 
SOFA_TYPE_API bool isCleanedUp ()
 Return true if and only if the SofaHelper library has been cleaned up. More...
 
SOFA_TYPE_API void printUninitializedLibraryWarning (const std::string &library, const std::string &initFunction)
 Print a warning about a library not being initialized (meant for internal use). More...
 
SOFA_TYPE_API void printLibraryNotCleanedUpWarning (const std::string &library, const std::string &cleanupFunction)
 Print a warning about a library not being cleaned up (meant for internal use). More...
 
template<sofa::Size L, sofa::Size C, sofa::Size P, class real >
constexpr Mat< C, P, real > multTranspose (const Mat< L, C, real > &m1, const Mat< L, P, real > &m2) noexcept
 
template<class real >
constexpr real determinant (const Mat< 3, 3, real > &m) noexcept
 Determinant of a 3x3 matrix. More...
 
template<class real >
constexpr real determinant (const Mat< 2, 2, real > &m) noexcept
 Determinant of a 2x2 matrix. More...
 
template<class real >
constexpr real determinant (const Mat< 2, 3, real > &m) noexcept
 
template<class real >
constexpr real determinant (const Mat< 3, 2, real > &m) noexcept
 
template<class real >
real oneNorm (const Mat< 3, 3, real > &A)
 
template<class real >
real infNorm (const Mat< 3, 3, real > &A)
 
template<sofa::Size N, class real >
constexpr real trace (const Mat< N, N, real > &m) noexcept
 trace of a square matrix More...
 
template<sofa::Size N, class real >
constexpr Vec< N, real > diagonal (const Mat< N, N, real > &m)
 diagonal of a square matrix More...
 
template<sofa::Size S, class real >
bool invertMatrix (Mat< S, S, real > &dest, const Mat< S, S, real > &from)
 Matrix inversion (general case). More...
 
template<class real >
constexpr bool invertMatrix (Mat< 3, 3, real > &dest, const Mat< 3, 3, real > &from)
 Matrix inversion (special case 3x3). More...
 
template<class real >
constexpr bool invertMatrix (Mat< 2, 2, real > &dest, const Mat< 2, 2, real > &from)
 Matrix inversion (special case 2x2). More...
 
template<class real >
constexpr bool invertMatrix (Mat< 1, 1, real > &dest, const Mat< 1, 1, real > &from)
 Matrix inversion (special case 1x1). More...
 
template<sofa::Size S, class real >
constexpr bool transformInvertMatrix (Mat< S, S, real > &dest, const Mat< S, S, real > &from)
 Inverse Matrix considering the matrix as a transformation. More...
 
template<sofa::Size L, sofa::Size C, typename real >
std::ostream & operator<< (std::ostream &o, const Mat< L, C, real > &m)
 
template<sofa::Size L, sofa::Size C, typename real >
std::istream & operator>> (std::istream &in, Mat< L, C, real > &m)
 
template<sofa::Size L, sofa::Size C, typename real >
void printMatlab (std::ostream &o, const Mat< L, C, real > &m)
 printing in other software formats More...
 
template<sofa::Size L, sofa::Size C, typename real >
void printMaple (std::ostream &o, const Mat< L, C, real > &m)
 
template<class Tu , class Tv >
constexpr Mat< Tu::size(), Tv::size(), typename Tu::value_type > dyad (const Tu &u, const Tv &v) noexcept
 Create a matrix as $ u v^T $. More...
 
template<sofa::Size L, sofa::Size C, typename real >
constexpr real scalarProduct (const Mat< L, C, real > &left, const Mat< L, C, real > &right) noexcept
 Compute the scalar product of two matrix (sum of product of all terms) More...
 
template<class Real >
constexpr Mat< 3, 3, Real > crossProductMatrix (const Vec< 3, Real > &v) noexcept
 
template<sofa::Size L, class Real >
constexpr Mat< L, L, Real > tensorProduct (const Vec< L, Real > &a, const Vec< L, Real > &b) noexcept
 return a * b^T More...
 
template<sofa::Size L, sofa::Size C, sofa::Size P, class real >
constexpr Mat< L, P, real > operator* (const Mat< L, C, real > &m1, const Mat< C, P, real > &m2) noexcept
 
template<class real >
constexpr Mat< 3, 3, real > operator* (const Mat< 3, 3, real > &m1, const Mat< 3, 3, real > &m2) noexcept
 
template<class real >
constexpr Mat< 3, 3, real > multTranspose (const Mat< 3, 3, real > &m1, const Mat< 3, 3, real > &m2) noexcept
 
template<Size n, class real >
bool cholDcmp (Mat< n, n, real > &L, const Mat< n, n, real > &M)
 
template<Size n, class real >
void cholBksb (Vec< n, real > &x, const Mat< n, n, real > &L, const Vec< n, real > &b)
 
template<Size n, class real >
bool cholSlv (Vec< n, real > &x, const Mat< n, n, real > &M, const Vec< n, real > &b)
 
template<Size n, class real >
bool cholInv (Mat< n, n, real > &Inv, const Mat< n, n, real > &M)
 
template<Size dim, typename real >
bool solveLCP (const Vec< dim, real > &q, const Mat< dim, dim, real > &M, Vec< dim *2, real > &res)
 
template<int n, typename Real >
void 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. More...
 
template<int n, typename Real >
void 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. More...
 
template<int n, typename Real >
void luinv (Mat< n, n, Real > &inv, Mat< n, n, Real > &m)
 
template<class T1 , class T2 >
const T1 S_MAX (const T1 &a, const T2 &b)
 return the max of two values More...
 
template<class T1 , class T2 >
const T1 S_MIN (const T1 &a, const T2 &b)
 return the min of two values More...
 
template<class T1 , class T2 >
const T1 S_SIGN (const T1 &a, const T2 &b)
 
template<class T >
const T S_SQR (const T a)
 
template<class T1 , class T2 >
T1 pythag (const T1 a, const T2 b)
 Computes sqrt(a^2 + b^2) without destructive underflow or overflow. More...
 
template<int m, int n, typename Real >
void 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. More...
 
template<int m, int n, typename Real >
Real cond (Mat< m, n, Real > &a)
 return the condition number of the matrix a following the euclidean norm (using the svd decomposition to find singular values) More...
 
std::ostream & operator<< (std::ostream &out, const Material &m)
 
std::istream & operator>> (std::istream &in, Material &m)
 
template<sofa::Size D, class real >
Mat< D, D, real > operator* (const Mat< D, D, real > &a, const MatSym< D, real > &b)
 
template<class real >
real determinant (const MatSym< 3, real > &m)
 Determinant of a 3x3 matrix. More...
 
template<class real >
real determinant (const MatSym< 2, real > &m)
 Determinant of a 2x2 matrix. More...
 
template<class real >
real trace (const MatSym< 3, real > &m)
 Trace of a 3x3 matrix. More...
 
template<class real >
real trace (const MatSym< 2, real > &m)
 Trace of a 2x2 matrix. More...
 
template<sofa::Size S, class real >
bool invertMatrix (MatSym< S, real > &dest, const MatSym< S, real > &from)
 Matrix inversion (general case). More...
 
template<class real >
bool invertMatrix (MatSym< 3, real > &dest, const MatSym< 3, real > &from)
 Matrix inversion (special case 3x3). More...
 
template<class real >
bool invertMatrix (MatSym< 2, real > &dest, const MatSym< 2, real > &from)
 Matrix inversion (special case 2x2). More...
 
template<sofa::Size D, class real >
std::ostream & operator<< (std::ostream &o, const MatSym< D, real > &m)
 
template<sofa::Size D, class real >
std::istream & operator>> (std::istream &in, MatSym< D, real > &m)
 
template<sofa::Size D, typename real >
real scalarProduct (const MatSym< D, real > &left, const MatSym< D, real > &right)
 Compute the scalar product of two matrix (sum of product of all terms) More...
 
template<sofa::Size D, typename real >
real scalarProduct (const MatSym< D, real > &left, const Mat< D, D, real > &right)
 
template<sofa::Size D, typename real >
real scalarProduct (const Mat< D, D, real > &left, const MatSym< D, real > &right)
 
std::ostream & operator<< (std::ostream &out, const PrimitiveGroup &g)
 
std::istream & operator>> (std::istream &in, PrimitiveGroup &g)
 
template SOFA_TYPE_API std::ostream & operator<< (std::ostream &out, const Quat< double > &v)
 
template SOFA_TYPE_API std::istream & operator>> (std::istream &in, Quat< double > &v)
 
template SOFA_TYPE_API std::ostream & operator<< (std::ostream &out, const Quat< float > &v)
 
template SOFA_TYPE_API std::istream & operator>> (std::istream &in, Quat< float > &v)
 
template<class Real >
SOFA_TYPE_API std::ostream & operator<< (std::ostream &out, const Quat< Real > &v)
 write to an output stream More...
 
template<class Real >
SOFA_TYPE_API std::istream & operator>> (std::istream &in, Quat< Real > &v)
 read from an input stream More...
 
template<class Real >
std::ostream & operator<< (std::ostream &out, const Quat< Real > &v)
 write to an output stream More...
 
template<class Real >
std::istream & operator>> (std::istream &in, Quat< Real > &v)
 read from an input stream More...
 
SOFA_TYPE_API std::istream & operator>> (std::istream &i, RGBAColor &t)
 
SOFA_TYPE_API std::ostream & operator<< (std::ostream &out, const RGBAColor &t)
 Write to an output stream. More...
 
constexpr RGBAColor operator- (const RGBAColor &l, const RGBAColor &r)
 
constexpr RGBAColor operator+ (const RGBAColor &l, const RGBAColor &r)
 
constexpr RGBAColor operator/ (const RGBAColor &l, const float div)
 
template<sofa::Size N, typename Real >
std::istream & operator>> (std::istream &in, Vec< N, Real > &v)
 Read from an input stream. More...
 
template<sofa::Size N, typename Real >
std::ostream & operator<< (std::ostream &out, const Vec< N, Real > &v)
 Write to an output stream. More...
 
template<typename real1 , typename real2 >
constexpr Vec< 3, real1 > cross (const Vec< 3, real1 > &a, const Vec< 3, real2 > &b) noexcept
 Cross product for 3-elements vectors. More...
 
template<typename real1 , typename real2 >
constexpr real1 cross (const type::Vec< 2, real1 > &a, const type::Vec< 2, real2 > &b) noexcept
 Cross product for 2-elements vectors. More...
 
template<sofa::Size N, typename real >
constexpr real dot (const Vec< N, real > &a, const Vec< N, real > &b) noexcept
 Dot product (alias for operator*) More...
 
template<sofa::Size N, typename real >
constexpr Vec< N, real > operator* (const double &a, const Vec< N, real > &V) noexcept
 
template<sofa::Size N, typename real >
constexpr Vec< N, real > operator* (const float &a, const Vec< N, real > &V) noexcept
 
template<typename T , sofa::Size N>
constexpr bool operator< (const Vec< N, T > &v1, const Vec< N, T > &v2) noexcept
 Checks if v1 is lexicographically less than v2. Similar to std::lexicographical_compare. More...
 
void SOFA_TYPE_API vector_access_failure (const void *vec, const std::size_t size, const std::size_t i, const std::type_info &type)
 
template<class T1 , class T2 >
void remove (T1 &v, const T2 &elem)
 
template<class T1 , class T2 >
void removeValue (T1 &v, const T2 &elem)
 
template<class T , class TT >
void removeIndex (std::vector< T, TT > &v, size_t index)
 Remove value at given index, replace it by the value at the last index, other values are not changed. More...
 
SOFA_TYPE_API int getInteger (const std::string &s, std::stringstream &msg, unsigned int &numErrors)
 
SOFA_TYPE_API unsigned int getUnsignedInteger (const std::string &s, std::stringstream &msg, unsigned int &numErrors)
 
linear algebra on standard vectors
template<class V1 , class V2 >
SReal dot (const V1 &vector1, const V2 &vector2)
 Dot product of two vectors. More...
 
template<class V >
SReal norm (const V &v)
 Norm of a vector. More...
 
template<class V1 , class Scalar , class V2 , class V3 >
void axpy (V1 &result, Scalar a, const V2 &x, const V3 &y)
 Vector operation: result = ax + y. More...
 

Variables

template class SOFA_TYPE_API DualQuatCoord3< double >
 
template class SOFA_TYPE_API DualQuatCoord3< float >
 
template class SOFA_TYPE_API fixed_array< float, 2 >
 
template class SOFA_TYPE_API fixed_array< double, 2 >
 
template class SOFA_TYPE_API fixed_array< float, 3 >
 
template class SOFA_TYPE_API fixed_array< double, 3 >
 
template class SOFA_TYPE_API fixed_array< float, 4 >
 
template class SOFA_TYPE_API fixed_array< double, 4 >
 
template class SOFA_TYPE_API fixed_array< float, 5 >
 
template class SOFA_TYPE_API fixed_array< double, 5 >
 
template class SOFA_TYPE_API fixed_array< float, 6 >
 
template class SOFA_TYPE_API fixed_array< double, 6 >
 
template class SOFA_TYPE_API fixed_array< float, 7 >
 
template class SOFA_TYPE_API fixed_array< double, 7 >
 
template class SOFA_TYPE_API Quat< double >
 Explicit instantiation of the quaternions for double precision. More...
 
template class SOFA_TYPE_API Quat< float >
 Explicit instantiation of the quaternions for single precision. More...
 
constexpr qNoInit QNOINIT
 
constexpr RGBAColor g_white {1.0f,1.0f,1.0f,1.0f}
 
constexpr RGBAColor g_black {0.0f,0.0f,0.0f,1.0f}
 
constexpr RGBAColor g_red {1.0f,0.0f,0.0f,1.0f}
 
constexpr RGBAColor g_green {0.0f,1.0f,0.0f,1.0f}
 
constexpr RGBAColor g_blue {0.0f,0.0f,1.0f,1.0f}
 
constexpr RGBAColor g_cyan {0.0f,1.0f,1.0f,1.0f}
 
constexpr RGBAColor g_magenta {1.0f,0.0f,1.0f,1.0f}
 
constexpr RGBAColor g_yellow {1.0f,1.0f,0.0f,1.0f}
 
constexpr RGBAColor g_gray {0.5f,0.5f,0.5f,1.0f}
 
constexpr RGBAColor g_darkgray {0.25f,0.25f,0.25f,1.0f}
 
constexpr RGBAColor g_lightgray {0.75f,0.75f,0.75f,1.0f}
 
template class SOFA_TYPE_API SpatialVector< double >
 
template class SOFA_TYPE_API SpatialVector< float >
 
template<class... >
constexpr auto deny = false
 
template class SOFA_TYPE_API Transform< double >
 
template class SOFA_TYPE_API Transform< float >
 
template class SOFA_TYPE_API Vec< 2, float >
 
template class SOFA_TYPE_API Vec< 2, int >
 
template class SOFA_TYPE_API Vec< 2, double >
 
template class SOFA_TYPE_API Vec< 2, unsigned >
 
template class SOFA_TYPE_API Vec< 3, float >
 
template class SOFA_TYPE_API Vec< 3, int >
 
template class SOFA_TYPE_API Vec< 3, double >
 
template class SOFA_TYPE_API Vec< 3, unsigned >
 
template class SOFA_TYPE_API Vec< 4, float >
 
template class SOFA_TYPE_API Vec< 4, int >
 
template class SOFA_TYPE_API Vec< 4, double >
 
template class SOFA_TYPE_API Vec< 4, unsigned >
 
template class SOFA_TYPE_API Vec< 6, float >
 
template class SOFA_TYPE_API Vec< 6, int >
 
template class SOFA_TYPE_API Vec< 6, double >
 
template class SOFA_TYPE_API Vec< 6, unsigned >
 
constexpr NoInit NOINIT
 

Detailed Description

for std::pair

All integral types are considered as extern templates.

Typedef Documentation

◆ BoundingBox3D

◆ FixedArray1d

using sofa::type::FixedArray1d = typedef fixed_array<double, 1>

◆ FixedArray1f

◆ FixedArray1i

using sofa::type::FixedArray1i = typedef fixed_array<int, 1>

◆ FixedArray1I

◆ FixedArray2d

using sofa::type::FixedArray2d = typedef fixed_array<double, 2>

◆ FixedArray2f

◆ FixedArray2i

using sofa::type::FixedArray2i = typedef fixed_array<int, 2>

◆ FixedArray2I

◆ FixedArray3d

using sofa::type::FixedArray3d = typedef fixed_array<double, 3>

◆ FixedArray3f

◆ FixedArray3i

using sofa::type::FixedArray3i = typedef fixed_array<int, 3>

◆ FixedArray3I

◆ FixedArray4d

using sofa::type::FixedArray4d = typedef fixed_array<double, 4>

◆ FixedArray4f

◆ FixedArray4i

using sofa::type::FixedArray4i = typedef fixed_array<int, 4>

◆ FixedArray4I

◆ FixedArray5d

using sofa::type::FixedArray5d = typedef fixed_array<double, 5>

◆ FixedArray5f

◆ FixedArray5i

using sofa::type::FixedArray5i = typedef fixed_array<int, 5>

◆ FixedArray5I

◆ FixedArray6d

using sofa::type::FixedArray6d = typedef fixed_array<double, 6>

◆ FixedArray6f

◆ FixedArray6i

using sofa::type::FixedArray6i = typedef fixed_array<int, 6>

◆ FixedArray6I

◆ FixedArray7d

using sofa::type::FixedArray7d = typedef fixed_array<double, 7>

◆ FixedArray7f

◆ FixedArray7i

using sofa::type::FixedArray7i = typedef fixed_array<int, 7>

◆ FixedArray7I

◆ FixedArray8d

using sofa::type::FixedArray8d = typedef fixed_array<double, 8>

◆ FixedArray8f

◆ FixedArray8i

using sofa::type::FixedArray8i = typedef fixed_array<int, 8>

◆ FixedArray8I

◆ isRigid_t

template<typename T >
using sofa::type::isRigid_t = typedef decltype(std::declval<typename T::Coord>().getOrientation())

◆ isRigidType

template<typename T >
using sofa::type::isRigidType = typedef detect<T, isRigid_t>

◆ Mat1x1d

typedef Mat<1,1,double> sofa::type::Mat1x1d

◆ Mat1x1f

◆ Mat2x2

typedef Mat<2,2,SReal> sofa::type::Mat2x2

◆ Mat2x2d

typedef Mat<2,2,double> sofa::type::Mat2x2d

◆ Mat2x2f

◆ Mat3x3

typedef Mat<3,3,SReal> sofa::type::Mat3x3

◆ Mat3x3d

typedef Mat<3,3,double> sofa::type::Mat3x3d

◆ Mat3x3f

◆ Mat3x4d

typedef Mat<3,4,double> sofa::type::Mat3x4d

◆ Mat3x4f

◆ Mat4x4

typedef Mat<4,4,SReal> sofa::type::Mat4x4

◆ Mat4x4d

typedef Mat<4,4,double> sofa::type::Mat4x4d

◆ Mat4x4f

◆ Mat6x6

typedef Mat<6,6,SReal> sofa::type::Mat6x6

◆ Mat6x6d

typedef Mat<6, 6, double> sofa::type::Mat6x6d

◆ Mat6x6f

typedef Mat<6, 6, float> sofa::type::Mat6x6f

◆ Matrix2

typedef Mat<2,2,SReal> sofa::type::Matrix2

◆ Matrix3

typedef Mat<3,3,SReal> sofa::type::Matrix3

◆ Matrix4

typedef Mat<4,4,SReal> sofa::type::Matrix4

◆ Quatd

using sofa::type::Quatd = typedef type::Quat<double>

◆ Quatf

◆ rebind_to

template<class T , class B >
using sofa::type::rebind_to = typedef typename Rebind<T, B>::to

Convenient alias to ease usage of Rebind.

Example: 1) sofa::type::rebind_to< sofa::type::vector<int>, float> is of type sofa::type::vector<float>. In this example, sofa::type::vector has a typedef rebind_to that will be used to deduce the type. 2) sofa::type::rebind_to< sofa::type::Quat<float>, double> is of type sofa::type::Quat<double>. In this example, sofa::type::Quat does not have a typdef rebind_to. 3) It makes no sense to use sofa::type::rebind on types having more than one template parameter, such as sofa::type::fixed_array. A compilation error would occur.

◆ stable_vector

template<class T , class A = std::allocator<T>>
using sofa::type::stable_vector = typedef boost::container::stable_vector<T,A>

◆ Vec1

typedef Vec<1,SReal> sofa::type::Vec1

◆ Vec1d

typedef Vec<1,double> sofa::type::Vec1d

◆ Vec1f

◆ Vec1i

typedef Vec<1,int> sofa::type::Vec1i

◆ Vec1u

◆ Vec2

typedef Vec<2,SReal> sofa::type::Vec2

◆ Vec2d

typedef Vec<2,double> sofa::type::Vec2d

◆ Vec2f

◆ Vec2i

typedef Vec<2,int> sofa::type::Vec2i

◆ Vec2u

◆ Vec3

typedef Vec<3,SReal> sofa::type::Vec3

◆ Vec3d

typedef Vec<3,double> sofa::type::Vec3d

◆ Vec3f

◆ Vec3i

typedef Vec<3,int> sofa::type::Vec3i

◆ Vec3u

◆ Vec4

typedef Vec<4,SReal> sofa::type::Vec4

◆ Vec4d

typedef Vec<4,double> sofa::type::Vec4d

◆ Vec4f

◆ Vec4i

typedef Vec<4,int> sofa::type::Vec4i

◆ Vec4u

◆ Vec6

typedef Vec<6,SReal> sofa::type::Vec6

◆ Vec6d

typedef Vec<6,double> sofa::type::Vec6d

◆ Vec6f

◆ Vec6i

typedef Vec<6,int> sofa::type::Vec6i

◆ Vec6u

◆ void_t

template<typename... >
using sofa::type::void_t = typedef void

Function Documentation

◆ axpy()

template<class V1 , class Scalar , class V2 , class V3 >
void sofa::type::axpy ( V1 &  result,
Scalar  a,
const V2 &  x,
const V3 &  y 
)

Vector operation: result = ax + y.

◆ cholBksb()

template<Size n, class real >
void sofa::type::cholBksb ( Vec< n, real > &  x,
const Mat< n, n, real > &  L,
const Vec< n, real > &  b 
)

Cholesky back-substitution: solve the system Mx=b using the triangular matrix L such that M=L.Lt

Precondition
L was computed using the Cholesky decomposition of L

◆ cholDcmp()

template<Size n, class real >
bool sofa::type::cholDcmp ( Mat< n, n, real > &  L,
const Mat< n, n, real > &  M 
)

Cholesky decomposition: compute triangular matrix L such that M=L.Lt

Precondition
M must be symmetric positive definite returns false is the decomposition fails

◆ cholInv()

template<Size n, class real >
bool sofa::type::cholInv ( Mat< n, n, real > &  Inv,
const Mat< n, n, real > &  M 
)

Inversion of a positive symmetric definite (PSD) matrix using a Cholesky decomposition. Returns false if the matrix is not PSD.

◆ cholSlv()

template<Size n, class real >
bool sofa::type::cholSlv ( Vec< n, real > &  x,
const Mat< n, n, real > &  M,
const Vec< n, real > &  b 
)

Cholesky solution: solve the system Mx=b using a Cholesky decomposition.

Precondition
M must be symmetric positive definite Returns false is the decomposition fails. If you have several solutions to perform with the same matrix M and different vectors b, it is more efficient to factor the matrix once and then use back-substitution for each vector.

◆ cleanup()

SOFA_TYPE_API void sofa::type::cleanup ( )

Clean up the resources used by the SofaHelper library.

◆ cond()

template<int m, int n, typename Real >
Real sofa::type::cond ( Mat< m, n, Real > &  a)

return the condition number of the matrix a following the euclidean norm (using the svd decomposition to find singular values)

◆ cross() [1/2]

template<typename real1 , typename real2 >
constexpr real1 sofa::type::cross ( const type::Vec< 2, real1 > &  a,
const type::Vec< 2, real2 > &  b 
)
constexprnoexcept

Cross product for 2-elements vectors.

◆ cross() [2/2]

template<typename real1 , typename real2 >
constexpr Vec<3,real1> sofa::type::cross ( const Vec< 3, real1 > &  a,
const Vec< 3, real2 > &  b 
)
constexprnoexcept

Cross product for 3-elements vectors.

◆ crossProductMatrix()

template<class Real >
constexpr Mat<3, 3, Real> sofa::type::crossProductMatrix ( const Vec< 3, Real > &  v)
constexprnoexcept

skew-symmetric mapping crossProductMatrix(v) * x = v.cross(x)

◆ determinant() [1/6]

template<class real >
constexpr real sofa::type::determinant ( const Mat< 2, 2, real > &  m)
constexprnoexcept

Determinant of a 2x2 matrix.

◆ determinant() [2/6]

template<class real >
constexpr real sofa::type::determinant ( const Mat< 2, 3, real > &  m)
constexprnoexcept

Generalized-determinant of a 2x3 matrix. Mirko Radi, "About a Determinant of Rectangular 2×n Matrix and its Geometric Interpretation"

◆ determinant() [3/6]

template<class real >
constexpr real sofa::type::determinant ( const Mat< 3, 2, real > &  m)
constexprnoexcept

Generalized-determinant of a 3x2 matrix. Mirko Radi, "About a Determinant of Rectangular 2×n Matrix and its Geometric Interpretation"

◆ determinant() [4/6]

template<class real >
constexpr real sofa::type::determinant ( const Mat< 3, 3, real > &  m)
constexprnoexcept

Determinant of a 3x3 matrix.

◆ determinant() [5/6]

template<class real >
real sofa::type::determinant ( const MatSym< 2, real > &  m)
inline

Determinant of a 2x2 matrix.

◆ determinant() [6/6]

template<class real >
real sofa::type::determinant ( const MatSym< 3, real > &  m)
inline

Determinant of a 3x3 matrix.

◆ diagonal()

template<sofa::Size N, class real >
constexpr Vec<N,real> sofa::type::diagonal ( const Mat< N, N, real > &  m)
constexpr

diagonal of a square matrix

◆ dot() [1/2]

template<class V1 , class V2 >
SReal sofa::type::dot ( const V1 &  vector1,
const V2 &  vector2 
)

Dot product of two vectors.

◆ dot() [2/2]

template<sofa::Size N, typename real >
constexpr real sofa::type::dot ( const Vec< N, real > &  a,
const Vec< N, real > &  b 
)
constexprnoexcept

Dot product (alias for operator*)

◆ dyad()

template<class Tu , class Tv >
constexpr Mat<Tu::size(), Tv::size(), typename Tu::value_type> sofa::type::dyad ( const Tu &  u,
const Tv &  v 
)
constexprnoexcept

Create a matrix as $ u v^T $.

◆ getInteger()

SOFA_TYPE_API int sofa::type::getInteger ( const std::string &  s,
std::stringstream &  msg,
unsigned int &  numErrors 
)

Convert the string 's' into an unsigned int. The error are reported in msg & numErrors is incremented.

◆ getUnsignedInteger()

SOFA_TYPE_API unsigned int sofa::type::getUnsignedInteger ( const std::string &  s,
std::stringstream &  msg,
unsigned int &  numErrors 
)

Convert the string 's' into an unsigned int. The error are reported in msg & numErrors is incremented.

◆ infNorm()

template<class real >
real sofa::type::infNorm ( const Mat< 3, 3, real > &  A)

◆ init()

SOFA_TYPE_API void sofa::type::init ( )

Initialize the SofaHelper library.

◆ invertMatrix() [1/7]

template<class real >
constexpr bool sofa::type::invertMatrix ( Mat< 1, 1, real > &  dest,
const Mat< 1, 1, real > &  from 
)
constexpr

Matrix inversion (special case 1x1).

◆ invertMatrix() [2/7]

template<class real >
constexpr bool sofa::type::invertMatrix ( Mat< 2, 2, real > &  dest,
const Mat< 2, 2, real > &  from 
)
constexpr

Matrix inversion (special case 2x2).

◆ invertMatrix() [3/7]

template<class real >
constexpr bool sofa::type::invertMatrix ( Mat< 3, 3, real > &  dest,
const Mat< 3, 3, real > &  from 
)
constexpr

Matrix inversion (special case 3x3).

◆ invertMatrix() [4/7]

template<sofa::Size S, class real >
bool sofa::type::invertMatrix ( Mat< S, S, real > &  dest,
const Mat< S, S, real > &  from 
)

Matrix inversion (general case).

◆ invertMatrix() [5/7]

template<class real >
bool sofa::type::invertMatrix ( MatSym< 2, real > &  dest,
const MatSym< 2, real > &  from 
)

Matrix inversion (special case 2x2).

◆ invertMatrix() [6/7]

template<class real >
bool sofa::type::invertMatrix ( MatSym< 3, real > &  dest,
const MatSym< 3, real > &  from 
)

Matrix inversion (special case 3x3).

◆ invertMatrix() [7/7]

template<sofa::Size S, class real >
bool sofa::type::invertMatrix ( MatSym< S, real > &  dest,
const MatSym< S, real > &  from 
)

Matrix inversion (general case).

◆ isCleanedUp()

SOFA_TYPE_API bool sofa::type::isCleanedUp ( )

Return true if and only if the SofaHelper library has been cleaned up.

◆ isInitialized()

SOFA_TYPE_API bool sofa::type::isInitialized ( )

Return true if and only if the SofaHelper library has been initialized.

◆ lubksb()

template<int n, typename Real >
void sofa::type::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.

◆ ludcmp()

template<int n, typename Real >
void sofa::type::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.

◆ luinv()

template<int n, typename Real >
void sofa::type::luinv ( Mat< n, n, Real > &  inv,
Mat< n, n, Real > &  m 
)

Compute the inverse of matrix m.

Warning
Matrix m is replaced by its LU decomposition.

◆ make_array()

template<typename... Ts>
constexpr auto sofa::type::make_array ( Ts &&...  ts) -> fixed_array<std::common_type_t<Ts...>, sizeof...(Ts)>
constexpr

◆ make_neutralBBox()

BoundingBox::bbox_t sofa::type::make_neutralBBox ( )

◆ makeHomogeneousArray() [1/2]

template<typename T , sofa::Size N>
constexpr sofa::type::fixed_array<T, N> sofa::type::makeHomogeneousArray ( const T &  value)
constexpr

Builds a fixed_array in which all elements have the same value.

◆ makeHomogeneousArray() [2/2]

template<typename FixedArray >
constexpr FixedArray sofa::type::makeHomogeneousArray ( const typename FixedArray::value_type &  value)
constexpr

Builds a fixed_array in which all elements have the same value.

◆ multTranspose() [1/2]

template<class real >
constexpr Mat<3,3,real> sofa::type::multTranspose ( const Mat< 3, 3, real > &  m1,
const Mat< 3, 3, real > &  m2 
)
constexprnoexcept

◆ multTranspose() [2/2]

template<sofa::Size L, sofa::Size C, sofa::Size P, class real >
constexpr Mat< C, P, real > sofa::type::multTranspose ( const Mat< L, C, real > &  m1,
const Mat< L, P, real > &  m2 
)
constexprnoexcept

◆ norm()

template<class V >
SReal sofa::type::norm ( const V &  v)

Norm of a vector.

◆ oneNorm()

template<class real >
real sofa::type::oneNorm ( const Mat< 3, 3, real > &  A)

◆ operator*() [1/5]

template<sofa::Size N, typename real >
constexpr Vec<N,real> sofa::type::operator* ( const double &  a,
const Vec< N, real > &  V 
)
constexprnoexcept

◆ operator*() [2/5]

template<sofa::Size N, typename real >
constexpr Vec<N,real> sofa::type::operator* ( const float a,
const Vec< N, real > &  V 
)
constexprnoexcept

◆ operator*() [3/5]

template<class real >
constexpr Mat<3,3,real> sofa::type::operator* ( const Mat< 3, 3, real > &  m1,
const Mat< 3, 3, real > &  m2 
)
constexprnoexcept

◆ operator*() [4/5]

template<sofa::Size D, class real >
Mat<D, D, real> sofa::type::operator* ( const Mat< D, D, real > &  a,
const MatSym< D, real > &  b 
)

◆ operator*() [5/5]

template<sofa::Size L, sofa::Size C, sofa::Size P, class real >
constexpr Mat<L,P,real> sofa::type::operator* ( const Mat< L, C, real > &  m1,
const Mat< C, P, real > &  m2 
)
constexprnoexcept

◆ operator+()

constexpr RGBAColor sofa::type::operator+ ( const RGBAColor l,
const RGBAColor r 
)
constexpr

◆ operator-()

constexpr RGBAColor sofa::type::operator- ( const RGBAColor l,
const RGBAColor r 
)
constexpr

◆ operator/()

constexpr RGBAColor sofa::type::operator/ ( const RGBAColor l,
const float  div 
)
constexpr

◆ operator<() [1/2]

template<typename T , sofa::Size N>
constexpr bool sofa::type::operator< ( const fixed_array< T, N > &  v1,
const fixed_array< T, N > &  v2 
)
constexprnoexcept

Checks if v1 is lexicographically less than v2. Similar to std::lexicographical_compare.

◆ operator<() [2/2]

template<typename T , sofa::Size N>
constexpr bool sofa::type::operator< ( const Vec< N, T > &  v1,
const Vec< N, T > &  v2 
)
constexprnoexcept

Checks if v1 is lexicographically less than v2. Similar to std::lexicographical_compare.

◆ operator<<() [1/11]

template<sofa::Size L, sofa::Size C, typename real >
std::ostream& sofa::type::operator<< ( std::ostream &  o,
const Mat< L, C, real > &  m 
)

◆ operator<<() [2/11]

template<sofa::Size D, class real >
std::ostream& sofa::type::operator<< ( std::ostream &  o,
const MatSym< D, real > &  m 
)

◆ operator<<() [3/11]

std::ostream& sofa::type::operator<< ( std::ostream &  out,
const Material m 
)

◆ operator<<() [4/11]

std::ostream& sofa::type::operator<< ( std::ostream &  out,
const PrimitiveGroup g 
)

◆ operator<<() [5/11]

template SOFA_TYPE_API std::ostream& sofa::type::operator<< ( std::ostream &  out,
const Quat< double > &  v 
)

◆ operator<<() [6/11]

template SOFA_TYPE_API std::ostream& sofa::type::operator<< ( std::ostream &  out,
const Quat< float > &  v 
)

◆ operator<<() [7/11]

template<class Real >
SOFA_TYPE_API std::ostream& sofa::type::operator<< ( std::ostream &  out,
const Quat< Real > &  v 
)

write to an output stream

◆ operator<<() [8/11]

template<class Real >
std::ostream& sofa::type::operator<< ( std::ostream &  out,
const Quat< Real > &  v 
)

write to an output stream

◆ operator<<() [9/11]

SOFA_TYPE_API std::ostream& sofa::type::operator<< ( std::ostream &  out,
const RGBAColor t 
)

Write to an output stream.

◆ operator<<() [10/11]

std::ostream& sofa::type::operator<< ( std::ostream &  out,
const sofa::type::Frame c 
)

◆ operator<<() [11/11]

template<sofa::Size N, typename Real >
std::ostream& sofa::type::operator<< ( std::ostream &  out,
const Vec< N, Real > &  v 
)

Write to an output stream.

◆ operator>()

template<typename T , sofa::Size N>
constexpr bool sofa::type::operator> ( const fixed_array< T, N > &  v1,
const fixed_array< T, N > &  v2 
)
constexprnoexcept

◆ operator>>() [1/10]

SOFA_TYPE_API std::istream& sofa::type::operator>> ( std::istream &  i,
RGBAColor t 
)

◆ operator>>() [2/10]

template<sofa::Size L, sofa::Size C, typename real >
std::istream& sofa::type::operator>> ( std::istream &  in,
Mat< L, C, real > &  m 
)

◆ operator>>() [3/10]

std::istream& sofa::type::operator>> ( std::istream &  in,
Material m 
)

◆ operator>>() [4/10]

template<sofa::Size D, class real >
std::istream& sofa::type::operator>> ( std::istream &  in,
MatSym< D, real > &  m 
)

◆ operator>>() [5/10]

std::istream& sofa::type::operator>> ( std::istream &  in,
PrimitiveGroup g 
)

◆ operator>>() [6/10]

template SOFA_TYPE_API std::istream& sofa::type::operator>> ( std::istream &  in,
Quat< double > &  v 
)

◆ operator>>() [7/10]

template SOFA_TYPE_API std::istream& sofa::type::operator>> ( std::istream &  in,
Quat< float > &  v 
)

◆ operator>>() [8/10]

template<class Real >
SOFA_TYPE_API std::istream& sofa::type::operator>> ( std::istream &  in,
Quat< Real > &  v 
)

read from an input stream

◆ operator>>() [9/10]

template<class Real >
std::istream& sofa::type::operator>> ( std::istream &  in,
Quat< Real > &  v 
)

read from an input stream

◆ operator>>() [10/10]

template<sofa::Size N, typename Real >
std::istream& sofa::type::operator>> ( std::istream &  in,
Vec< N, Real > &  v 
)

Read from an input stream.

◆ printLibraryNotCleanedUpWarning()

SOFA_TYPE_API void sofa::type::printLibraryNotCleanedUpWarning ( const std::string &  library,
const std::string &  cleanupFunction 
)

Print a warning about a library not being cleaned up (meant for internal use).

◆ printMaple()

template<sofa::Size L, sofa::Size C, typename real >
void sofa::type::printMaple ( std::ostream &  o,
const Mat< L, C, real > &  m 
)

◆ printMatlab()

template<sofa::Size L, sofa::Size C, typename real >
void sofa::type::printMatlab ( std::ostream &  o,
const Mat< L, C, real > &  m 
)

printing in other software formats

◆ printUninitializedLibraryWarning()

SOFA_TYPE_API void sofa::type::printUninitializedLibraryWarning ( const std::string &  library,
const std::string &  initFunction 
)

Print a warning about a library not being initialized (meant for internal use).

◆ pythag()

template<class T1 , class T2 >
T1 sofa::type::pythag ( const T1  a,
const T2  b 
)

Computes sqrt(a^2 + b^2) without destructive underflow or overflow.

◆ remove()

template<class T1 , class T2 >
void sofa::type::remove ( T1 &  v,
const T2 &  elem 
)

Remove the first occurrence of a given value. The remaining values are shifted.

◆ removeIndex()

template<class T , class TT >
void sofa::type::removeIndex ( std::vector< T, TT > &  v,
size_t  index 
)

Remove value at given index, replace it by the value at the last index, other values are not changed.

◆ removeValue()

template<class T1 , class T2 >
void sofa::type::removeValue ( T1 &  v,
const T2 &  elem 
)

Remove the first occurrence of a given value.

The last value is moved to where the value was found, and the other values are not shifted.

◆ S_MAX()

template<class T1 , class T2 >
const T1 sofa::type::S_MAX ( const T1 &  a,
const T2 &  b 
)
inline

return the max of two values

◆ S_MIN()

template<class T1 , class T2 >
const T1 sofa::type::S_MIN ( const T1 &  a,
const T2 &  b 
)
inline

return the min of two values

◆ S_SIGN()

template<class T1 , class T2 >
const T1 sofa::type::S_SIGN ( const T1 &  a,
const T2 &  b 
)
inline

◆ S_SQR()

template<class T >
const T sofa::type::S_SQR ( const T  a)
inline

◆ scalarProduct() [1/4]

template<sofa::Size D, typename real >
real sofa::type::scalarProduct ( const Mat< D, D, real > &  left,
const MatSym< D, real > &  right 
)
inline

◆ scalarProduct() [2/4]

template<sofa::Size L, sofa::Size C, typename real >
constexpr real sofa::type::scalarProduct ( const Mat< L, C, real > &  left,
const Mat< L, C, real > &  right 
)
constexprnoexcept

Compute the scalar product of two matrix (sum of product of all terms)

◆ scalarProduct() [3/4]

template<sofa::Size D, typename real >
real sofa::type::scalarProduct ( const MatSym< D, real > &  left,
const Mat< D, D, real > &  right 
)
inline

◆ scalarProduct() [4/4]

template<sofa::Size D, typename real >
real sofa::type::scalarProduct ( const MatSym< D, real > &  left,
const MatSym< D, real > &  right 
)
inline

Compute the scalar product of two matrix (sum of product of all terms)

◆ solveLCP()

template<Size dim, typename real >
bool sofa::type::solveLCP ( const Vec< dim, real > &  q,
const Mat< dim, dim, real > &  M,
Vec< dim *2, real > &  res 
)

◆ svddcmp()

template<int m, int n, typename Real >
void sofa::type::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.

SVD decomposition a = u.w.vt

Precondition
a: original matrix, destroyed to become u
w: diagonal vector
v: matrix

◆ tensorProduct()

template<sofa::Size L, class Real >
constexpr Mat<L,L,Real> sofa::type::tensorProduct ( const Vec< L, Real > &  a,
const Vec< L, Real > &  b 
)
constexprnoexcept

return a * b^T

◆ trace() [1/3]

template<sofa::Size N, class real >
constexpr real sofa::type::trace ( const Mat< N, N, real > &  m)
constexprnoexcept

trace of a square matrix

◆ trace() [2/3]

template<class real >
real sofa::type::trace ( const MatSym< 2, real > &  m)
inline

Trace of a 2x2 matrix.

◆ trace() [3/3]

template<class real >
real sofa::type::trace ( const MatSym< 3, real > &  m)
inline

Trace of a 3x3 matrix.

◆ transformInvertMatrix()

template<sofa::Size S, class real >
constexpr bool sofa::type::transformInvertMatrix ( Mat< S, S, real > &  dest,
const Mat< S, S, real > &  from 
)
constexpr

Inverse Matrix considering the matrix as a transformation.

◆ vector_access_failure()

void SOFA_TYPE_API sofa::type::vector_access_failure ( const void *  vec,
const std::size_t  size,
const std::size_t  i,
const std::type_info &  type 
)

Variable Documentation

◆ deny

template<class... >
constexpr auto sofa::type::deny = false
inlineconstexpr

◆ DualQuatCoord3< double >

template class SOFA_TYPE_API sofa::type::DualQuatCoord3< double >

◆ DualQuatCoord3< float >

template class SOFA_TYPE_API sofa::type::DualQuatCoord3< float >

◆ fixed_array< double, 2 >

template class SOFA_TYPE_API sofa::type::fixed_array< double, 2 >

◆ fixed_array< double, 3 >

template class SOFA_TYPE_API sofa::type::fixed_array< double, 3 >

◆ fixed_array< double, 4 >

template class SOFA_TYPE_API sofa::type::fixed_array< double, 4 >

◆ fixed_array< double, 5 >

template class SOFA_TYPE_API sofa::type::fixed_array< double, 5 >

◆ fixed_array< double, 6 >

template class SOFA_TYPE_API sofa::type::fixed_array< double, 6 >

◆ fixed_array< double, 7 >

template class SOFA_TYPE_API sofa::type::fixed_array< double, 7 >

◆ fixed_array< float, 2 >

template class SOFA_TYPE_API sofa::type::fixed_array< float, 2 >

◆ fixed_array< float, 3 >

template class SOFA_TYPE_API sofa::type::fixed_array< float, 3 >

◆ fixed_array< float, 4 >

template class SOFA_TYPE_API sofa::type::fixed_array< float, 4 >

◆ fixed_array< float, 5 >

template class SOFA_TYPE_API sofa::type::fixed_array< float, 5 >

◆ fixed_array< float, 6 >

template class SOFA_TYPE_API sofa::type::fixed_array< float, 6 >

◆ fixed_array< float, 7 >

template class SOFA_TYPE_API sofa::type::fixed_array< float, 7 >

◆ g_black

constexpr RGBAColor sofa::type::g_black {0.0f,0.0f,0.0f,1.0f}
constexpr

◆ g_blue

constexpr RGBAColor sofa::type::g_blue {0.0f,0.0f,1.0f,1.0f}
constexpr

◆ g_cyan

constexpr RGBAColor sofa::type::g_cyan {0.0f,1.0f,1.0f,1.0f}
constexpr

◆ g_darkgray

constexpr RGBAColor sofa::type::g_darkgray {0.25f,0.25f,0.25f,1.0f}
constexpr

◆ g_gray

constexpr RGBAColor sofa::type::g_gray {0.5f,0.5f,0.5f,1.0f}
constexpr

◆ g_green

constexpr RGBAColor sofa::type::g_green {0.0f,1.0f,0.0f,1.0f}
constexpr

◆ g_lightgray

constexpr RGBAColor sofa::type::g_lightgray {0.75f,0.75f,0.75f,1.0f}
constexpr

◆ g_magenta

constexpr RGBAColor sofa::type::g_magenta {1.0f,0.0f,1.0f,1.0f}
constexpr

◆ g_red

constexpr RGBAColor sofa::type::g_red {1.0f,0.0f,0.0f,1.0f}
constexpr

◆ g_white

constexpr RGBAColor sofa::type::g_white {1.0f,1.0f,1.0f,1.0f}
constexpr

◆ g_yellow

constexpr RGBAColor sofa::type::g_yellow {1.0f,1.0f,0.0f,1.0f}
constexpr

◆ NOINIT

constexpr NoInit sofa::type::NOINIT
constexpr

◆ QNOINIT

constexpr qNoInit sofa::type::QNOINIT
constexpr

◆ Quat< double >

template class SOFA_TYPE_API sofa::type::Quat< double >

Explicit instantiation of the quaternions for double precision.

◆ Quat< float >

template class SOFA_TYPE_API sofa::type::Quat< float >

Explicit instantiation of the quaternions for single precision.

◆ SpatialVector< double >

template class SOFA_TYPE_API sofa::type::SpatialVector< double >

◆ SpatialVector< float >

template class SOFA_TYPE_API sofa::type::SpatialVector< float >

◆ Transform< double >

template class SOFA_TYPE_API sofa::type::Transform< double >

◆ Transform< float >

template class SOFA_TYPE_API sofa::type::Transform< float >

◆ Vec< 2, double >

template class SOFA_TYPE_API sofa::type::Vec< 2, double >

◆ Vec< 2, float >

template class SOFA_TYPE_API sofa::type::Vec< 2, float >

◆ Vec< 2, int >

template class SOFA_TYPE_API sofa::type::Vec< 2, int >

◆ Vec< 2, unsigned >

template class SOFA_TYPE_API sofa::type::Vec< 2, unsigned >

◆ Vec< 3, double >

template class SOFA_TYPE_API sofa::type::Vec< 3, double >

◆ Vec< 3, float >

template class SOFA_TYPE_API sofa::type::Vec< 3, float >

◆ Vec< 3, int >

template class SOFA_TYPE_API sofa::type::Vec< 3, int >

◆ Vec< 3, unsigned >

template class SOFA_TYPE_API sofa::type::Vec< 3, unsigned >

◆ Vec< 4, double >

template class SOFA_TYPE_API sofa::type::Vec< 4, double >

◆ Vec< 4, float >

template class SOFA_TYPE_API sofa::type::Vec< 4, float >

◆ Vec< 4, int >

template class SOFA_TYPE_API sofa::type::Vec< 4, int >

◆ Vec< 4, unsigned >

template class SOFA_TYPE_API sofa::type::Vec< 4, unsigned >

◆ Vec< 6, double >

template class SOFA_TYPE_API sofa::type::Vec< 6, double >

◆ Vec< 6, float >

template class SOFA_TYPE_API sofa::type::Vec< 6, float >

◆ Vec< 6, int >

template class SOFA_TYPE_API sofa::type::Vec< 6, int >

◆ Vec< 6, unsigned >

template class SOFA_TYPE_API sofa::type::Vec< 6, unsigned >