diff --git a/image.c b/image.c new file mode 100644 index 0000000..db0c0fe --- /dev/null +++ b/image.c @@ -0,0 +1,11 @@ +#pragma once + +#include "image.h" +#include "matrix.h" + +typedef struct { + Matrix* pixel_values; + int image_label; +} Image; + + diff --git a/image.h b/image.h new file mode 100644 index 0000000..e69de29 diff --git a/matrix.c b/matrix.c index 060434b..cc76636 100644 --- a/matrix.c +++ b/matrix.c @@ -79,7 +79,7 @@ Matrix* matrix_copy(Matrix *matrix) { // mathematical functions /* - * This methods won't change or free the input matrix. + * These methods won't change or free the input matrix. * It creates a new matrix, which is modified and then returned. * If we don't need the original matrix, we should consider just changing the original matrix and changing the method signature to void. */ diff --git a/matrix.h b/matrix.h index fc120ce..d460731 100644 --- a/matrix.h +++ b/matrix.h @@ -12,6 +12,19 @@ void matrix_free(Matrix* matrix); void matrix_print(Matrix *matrix); Matrix* matrix_copy(Matrix *matrix); +// TODO: +void matrix_save(Matrix* matrix, char* file_string); +Matrix* matrix_load(char* file_string); +void matrix_randomize(Matrix* matrix, int n); // don't understand the usage of the n +int matrix_argmax(Matrix* matrix); +Matrix* matrix_flatten(Matrix* matrix, int axis); + +/* + * These methods won't change or free the input matrix. + * It creates a new matrix, which is modified and then returned. + * If we don't need the original matrix, we should consider just changing the original matrix and changing the method signature to void. + */ + // mathematical functions Matrix* multiply(Matrix* matrix1, Matrix* matrix2); Matrix* add(Matrix* matrix1, Matrix* matrix2);