forked from freudenreichan/info2Praktikum-NeuronalesNetz
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2761ee453a | ||
|
|
355fd11e2a |
No files matched your search
@@ -6,11 +6,23 @@
|
||||
|
||||
Matrix createMatrix(unsigned int rows, unsigned int cols)
|
||||
{
|
||||
Matrix matrix;
|
||||
|
||||
matrix.anzahlSpalten = cols;
|
||||
matrix.anzahlZeilen = rows;
|
||||
|
||||
matrix.buffer = mallloc(cols*rows*(sizeof(Matrix)));
|
||||
|
||||
return matrix;
|
||||
|
||||
}
|
||||
|
||||
void clearMatrix(Matrix *matrix)
|
||||
{
|
||||
free(matrix->buffer);
|
||||
|
||||
matrix->buffer = NULL;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,22 @@
|
||||
#define MATRIX_H
|
||||
|
||||
#define UNDEFINED_MATRIX_VALUE 0
|
||||
#define M 100
|
||||
|
||||
typedef float MatrixType;
|
||||
|
||||
|
||||
// TODO Matrixtyp definieren
|
||||
|
||||
typedef struct
|
||||
{
|
||||
MatrixType* buffer;
|
||||
int anzahlZeilen;
|
||||
int anzahlSpalten;
|
||||
|
||||
|
||||
} Matrix;
|
||||
|
||||
|
||||
Matrix createMatrix(unsigned int rows, unsigned int cols);
|
||||
void clearMatrix(Matrix *matrix);
|
||||
|
||||
Reference in new issue
Block a user