forked from freudenreichan/info2Praktikum-NeuronalesNetz
fkt multiply verändert
This commit is contained in:
1 parent
205513f901
commit
c0f73f9362
1 file changed
+1
-1
+1
-1
@@ -121,7 +121,7 @@ Matrix multiply(const Matrix matrix1, const Matrix matrix2)
|
|||||||
for (unsigned int j = 0; j < matrix2.cols; j++) {
|
for (unsigned int j = 0; j < matrix2.cols; j++) {
|
||||||
MatrixType sum = 0;
|
MatrixType sum = 0;
|
||||||
for (unsigned int k = 0; k < matrix1.cols; k++) {
|
for (unsigned int k = 0; k < matrix1.cols; k++) {
|
||||||
sum += getMatrixAt(matrix1, i, j) * getMatrixAt(matrix2, k, j);
|
sum += getMatrixAt(matrix1, i, k) * getMatrixAt(matrix2, k, j);
|
||||||
}
|
}
|
||||||
setMatrixAt(sum, resultMatrix, i, j);
|
setMatrixAt(sum, resultMatrix, i, j);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user