44 for(uint16_t l=0 ; l<nl ; l++)
60 for(uint16_t l=0 ; l<
m_lin ; l++)
82 Cout(
"oMatrix::Allocate() ...");
88 for(uint16_t l=0 ; l<
m_lin ; l++)
98 for(uint16_t l=0 ; l<nl ; l++)
118 if(l>=m_lin || c>=
m_col)
120 Cerr(
"***** oMatrix::SetMatriceElt()-> Nb of (lin,col) ("<<l+1<<
","<<c+1<<
") in parameters ");
121 Cerr(
"> to the number of (lin,col) of this matrix ("<<m_lin<<
","<<
m_col<<
") !" << endl);
168 Cerr(
"***** oMatrix::Multiplication()-> Not matching number of colons and lines of the two matrices !");
171 else if (ap_MtxResult == NULL)
173 Cerr(
"***** oMatrix::Multiplication()-> The resulting matrix has not been allocated !");
178 for ( uint16_t tl = 0; tl <
m_lin; tl++ )
179 for ( uint16_t c = 0; c < ap_Mtx->
m_col; c++ )
181 for ( uint16_t l = 0; l < ap_Mtx->
m_lin; l++ )
209 || this->m_lin != ap_Mtx->
m_col )
211 Cerr(
"***** oMatrix::Transpose()-> Not matching number of colons <-> lines between the input and transpose matrices !");
216 Cerr(
"***** oMatrix::Transpose()-> The resulting matrix has not been allocated !");
222 for ( uint16_t l = 0; l < lsize; l++ )
223 for ( uint16_t c = l; c < lsize; c++ )
266 if ( (this->
m_col != this->m_lin)
269 Cerr(
"***** oMatrix::Inverse()-> Not matching number of colons <-> lines between the input and transpose matrices !");
275 Cerr(
"***** oMatrix::Inverse()-> The resulting matrix has not been allocated !");
282 Cerr(
"***** oMatrix::Inverse()-> The resulting matrix has not been allocated !");
286 for ( uint16_t l = 0; l <
m_lin; l++ )
287 for ( uint16_t c = 0; c <
m_col; c++ )
300 for( uint16_t l=0 ; l<
m_lin ; l++ )
301 for ( uint16_t c = 0; c <
m_col; c++ )
309 for( uint16_t l=0 ; l<
m_lin ; l++ )
311 for ( uint16_t c = 0; c <
m_col; c++ )
318 for( uint16_t r=0 ; r<
m_lin ; r++ )
323 p_tMtx->
SetMatriceElt(r, c, pMtx[r][c] - pMtx[l][c]*pMtx[r][l]/pMtx[l][l]);
328 for(
int ll=0 ; ll<
m_lin ; ll++)
329 for(
int cc=0 ; cc<
m_col ; cc++)
352 if(m_lin !=3 || m_col != 3)
354 Cerr(
"***** oMatrix::SetXRotMtx()-> The matrix must be (3,3) in order to use this function !");
386 if(m_lin !=3 || m_col != 3)
388 Cerr(
"***** oMatrix::SetYRotMtx()-> The matrix must be (3,3) in order to use this function !");
420 if(m_lin !=3 || m_col != 3)
422 Cerr(
"***** oMatrix::SetZRotMtx()-> The matrix must be (3,3) in order to use this function !");
452 for ( uint16_t l = 0; l <
m_lin; l++ )
454 for ( uint16_t c = 0; c <
m_col; c++ )
455 cout <<
m2p_Mat[l][c] <<
" ; ";
int Inverse(oMatrix *ap_MtxResult)
~oMatrix()
oMatrix destructor. Free memory of the oMatrix object.
oMatrix()
oMatrix constructor. Initialize the member variables to their default values.
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)
int Multiplication(oMatrix *ap_Mtx, oMatrix *ap_MtxResult)
int SetMatriceElt(uint16_t l, uint16_t c, HPFLTNB a_val)
int SetZRotMtx(HPFLTNB ang)
int SetYRotMtx(HPFLTNB ang)
int Transpose(oMatrix *a_MtxResult)
void Allocate(uint16_t nl, uint16_t nc)