SOFA API  9d9100aa
Open source framework for multi-physics simuation
sofa::defaulttype::MatNoInit< L, C, real > Class Template Reference

#include <Mat.h>

Same as Mat except the values are not initialized by default. More...

Inheritance diagram for sofa::defaulttype::MatNoInit< L, C, real >:

Detailed Description

template<int L, int C, typename real = float>
class sofa::defaulttype::MatNoInit< L, C, real >

Same as Mat except the values are not initialized by default.

Public Member Functions

 MatNoInit ()
 
void operator= (const real *p)
 Assignment from an array of elements (stored per line). More...
 
template<int L2, int C2, typename real2 >
void operator= (const Mat< L2, C2, real2 > &m)
 Assignment from another matrix. More...
 
- Public Member Functions inherited from sofa::defaulttype::Mat< L, C, real >
 Mat ()
 
 Mat (NoInit)
 
 Mat (Line r1, Line r2)
 Specific constructor with 2 lines. More...
 
 Mat (Line r1, Line r2, Line r3)
 Specific constructor with 3 lines. More...
 
 Mat (Line r1, Line r2, Line r3, Line r4)
 Specific constructor with 4 lines. More...
 
 Mat (const real &v)
 Constructor from an element. More...
 
template<typename real2 >
 Mat (const Mat< L, C, real2 > &m)
 Constructor from another matrix. More...
 
template<int L2, int C2, typename real2 >
 Mat (const Mat< L2, C2, real2 > &m)
 Constructor from another matrix with different size (with null default entries and ignoring outside entries) More...
 
template<typename real2 >
 Mat (const real2 *p)
 Constructor from an array of elements (stored per line). More...
 
int getNbLines () const
 number of lines More...
 
int getNbCols () const
 number of colums More...
 
void operator= (const real *p)
 Assignment from an array of elements (stored per line). More...
 
template<typename real2 >
void operator= (const Mat< L, C, real2 > &m)
 Assignment from another matrix. More...
 
template<int L2, int C2>
void operator= (const Mat< L2, C2, real > &m)
 Assignment from a matrix of different size. More...
 
template<int L2, int C2>
void getsub (int L0, int C0, Mat< L2, C2, real > &m) const
 
template<int L2, int C2>
void setsub (int L0, int C0, const Mat< L2, C2, real > &m)
 
template<int L2>
void setsub (int L0, int C0, const Vec< L2, real > &v)
 
void clear ()
 Sets each element to 0. More...
 
void fill (real r)
 Sets each element to r. More...
 
const Lineline (int i) const
 Read-only access to line i. More...
 
Col col (int j) const
 Copy of column j. More...
 
LineNoInitoperator[] (int i)
 Write acess to line i. More...
 
const LineNoInitoperator[] (int i) const
 Read-only access to line i. More...
 
LineNoInitoperator() (int i)
 Write acess to line i. More...
 
const LineNoInitoperator() (int i) const
 Read-only access to line i. More...
 
real & operator() (int i, int j)
 Write access to element (i,j). More...
 
const real & operator() (int i, int j) const
 Read-only access to element (i,j). More...
 
const Linelptr () const
 Cast into a standard C array of lines (read-only). More...
 
Linelptr ()
 Cast into a standard C array of lines. More...
 
const real * ptr () const
 Cast into a standard C array of elements (stored per line) (read-only). More...
 
real * ptr ()
 Cast into a standard C array of elements (stored per line). More...
 
Linex ()
 Special access to first line. More...
 
Liney ()
 Special access to second line. More...
 
Linez ()
 Special access to third line. More...
 
Linew ()
 Special access to fourth line. More...
 
const Linex () const
 Special access to first line (read-only). More...
 
const Liney () const
 Special access to second line (read-only). More...
 
const Linez () const
 Special access to thrid line (read-only). More...
 
const Linew () const
 Special access to fourth line (read-only). More...
 
void identity ()
 Set matrix to identity. More...
 
void transpose (const Mat< C, L, real > &m)
 Set matrix as the transpose of m. More...
 
Mat< C, L, real > transposed () const
 Return the transpose of m. More...
 
void transpose ()
 Transpose the square matrix. More...
 
template<int P>
Mat< L, P, real > operator* (const Mat< C, P, real > &m) const
 Matrix multiplication operator. More...
 
Mat< L, C, real > operator+ (const Mat< L, C, real > &m) const
 Matrix addition operator. More...
 
Mat< L, C, real > operator- (const Mat< L, C, real > &m) const
 Matrix subtraction operator. More...
 
Mat< L, C, real > operator- () const
 Matrix negation operator. More...
 
Col operator* (const Line &v) const
 Multiplication operator Matrix * Line. More...
 
Mat< L, C, real > multDiagonal (const Line &d) const
 Multiplication with a diagonal Matrix CxC represented as a vector of size C. More...
 
Line multTranspose (const Col &v) const
 Multiplication of the transposed Matrix * Column. More...
 
template<int P>
Mat< C, P, real > multTranspose (const Mat< L, P, real > &m) const
 Transposed Matrix multiplication operator. More...
 
template<int P>
Mat< L, P, real > multTransposed (const Mat< P, C, real > &m) const
 Multiplication with the transposed of the given matrix operator. More...
 
Mat< L, C, real > plusTransposed (const Mat< C, L, real > &m) const
 Addition with the transposed of the given matrix operator. More...
 
Mat< L, C, real > minusTransposed (const Mat< C, L, real > &m) const
 Substraction with the transposed of the given matrix operator. More...
 
Mat< L, C, real > operator* (real f) const
 Scalar multiplication operator. More...
 
Mat< L, C, 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 Mat< L, C, real > &m)
 Addition assignment operator. More...
 
void addTransposed (const Mat< C, L, real > &m)
 Addition of the transposed of m. More...
 
void subTransposed (const Mat< C, L, real > &m)
 Substraction of the transposed of m. More...
 
void operator-= (const Mat< L, C, real > &m)
 Substraction assignment operator. More...
 
Mat< L, C, real > inverted () const
 invert this More...
 
bool invert (const Mat< L, C, real > &m)
 Invert square matrix m. More...
 
bool isTransform () const
 
Vec< C-1, real > transform (const Vec< C-1, real > &v) const
 Multiplication operator Matrix * Vector considering the matrix as a transformation. More...
 
bool transformInvert (const Mat< L, C, real > &m)
 Invert transformation matrix m. More...
 
void symmetrize ()
 
bool operator== (const Mat< L, C, real > &b) const
 
bool operator!= (const Mat< L, C, real > &b) const
 
bool isSymmetric () const
 
bool isDiagonal () const
 
- Public Member Functions inherited from sofa::helper::fixed_array< VecNoInit< C, real >, L >
 fixed_array ()
 
 fixed_array (value_type r1)
 Specific constructor for 1-element vectors. More...
 
 fixed_array (value_type r1, value_type r2)
 Specific constructor for 2-elements vectors. More...
 
 fixed_array (value_type r1, value_type r2, value_type r3)
 Specific constructor for 3-elements vectors. More...
 
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4)
 Specific constructor for 4-elements vectors. More...
 
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4, value_type r5)
 Specific constructor for 5-elements vectors. More...
 
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4, value_type r5, value_type r6)
 Specific constructor for 6-elements vectors. More...
 
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4, value_type r5, value_type r6, value_type r7)
 Specific constructor for 7-elements vectors. More...
 
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4, value_type r5, value_type r6, value_type r7, value_type r8)
 Specific constructor for 8-elements vectors. More...
 
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4, value_type r5, value_type r6, value_type r7, value_type r8, value_type r9)
 Specific constructor for 9-elements vectors. More...
 
 fixed_array (value_type r1, value_type r2, value_type r3, value_type r4, value_type r5, value_type r6, value_type r7, value_type r8, value_type r9, value_type r10)
 Specific constructor for 10-elements vectors. More...
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reference operator[] (size_type i)
 
const_reference operator[] (size_type i) const
 
reference at (size_type i)
 
const_reference at (size_type i) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
void swap (fixed_array< VecNoInit< C, real >, N > &y)
 
const VecNoInit< C, real > * data () const
 
const Arrayarray () const
 direct access to array More...
 
Arrayarray ()
 direct access to array More...
 
fixed_array< VecNoInit< C, real >, N > & operator= (const fixed_array< T2, N > &rhs)
 
void assign (const VecNoInit< C, real > &value)
 
bool operator< (const fixed_array &v) const
 

Additional Inherited Members

- Public Attributes inherited from sofa::helper::fixed_array< VecNoInit< C, real >, L >
VecNoInit< C, real > elems [N]
 
- Static Public Attributes inherited from sofa::defaulttype::Mat< L, C, real >
static const int nbLines = L
 
static const int nbCols = C
 
static Mat< L, L, real > s_identity = Mat<L,L,real>::Identity()
 precomputed identity matrix of size (L,L) More...
 
- Static Public Member Functions inherited from sofa::defaulttype::Mat< L, C, real >
static Mat< L, L, real > Identity ()
 Returns the identity matrix. More...
 
template<int S>
static bool canSelfTranspose (const Mat< S, S, real > &lhs, const Mat< S, S, real > &rhs)
 
template<int I, int J>
static bool canSelfTranspose (const Mat< I, J, real > &, const Mat< J, I, real > &)
 
static Mat< L, C, real > transformTranslation (const Vec< C-1, real > &t)
 
static Mat< L, C, real > transformScale (real s)
 
static Mat< L, C, real > transformScale (const Vec< C-1, real > &s)
 
template<class Quat >
static Mat< L, C, real > transformRotation (const Quat &q)
 
- Static Public Member Functions inherited from sofa::helper::fixed_array< VecNoInit< C, real >, L >
static size_type size ()
 
static bool empty ()
 
static size_type max_size ()
 

Constructor details

template<int L, int C, typename real = float>
sofa::defaulttype::MatNoInit< L, C, real >::MatNoInit ( )
inline

Function details

template<int L, int C, typename real = float>
void sofa::defaulttype::MatNoInit< L, C, real >::operator= ( const real *  p)
inline

Assignment from an array of elements (stored per line).

template<int L, int C, typename real = float>
template<int L2, int C2, typename real2 >
void sofa::defaulttype::MatNoInit< L, C, real >::operator= ( const Mat< L2, C2, real2 > &  m)
inline

Assignment from another matrix.