From 6445c66edb44fa64998c46b049c2c68890ef1f76 Mon Sep 17 00:00:00 2001 From: richard-allen Date: Wed, 21 Sep 2022 15:47:12 +0100 Subject: [PATCH] Fix initialisation bug in sparse matrix DoTransposeThisAndMultiply operation --- src/Numerics/LinearAlgebra/Double/SparseMatrix.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Numerics/LinearAlgebra/Double/SparseMatrix.cs b/src/Numerics/LinearAlgebra/Double/SparseMatrix.cs index ff9a2f9aa..2ba2edff3 100644 --- a/src/Numerics/LinearAlgebra/Double/SparseMatrix.cs +++ b/src/Numerics/LinearAlgebra/Double/SparseMatrix.cs @@ -1162,6 +1162,7 @@ protected override void DoTransposeAndMultiply(Matrix other, MatrixThe result of the multiplication. protected override void DoTransposeThisAndMultiply(Vector rightSide, Vector result) { + result.Clear(); var rowPointers = _storage.RowPointers; var columnIndices = _storage.ColumnIndices; var values = _storage.Values;