00001 #ifndef MATRICES_H
00002 #define MATRICES_H
00003
00004 #include <math.h>
00005 #include <stdlib.h>
00006
00007 typedef float** matrix;
00008
00009 void addMatrix2 (float A[2][2], float B[2][2], float C[2][2]);
00010 void subMatrix2 (float A[2][2], float B[2][2], float C[2][2]);
00011 void multMatrix2(float A[2][2], float B[2][2], float C[2][2]);
00012 void subVector2 (float A[2], float B[2], float C[2]);
00013 void multMatVec2(float A[2][2], float B[2], float C[2]);
00014 void invert2(float A[2][2], float B[2][2]);
00015 void VectmultSc2(float V[2], float scl, float V1[2]);
00016 void addVector2(float V[2], float V1[2], float V2[2]);
00017
00018 void addMatrix (matrix A, matrix B, matrix C, int m, int n);
00019 void addVector (float* A, float* B, float* C, int m);
00020 void subMatrix (matrix A, matrix B, matrix C, int m, int n);
00021 void subVector (float* A, float* B, float* C, int m);
00022 void negMatrix(matrix A, int m, int n);
00023 void multMatrix(matrix A, matrix B, matrix C, int Am, int An, int Bn);
00024 void multMatVec(matrix A, float* B, float* C, int Am, int Bn);
00025 void transpose(matrix A, matrix B, int Am, int An);
00026 void invert3(matrix A, matrix B);
00027 float determinant(matrix A,matrix tmp, int n);
00028 void getMinor(matrix A, matrix B,int An, int m, int n);
00029 void invt(matrix A, matrix B, matrix tmp1, matrix tmp2, int An);
00030 float BhQhBhT(matrix Qh, float* Bh, float* tmp);
00031 void VectdivSc(float* V, float scl);
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 #endif
00053
00054