forked from freudenreichan/info2Praktikum-NeuronalesNetz
matrix pass all tests
This commit is contained in:
@@ -88,7 +88,7 @@ Matrix multiply(const Matrix matrix1, const Matrix matrix2)
|
||||
{
|
||||
Matrix result = {0};
|
||||
|
||||
if (matrix1.rows != matrix2.rows || matrix1.cols != matrix2.cols)
|
||||
if (matrix1.cols != matrix2.rows)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
@@ -106,6 +106,7 @@ Matrix multiply(const Matrix matrix1, const Matrix matrix2)
|
||||
}
|
||||
|
||||
// Matritzenmultiplikation
|
||||
|
||||
for (int r = 0; r < result.rows; r++) // Zeile in Ergebnis
|
||||
{
|
||||
for (int m = 0; m < result.cols; m++) // Spalte in Ergebnis
|
||||
|
||||
Reference in New Issue
Block a user