generated from freudenreichan/info2Praktikum-NeuronalesNetz
VerbesserungV2_NeuronetzV2_Fertig
This commit is contained in:
1 parent
47c68dda83
commit
03a904f021
1 file changed
+9
-6
@@ -7,12 +7,15 @@
|
||||
|
||||
Matrix createMatrix(unsigned int rows, unsigned int cols)
|
||||
{
|
||||
Matrix m;
|
||||
m.rows = rows;
|
||||
m.cols = cols;
|
||||
/* calloc initialisiert den Speicher mit 0 */
|
||||
m.buffer = (MatrixType*)calloc(rows * cols, sizeof(MatrixType));
|
||||
return m;
|
||||
Matrix m = {NULL,0,0};
|
||||
if (rows > 0 && cols > 0) {
|
||||
m.rows = rows;
|
||||
m.cols = cols;
|
||||
/* calloc initialisiert den Speicher mit 0 */
|
||||
m.buffer = (MatrixType*)calloc(rows * cols, sizeof(MatrixType));
|
||||
}
|
||||
return m;
|
||||
|
||||
}
|
||||
|
||||
void clearMatrix(Matrix *matrix)
|
||||
|
||||
Reference in new issue
Block a user