1 |
#ifndef __MATVEC3_H__ |
2 |
#define __MATVEC3_H__ |
3 |
|
4 |
#include <math.h> |
5 |
#include "simError.h" |
6 |
#ifdef __cplusplus |
7 |
extern "C" { |
8 |
#endif |
9 |
|
10 |
void identityMat3(double A[3][3]); |
11 |
void swapVectors3(double v1[3], double v2[3]); |
12 |
static double norm3(const double x[3]){ return sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]); }; |
13 |
double normalize3(double x[3]); |
14 |
void matMul3(double a[3][3], double b[3][3], double out[3][3]); |
15 |
void matVecMul3(double m[3][3], double inVec[3], double outVec[3]); |
16 |
double matDet3(double m[3][3]); |
17 |
void invertMat3(double in[3][3], double out[3][3]); |
18 |
void transposeMat3(double in[3][3], double out[3][3]); |
19 |
void printMat3(double A[3][3]); |
20 |
void printMat9(double A[9]); |
21 |
double matTrace3(double m[3][3]); |
22 |
void crossProduct3(double a[3],double b[3], double out[3]); |
23 |
double dotProduct3(double a[3], double b[3]); |
24 |
void diagonalize3x3(const double A[3][3],double w[3],double V[3][3]); |
25 |
int JacobiN(double **a, int n, double *w, double **v); |
26 |
|
27 |
#ifdef __cplusplus |
28 |
} |
29 |
#endif |
30 |
|
31 |
#endif |