From fc2b14d0e058dc2bfa7c6fa776c2b44dcf0d5a8c Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 9 Nov 2026 09:21:41 +0100 Subject: [PATCH] matrix.h erstellt --- Startcode/matrix.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Startcode/matrix.h b/Startcode/matrix.h index cc640d1..9f8bca4 100644 --- a/Startcode/matrix.h +++ b/Startcode/matrix.h @@ -6,7 +6,12 @@ typedef float MatrixType; // TODO Matrixtyp definieren - +typedef struct Matrix +{ + unsigned int rows; + unsigned int cols; + MatrixType *data; +} Matrix; Matrix createMatrix(unsigned int rows, unsigned int cols); void clearMatrix(Matrix *matrix); @@ -15,5 +20,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