darknet/src/matrix.h

20 lines
429 B
C
Raw Normal View History

2013-11-13 22:50:38 +04:00
#ifndef MATRIX_H
#define MATRIX_H
typedef struct matrix{
int rows, cols;
float **vals;
2013-11-13 22:50:38 +04:00
} matrix;
matrix make_matrix(int rows, int cols);
void free_matrix(matrix m);
void print_matrix(matrix m);
matrix csv_to_matrix(char *filename);
matrix hold_out_matrix(matrix *m, int n);
float matrix_accuracy(matrix truth, matrix guess);
2013-12-07 21:38:50 +04:00
void matrix_add_matrix(matrix from, matrix to);
2013-11-13 22:50:38 +04:00
float *pop_column(matrix *m, int c);
2013-11-13 22:50:38 +04:00
#endif