forked from pjreddie/vision-hw4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
matrix.h
34 lines (31 loc) · 876 Bytes
/
matrix.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef MATRIX_H
#define MATRIX_H
typedef struct matrix{
int rows, cols;
double **data;
int shallow;
} matrix;
typedef struct LUP{
matrix *L;
matrix *U;
int *P;
int n;
} LUP;
matrix make_identity_homography();
matrix make_translation_homography(float dx, float dy);
void free_matrix(matrix m);
double mag_matrix(matrix m);
matrix make_matrix(int rows, int cols);
matrix copy_matrix(matrix m);
double *sle_solve(matrix A, double *b);
matrix matrix_mult_matrix(matrix a, matrix b);
matrix matrix_elmult_matrix(matrix a, matrix b);
void print_matrix(matrix m);
double **n_principal_components(matrix m, int n);
void test_matrix();
matrix solve_system(matrix M, matrix b);
matrix matrix_invert(matrix m);
matrix random_matrix(int rows, int cols, double s);
matrix transpose_matrix(matrix m);
matrix axpy_matrix(double a, matrix x, matrix y);
#endif