Skip to content

Commit

Permalink
make_random_factor calls fill_random
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT committed Dec 19, 2024
1 parent 22bf066 commit 8a41dc9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions btas/generic/cp.h
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,7 @@ namespace btas {

template<typename Generator, typename Distribution>
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
Expand Down

0 comments on commit 8a41dc9

Please sign in to comment.