This implements all functions in matrix.c except multiply(). All tests from matrixTests.c are passing for the implemented functions.

This commit is contained in:
Simon Wiesend
2025-11-09 13:43:06 +01:00
parent 077c6def78
commit 79ad1285b5
3 changed files with 68 additions and 12 deletions
+7 -2
View File
@@ -5,8 +5,14 @@
typedef float MatrixType;
// TODO Matrixtyp definieren
// Matrixtyp
typedef struct Matrix
{
size_t rows;
size_t cols;
MatrixType *buffer;
} Matrix;
Matrix createMatrix(unsigned int rows, unsigned int cols);
void clearMatrix(Matrix *matrix);
@@ -15,5 +21,4 @@ MatrixType getMatrixAt(const Matrix matrix, unsigned int rowIdx, unsigned int co
Matrix add(const Matrix matrix1, const Matrix matrix2);
Matrix multiply(const Matrix matrix1, const Matrix matrix2);
#endif