From f090828e1cd2589f99786cec436b97bf88516855 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 28 Dec 2023 17:59:59 +0100 Subject: [PATCH] Fixed typo in MLPPLinAlg::svd. --- mlpp/lin_alg/lin_alg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mlpp/lin_alg/lin_alg.cpp b/mlpp/lin_alg/lin_alg.cpp index fa1d5aa..910616e 100644 --- a/mlpp/lin_alg/lin_alg.cpp +++ b/mlpp/lin_alg/lin_alg.cpp @@ -854,10 +854,10 @@ MLPPLinAlg::SVDResult MLPPLinAlg::svd(const Ref &A) { Ref singularvals = sqrtnm(left_eigen.eigen_values); Ref sigma = zeromatnm(a_size.y, a_size.x); - Size2i singularvals_size = singularvals->size(); + Size2i sigma_size = sigma->size(); - for (int i = 0; i < singularvals_size.y; ++i) { - for (int j = 0; j < singularvals_size.x; ++j) { + for (int i = 0; i < sigma_size.y; ++i) { + for (int j = 0; j < sigma_size.x; ++j) { sigma->element_set(i, j, singularvals->element_get(i, j)); } }