Skip to content

Commit

Permalink
fix b_data bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaperju committed Aug 16, 2024
1 parent 5e49904 commit b281839
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/random_walks/uniform_accelerated_billiard_walk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,11 @@ struct AcceleratedBilliardWalk
NT T;
const NT dl = 0.995;
int it;
typename Point::Coeff b;
NT* b_data;
if constexpr (std::is_same<MT, Eigen::SparseMatrix<NT, Eigen::RowMajor>>::value) {
typename Point::Coeff b = P.get_vec();
NT* b_data = b.data();
b = P.get_vec();
b_data = b.data();
}

for (auto j=0u; j<walk_length; ++j)
Expand Down

0 comments on commit b281839

Please sign in to comment.