generated from freudenreichan/info2Praktikum-NeuronalesNetz
Compare commits
2
Commits
ebc5ff0216
...
7acece0571
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7acece0571 | ||
|
|
44b77815b3 |
@@ -13,12 +13,17 @@ typedef struct Matrix {
|
||||
|
||||
Matrix createMatrix(unsigned int rows, unsigned int cols)
|
||||
{
|
||||
|
||||
Matrix newMatrix;
|
||||
newMatrix.rows = rows;
|
||||
newMatrix.cols = cols;
|
||||
newMatrix.buffer = calloc(rows*cols, sizeof(MatrixType))
|
||||
return newMatrix;
|
||||
}
|
||||
|
||||
void clearMatrix(Matrix *matrix)
|
||||
{
|
||||
|
||||
free(*matrix.buffer);
|
||||
*matrix.buffer = NULL;
|
||||
}
|
||||
|
||||
void setMatrixAt(MatrixType value, Matrix matrix, unsigned int rowIdx, unsigned int colIdx)
|
||||
|
||||
Reference in new issue
Block a user