altb_pmic / AHRS

Dependencies:   Eigen

Dependents:   IndNav_QK3_T265

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers matrix.h Source File

matrix.h

00001 
00002 #ifndef MYMATRIX_H_
00003 #define MYMATRIX_H_
00004 
00005 #include <mbed.h>
00006 
00007 class matrix
00008 {
00009 public:
00010     matrix(){};
00011     matrix(uint8_t,uint8_t,float);
00012     matrix(uint8_t);                //define n x n Unity Matrix
00013     matrix(uint8_t,float);          //define n x n diagonal matrix with equal entries (e*I) 
00014     matrix operator*(const matrix& B); 
00015     matrix operator *=(const matrix& B); // calculat A'*B
00016     matrix operator /=(const matrix& B); 
00017     matrix operator +(const matrix& B);
00018     void operator +=(const matrix& B); 
00019     matrix operator -(const matrix& B); 
00020     void scale(float);
00021     matrix inv_2x2(void);
00022     void mcopy(matrix *);
00023     void printout(void);
00024     void put_entry(uint8_t,uint8_t,float);
00025     void fill_row(uint8_t i,float *e);
00026     void fill_col(uint8_t i,float *e);
00027     uint8_t getI(void);
00028     uint8_t getJ(void);
00029     virtual     ~matrix();
00030     float** a;
00031     
00032 
00033 private:
00034     uint8_t I,J;
00035 };
00036 
00037 #endif