forked from freudenreichan/info2Praktikum-NeuronalesNetz
added createMatrix() + matrix data type
This commit is contained in:
parent
29b2966c63
commit
28944bd871
5
matrix.c
5
matrix.c
@ -6,12 +6,13 @@
|
|||||||
|
|
||||||
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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user