From 51f176e8926a1125044359075a9f0393b89a0f7f Mon Sep 17 00:00:00 2001 From: Mihaela Creciun Date: Thu, 12 Nov 2026 02:00:29 +0100 Subject: [PATCH] Matrix-Struktur definieren --- Startcode/matrix.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Startcode/matrix.h b/Startcode/matrix.h index 4467066..666f4dd 100644 --- a/Startcode/matrix.h +++ b/Startcode/matrix.h @@ -7,11 +7,12 @@ typedef float MatrixType; // TODO Matrixtyp definieren typedef struct { - MatrixType *buffer; unsigned int rows; unsigned int cols; + MatrixType *buffer; // Speichert die Matrixwerte in einem Array, zeigt die Speicheradresse des ersten Matrixwerts im Array } Matrix; + Matrix createMatrix(unsigned int rows, unsigned int cols); void clearMatrix(Matrix *matrix); void setMatrixAt(MatrixType value, Matrix matrix, unsigned int rowIdx, unsigned int colIdx); @@ -20,4 +21,4 @@ Matrix add(const Matrix matrix1, const Matrix matrix2); Matrix multiply(const Matrix matrix1, const Matrix matrix2); -#endif +#endif \ No newline at end of file