forked from freudenreichan/info2Praktikum-NeuronalesNetz
Compare commits
No commits in common. "28944bd87107bd77bcac432cf08f28cb44c88bcb" and "41c164d3b2b1b19b91eaea8f1fda8d3c23452389" have entirely different histories.
28944bd871
...
41c164d3b2
5
matrix.c
5
matrix.c
@ -6,13 +6,12 @@
|
|||||||
|
|
||||||
Matrix createMatrix(unsigned int rows, unsigned int cols)
|
Matrix createMatrix(unsigned int rows, unsigned int cols)
|
||||||
{
|
{
|
||||||
MatrixType* data = malloc(rows * cols * sizeof(MatrixType));
|
|
||||||
Matrix newMatrix = {rows, cols, data};
|
|
||||||
return newMatrix;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearMatrix(Matrix *matrix)
|
void clearMatrix(Matrix *matrix)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setMatrixAt(MatrixType value, Matrix matrix, unsigned int rowIdx, unsigned int colIdx)
|
void setMatrixAt(MatrixType value, Matrix matrix, unsigned int rowIdx, unsigned int colIdx)
|
||||||
|
|||||||
6
matrix.h
6
matrix.h
@ -6,12 +6,6 @@
|
|||||||
typedef float MatrixType;
|
typedef float MatrixType;
|
||||||
|
|
||||||
// TODO Matrixtyp definieren
|
// TODO Matrixtyp definieren
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
unsigned int rows;
|
|
||||||
unsigned int cols;
|
|
||||||
MatrixType *data;
|
|
||||||
} Matrix;
|
|
||||||
|
|
||||||
|
|
||||||
Matrix createMatrix(unsigned int rows, unsigned int cols);
|
Matrix createMatrix(unsigned int rows, unsigned int cols);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user