#include <stdio.h>

#include "matrix_lib.h"

int main(int argc, char** argv) {
    Matrix a = newMatrix(3, 3);
    Matrix b = newMatrix(3, 3);

    for (size_t row = 0; row < a.height; ++row) {
        for (size_t column = 0; column < a.width; ++column) {
            a.rows[row][column] = 1;
        }
    }

    for (size_t row = 0; row < b.height; ++row) {
        for (size_t column = 0; column < b.width; ++column) {
            b.rows[row][column] = row*column;
        }
    }

    Matrix sum = addMatrix(a, b);

    printf("Sum of matrix\n");
    printMatrix(a);
    printf("And matrix\n");
    printMatrix(b);
    printf("Is matrix\n");
    printMatrix(sum);

    Matrix dot = dotProduct(a, b);
    printf("Dot product is matrix\n");
    printMatrix(dot);

    freeMatrix(a);
    freeMatrix(b);
    freeMatrix(sum);
    freeMatrix(dot);

    return 0;
}

