From 8a41dc962035dc2e818d179e9e0b779bcdd6d963 Mon Sep 17 00:00:00 2001 From: Karl Pierce Date: Thu, 19 Dec 2024 14:27:06 -0500 Subject: [PATCH] make_random_factor calls fill_random --- btas/generic/cp.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/btas/generic/cp.h b/btas/generic/cp.h index f680a08b..867c1907 100644 --- a/btas/generic/cp.h +++ b/btas/generic/cp.h @@ -525,11 +525,7 @@ namespace btas { template Tensor make_random_factor(ind_t row, ind_t col, Generator gen, Distribution dist){ - Tensor a(row, col); - for (auto iter = a.begin(); iter != a.end(); ++iter) { - *(iter) = dist(gen); - } - return a; + return fill_random(Tensor(row, col), gen, dist); } /// \param[in] factor Which factor matrix to normalize, returns