MatrixMath.h

Sat, 07 Nov 2015 13:24:46 +0100

author
mbayer
date
Sat, 07 Nov 2015 13:24:46 +0100
changeset 1
b584642d4f58
parent 0
2c8ba1964db7
permissions
-rw-r--r--

several modifications to support laser enable - still needs cleanup

0
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
1 /*
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
2 * MatrixMath.h Library for Matrix Math
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
3 *
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
4 * Created by Charlie Matlack on 12/18/10.
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
5 * Modified from code by RobH45345 on Arduino Forums, taken from unknown source.
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
6 */
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
7
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
8 #ifndef MatrixMath_h
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
9 #define MatrixMath_h
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
10
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
11 #include "Marlin.h"
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
12
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
13 class MatrixMath
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
14 {
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
15 public:
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
16 MatrixMath();
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
17 void MatrixPrint(float* A, int m, int n, String label);
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
18 void MatrixCopy(float* A, int n, int m, float* B);
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
19 void MatrixMult(float* A, float* B, int m, int p, int n, float* C);
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
20 void MatrixAdd(float* A, float* B, int m, int n, float* C);
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
21 void MatrixSubtract(float* A, float* B, int m, int n, float* C);
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
22 void MatrixTranspose(float* A, int m, int n, float* C);
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
23 int MatrixInvert(float* A, int n);
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
24 void MatrixIdentity(float* A, int m, int n);
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
25 };
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
26
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
27 extern MatrixMath matrixMaths;
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
28
2c8ba1964db7 Initial code from reprappro Marlin repository
mbayer
parents:
diff changeset
29 #endif

mercurial