Merge branch 'master' of git.ucc.asn.au:/matches/honours
[matches/honours.git] / research / transmission_spectroscopy / universesim / src / include / tVector.h
1 /*
2  */
3 #ifndef _VECTOR_H_
4 #define _VECTOR_H_
5
6 #include <largeint.h>
7
8 #define VECTOR_COMPONENTS       2
9
10 typedef struct sVector
11 {
12         tLargeInt       C[VECTOR_COMPONENTS];
13 }       tVector;
14
15 typedef struct sMatrix
16 {
17         tLargeInt       M[VECTOR_COMPONENTS][VECTOR_COMPONENTS];
18 }       tMatrix;
19
20 extern char     *Vector_DumpEx(tVector *Vect, int Buf);
21
22 extern void     Vector_Zero(tVector *Vect);
23 extern void     Vector_Set(tVector *Dest, tVector *Src);
24 extern void     Vector_Abs(tVector *Vect);
25 extern void     Vector_Add(tVector *Dest, tVector *Src);
26 extern void     Vector_Sub(tVector *Dest, tVector *Src);
27
28 extern void     Vector_MulScalar(tVector *Dest, tLargeInt *Scalar);
29 extern void     Vector_DivScalar(tVector *Dest, tLargeInt *Scalar);
30 extern void     Vector_Magnitude(tLargeInt *Dest, tVector *Src);
31
32 extern void     Vector_MulMatrix(tVector *Dest, tMatrix *Matrix, tVector *Vector);
33 extern void     Vector_DivComp(tVector *Dest, tVector *Source);
34
35 extern void     Vector_GetMax(tVector *Dest, tVector *V1, tVector *V2);
36 extern void     Vector_GetMin(tVector *Dest, tVector *V1, tVector *V2);
37
38 extern void     Matrix_SetIdentity(tMatrix *Mat);
39
40 #endif

UCC git Repository :: git.ucc.asn.au