67 for(uint16_t l=0 ; l<nl ; l++)
83 for(uint16_t l=0 ; l<
m_lin ; l++)
105 Cout(
"oMatrix::Allocate() ...");
111 for(uint16_t l=0 ; l<
m_lin ; l++)
121 for(uint16_t l=0 ; l<nl ; l++)
143 Cerr(
"***** oMatrix::SetMatriceElt()-> Nb of (lin,col) ("<<l+1<<
","<<c+1<<
") in parameters ");
144 Cerr(
"> to the number of (lin,col) of this matrix ("<<
m_lin<<
","<<
m_col<<
") !" << endl);
191 Cerr(
"***** oMatrix::Multiplication()-> Not matching number of colons and lines of the two matrices !");
194 else if (ap_MtxResult == NULL)
196 Cerr(
"***** oMatrix::Multiplication()-> The resulting matrix has not been allocated !");
201 for ( uint16_t tl = 0; tl <
m_lin; tl++ )
202 for ( uint16_t c = 0; c < ap_Mtx->
m_col; c++ )
204 for ( uint16_t l = 0; l < ap_Mtx->
m_lin; l++ )
232 || this->m_lin != ap_Mtx->
m_col )
234 Cerr(
"***** oMatrix::Transpose()-> Not matching number of colons <-> lines between the input and transpose matrices !");
239 Cerr(
"***** oMatrix::Transpose()-> The resulting matrix has not been allocated !");
245 for ( uint16_t l = 0; l < lsize; l++ )
246 for ( uint16_t c = l; c < lsize; c++ )
292 Cerr(
"***** oMatrix::Inverse()-> Not matching number of colons <-> lines between the input and transpose matrices !");
298 Cerr(
"***** oMatrix::Inverse()-> The resulting matrix has not been allocated !");
305 Cerr(
"***** oMatrix::Inverse()-> The resulting matrix has not been allocated !");
309 for ( uint16_t l = 0; l <
m_lin; l++ )
310 for ( uint16_t c = 0; c <
m_col; c++ )
314 Cerr(
"***** oMatrix::Inverse()-> One element on the diagonal is nil !");
323 for( uint16_t l=0 ; l<
m_lin ; l++ )
324 for ( uint16_t c = 0; c <
m_col; c++ )
332 for( uint16_t l=0 ; l<
m_lin ; l++ )
334 for ( uint16_t c = 0; c <
m_col; c++ )
341 for( uint16_t r=0 ; r<
m_lin ; r++ )
346 p_tMtx->
SetMatriceElt(r, c, pMtx[r][c] - pMtx[l][c]*pMtx[r][l]/pMtx[l][l]);
351 for(
int ll=0 ; ll<
m_lin ; ll++)
352 for(
int cc=0 ; cc<
m_col ; cc++)
377 Cerr(
"***** oMatrix::SetXRotMtx()-> The matrix must be (3,3) in order to use this function !");
411 Cerr(
"***** oMatrix::SetYRotMtx()-> The matrix must be (3,3) in order to use this function !");
445 Cerr(
"***** oMatrix::SetZRotMtx()-> The matrix must be (3,3) in order to use this function !");
475 for ( uint16_t l = 0; l <
m_lin; l++ )
477 for ( uint16_t c = 0; c <
m_col; c++ )
478 cout <<
m2p_Mat[l][c] <<
" ; ";
int Inverse(oMatrix *ap_MtxResult)
Inverse the matrix on which the function is called An error is returned if the matrix is not square...
FLTNB GetMatriceElt(uint16_t l, uint16_t c)
~oMatrix()
oMatrix destructor. Free memory of the oMatrix object.
oMatrix()
oMatrix constructor. Initialize the member variables to their default values.
int SetMatriceElt(uint16_t l, uint16_t c, FLTNB a_val)
Set the matrix element corresponding to the argument indices with the provided value.
Declaration of class oMatrix.
void Describe()
Display the element of the matrix.
int SetZRotMtx(FLTNB ang)
Set a (3,3) Z-axis rotation matrix using the provided angle.
int SetXRotMtx(FLTNB ang)
Set a (3,3) X-axis rotation matrix using the provided angle.
int SetYRotMtx(FLTNB ang)
Set a (3,3) Y-axis rotation matrix using the provided angle.
Structure designed for basic matrices operations.
int Multiplication(oMatrix *ap_Mtx, oMatrix *ap_MtxResult)
Multiply the member matrix with the matrix provided in 1st parameter Return the result in the matric ...
int Transpose(oMatrix *a_MtxResult)
Transpose the elements of the matrix.
void Allocate(uint16_t nl, uint16_t nc)
Instanciate a Matrix structure with the number of lines and colons provided in parameters.