Library for basic air data calculations  0.5b
MatrixMath.h
Go to the documentation of this file.
1 /*
2  * MatrixMath.h Library for Matrix Math
3  *
4  * Created by Charlie Matlack on 12/18/10.
5  * Modified from code by RobH45345 on Arduino Forums, algorithm from
6  * NUMERICAL RECIPES: The Art of Scientific Computing.
7  */
8 
9 #ifndef MatrixMath_h
10 #define MatrixMath_h
11 
12 #if defined(ARDUINO) && ARDUINO >= 100
13 #include "Arduino.h"
14 #else
15 #include "WProgram.h"
16 #endif
17 
19 {
20 public:
21  //MatrixMath();
22  void Print(float* A, int m, int n, String label);
23  void Copy(float* A, int n, int m, float* B);
24  void Multiply(float* A, float* B, int m, int p, int n, float* C);
25  void Add(float* A, float* B, int m, int n, float* C);
26  void Subtract(float* A, float* B, int m, int n, float* C);
27  void Transpose(float* A, int m, int n, float* C);
28  void Scale(float* A, int m, int n, float k);
29  int Invert(float* A, int n);
30 };
31 
32 extern MatrixMath Matrix;
33 #endif
MatrixMath Matrix
Definition: MatrixMath.cpp:13
Definition: MatrixMath.h:18
void Print(float *A, int m, int n, String label)
Definition: MatrixMath.cpp:17
void Copy(float *A, int n, int m, float *B)
Definition: MatrixMath.cpp:31
void Add(float *A, float *B, int m, int n, float *C)
Definition: MatrixMath.cpp:63
void Subtract(float *A, float *B, int m, int n, float *C)
Definition: MatrixMath.cpp:78
void Transpose(float *A, int m, int n, float *C)
Definition: MatrixMath.cpp:93
int Invert(float *A, int n)
Definition: MatrixMath.cpp:120
void Multiply(float *A, float *B, int m, int p, int n, float *C)
Definition: MatrixMath.cpp:43
void Scale(float *A, int m, int n, float k)
Definition: MatrixMath.cpp:105