66 for(uint16_t l=0 ; l<nl ; l++)
82 for(uint16_t l=0 ; l<
m_lin ; l++)
104 Cout(
"oMatrix::Allocate() ...");
110 for(uint16_t l=0 ; l<
m_lin ; l++)
120 for(uint16_t l=0 ; l<nl ; l++)
142 Cerr(
"***** oMatrix::SetMatriceElt()-> Nb of (lin,col) ("<<l+1<<
","<<c+1<<
") in parameters ");
143 Cerr(
"> to the number of (lin,col) of this matrix ("<<
m_lin<<
","<<
m_col<<
") !" << endl);
190 Cerr(
"***** oMatrix::Multiplication()-> Not matching number of colons and lines of the two matrices !");
193 else if (ap_MtxResult == NULL)
195 Cerr(
"***** oMatrix::Multiplication()-> The resulting matrix has not been allocated !");
200 for ( uint16_t tl = 0; tl <
m_lin; tl++ )
201 for ( uint16_t c = 0; c < ap_Mtx->
m_col; c++ )
203 for ( uint16_t l = 0; l < ap_Mtx->
m_lin; l++ )
231 || this->m_lin != ap_Mtx->
m_col )
233 Cerr(
"***** oMatrix::Transpose()-> Not matching number of colons <-> lines between the input and transpose matrices !");
238 Cerr(
"***** oMatrix::Transpose()-> The resulting matrix has not been allocated !");
244 for ( uint16_t l = 0; l < lsize; l++ )
245 for ( uint16_t c = l; c < lsize; c++ )
291 Cerr(
"***** oMatrix::Inverse()-> Not matching number of colons <-> lines between the input and transpose matrices !");
297 Cerr(
"***** oMatrix::Inverse()-> The resulting matrix has not been allocated !");
304 Cerr(
"***** oMatrix::Inverse()-> The resulting matrix has not been allocated !");
308 for ( uint16_t l = 0; l <
m_lin; l++ )
309 for ( uint16_t c = 0; c <
m_col; c++ )
322 for( uint16_t l=0 ; l<
m_lin ; l++ )
323 for ( uint16_t c = 0; c <
m_col; c++ )
331 for( uint16_t l=0 ; l<
m_lin ; l++ )
333 for ( uint16_t c = 0; c <
m_col; c++ )
340 for( uint16_t r=0 ; r<
m_lin ; r++ )
345 p_tMtx->
SetMatriceElt(r, c, pMtx[r][c] - pMtx[l][c]*pMtx[r][l]/pMtx[l][l]);
350 for(
int ll=0 ; ll<
m_lin ; ll++)
351 for(
int cc=0 ; cc<
m_col ; cc++)
376 Cerr(
"***** oMatrix::SetXRotMtx()-> The matrix must be (3,3) in order to use this function !");
410 Cerr(
"***** oMatrix::SetYRotMtx()-> The matrix must be (3,3) in order to use this function !");
444 Cerr(
"***** oMatrix::SetZRotMtx()-> The matrix must be (3,3) in order to use this function !");
474 for ( uint16_t l = 0; l <
m_lin; l++ )
476 for ( uint16_t c = 0; c <
m_col; c++ )
477 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...
~oMatrix()
oMatrix destructor. Free memory of the oMatrix object.
oMatrix()
oMatrix constructor. Initialize the member variables to their default values.
Declaration of class oMatrix.
HPFLTNB GetMatriceElt(uint16_t l, uint16_t c)
void Describe()
Display the element of the matrix.
Structure designed for basic matrices operations.
int SetXRotMtx(HPFLTNB ang)
Set a (3,3) X-axis rotation matrix using the provided angle.
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 SetMatriceElt(uint16_t l, uint16_t c, HPFLTNB a_val)
Set the matrix element corresponding to the argument indices with the provided value.
int SetZRotMtx(HPFLTNB ang)
Set a (3,3) Z-axis rotation matrix using the provided angle.
int SetYRotMtx(HPFLTNB ang)
Set a (3,3) Y-axis rotation matrix using the provided angle.
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.