generated from freudenreichan/info2Praktikum-NeuronalesNetz
Compare commits
2
Commits
13900179a1
...
d745515695
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d745515695 | ||
|
|
5b60de1f17 |
@@ -98,26 +98,19 @@ Matrix multiply(const Matrix matrix1, const Matrix matrix2)
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
Matrix result = createMatrix(matrix1.rows, matrix2.cols);
|
||||
|
||||
|
||||
for (unsigned int i = 0; i < result.rows; i++)
|
||||
{
|
||||
for (unsigned int j = 0; j < result.cols; j++)
|
||||
{
|
||||
|
||||
MatrixType summe = 0;
|
||||
|
||||
for (unsigned int k = 0; k < matrix1.cols; k++)
|
||||
{
|
||||
summe += getMatrixAt(matrix1, i, k) * getMatrixAt(matrix2, k, j);
|
||||
}
|
||||
|
||||
setMatrixAt(summe, result, i, j);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user