/*
 * The header file for 2D matrix operations.
 */

#include <stdio.h>

typedef struct Matrix Matrix;
struct Matrix {
    float* data;
    float** rows;
    size_t height;
    size_t width;
};

/*************************************
 * These functions are given to you.
 *************************************/

// Free the memory of a matrix.
void freeMatrix(Matrix);

// Create a string representing the matrix.
// Memory must be freed by the caller.
void printMatrix(Matrix);

// Add two matrices.
Matrix addMatrix(Matrix, Matrix);

/*************************************
 * These are the functions that you
 * must implement yourself.
 *************************************/

// Create a new matrix.
Matrix newMatrix(size_t height, size_t width);

// Read a matrix of unknown size from the FILE*
// You can re-use whatever number reading technique you developed in hw2
// You may also parse the file twice; once to count the numbers and a second time to populate the matrix.
Matrix readMatrix(FILE* datafile);

// Dot product of two matrices
Matrix dotProduct(Matrix, Matrix);

