Skip to content

Native R and Rcpp random number generation#16

Merged
osorensen merged 5 commits intomainfrom
rng-fix
Apr 10, 2025
Merged

Native R and Rcpp random number generation#16
osorensen merged 5 commits intomainfrom
rng-fix

Conversation

@osorensen
Copy link
Copy Markdown
Owner

No description provided.

@osorensen osorensen requested a review from Copilot April 10, 2025 12:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 4 out of 7 changed files in this pull request and generated no comments.

Files not reviewed (3)
  • R/compute_sequentially.R: Language not supported
  • tests/testthat/test-compute_sequentially_complete.R: Language not supported
  • tests/testthat/test-compute_sequentially_mixtures.R: Language not supported
Comments suppressed due to low confidence (1)

src/rejuvenate.cpp:85

  • The index returned by Rcpp::sample is 1-indexed, which may lead to an off-by-one error when used in zero-indexed contexts. Consider subtracting 1 from the sampled index to ensure consistency.
int proposed_particle_filter = Rcpp::sample(probs.size(), 1, false, probs, false)[0];

@osorensen osorensen merged commit 54c0ede into main Apr 10, 2025
4 checks passed
@osorensen osorensen deleted the rng-fix branch April 10, 2025 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants