@@ -50,7 +50,7 @@ void impute_missing_values_for_graphical_model (
5050 const arma::uvec& is_ordinal_variable,
5151 const arma::ivec& reference_category,
5252 arma::imat& sufficient_pairwise,
53- dqrng::xoshiro256plus & rng
53+ SafeRNG & rng
5454) {
5555 const int num_variables = observations.n_cols ;
5656 const int num_missings = missing_index.n_rows ;
@@ -193,7 +193,7 @@ double find_reasonable_initial_step_size(
193193 const double interaction_scale,
194194 const double target_acceptance,
195195 const arma::imat& sufficient_pairwise,
196- dqrng::xoshiro256plus & rng
196+ SafeRNG & rng
197197) {
198198 arma::vec theta = vectorize_model_parameters (
199199 main_effects, pairwise_effects, inclusion_indicator,
@@ -278,7 +278,7 @@ void update_main_effects_with_metropolis (
278278 arma::mat& proposal_sd_main,
279279 RWMAdaptationController& adapter,
280280 const int iteration,
281- dqrng::xoshiro256plus & rng
281+ SafeRNG & rng
282282) {
283283 const int num_vars = observations.n_cols ;
284284 arma::umat index_mask_main = arma::ones<arma::umat>(proposal_sd_main.n_rows , proposal_sd_main.n_cols );
@@ -381,7 +381,7 @@ void update_pairwise_effects_with_metropolis (
381381 const arma::ivec& reference_category,
382382 const int iteration,
383383 const arma::imat& sufficient_pairwise,
384- dqrng::xoshiro256plus & rng
384+ SafeRNG & rng
385385) {
386386 arma::mat accept_prob_pairwise = arma::zeros<arma::mat>(num_variables, num_variables);
387387 arma::umat index_mask_pairwise = arma::zeros<arma::umat>(num_variables, num_variables);
@@ -478,7 +478,7 @@ void update_parameters_with_hmc(
478478 HMCAdaptationController& adapt,
479479 const bool learn_mass_matrix,
480480 const bool selection,
481- dqrng::xoshiro256plus & rng
481+ SafeRNG & rng
482482) {
483483 arma::vec current_state = vectorize_model_parameters (
484484 main_effects, pairwise_effects, inclusion_indicator,
@@ -587,7 +587,7 @@ SamplerResult update_parameters_with_nuts(
587587 HMCAdaptationController& adapt,
588588 const bool learn_mass_matrix,
589589 const bool selection,
590- dqrng::xoshiro256plus & rng
590+ SafeRNG & rng
591591) {
592592 arma::vec current_state = vectorize_model_parameters (
593593 main_effects, pairwise_effects, inclusion_indicator,
@@ -668,7 +668,7 @@ void tune_pairwise_proposal_sd(
668668 const arma::imat& sufficient_pairwise,
669669 int iteration,
670670 const WarmupSchedule& sched,
671- dqrng::xoshiro256plus & rng,
671+ SafeRNG & rng,
672672 double target_accept = 0.44 ,
673673 double rm_decay = 0.75
674674)
@@ -762,7 +762,7 @@ void update_indicator_interaction_pair_with_metropolis (
762762 const arma::uvec& is_ordinal_variable,
763763 const arma::ivec& reference_category,
764764 const arma::imat& sufficient_pairwise,
765- dqrng::xoshiro256plus & rng
765+ SafeRNG & rng
766766) {
767767 for (int cntr = 0 ; cntr < num_interactions; cntr++) {
768768 const int variable1 = index (cntr, 1 );
@@ -912,7 +912,7 @@ void gibbs_update_step_for_graphical_model_parameters (
912912 arma::ivec& treedepth_samples,
913913 arma::ivec& divergent_samples,
914914 arma::vec& energy_samples,
915- dqrng::xoshiro256plus & rng
915+ SafeRNG & rng
916916) {
917917
918918 // Step 0: Initialise random graph structure when edge_selection = TRUE
@@ -1071,7 +1071,7 @@ Rcpp::List run_gibbs_sampler_for_bgm(
10711071 const int hmc_num_leapfrogs,
10721072 const int nuts_max_depth,
10731073 const bool learn_mass_matrix,
1074- dqrng::xoshiro256plus & rng
1074+ SafeRNG & rng
10751075) {
10761076 // --- Setup: dimensions and storage structures
10771077 const int num_variables = observations.n_cols ;
@@ -1176,8 +1176,8 @@ Rcpp::List run_gibbs_sampler_for_bgm(
11761176 for (int iteration = 0 ; iteration < total_iter; iteration++) {
11771177 if (iteration % print_every == 0 ) {
11781178 tbb::mutex::scoped_lock lock (get_print_mutex ());
1179- // Rcpp::Rcout
11801179 std::cout
1180+ // Rcpp::Rcout
11811181 << " [bgm] chain " << chain_id
11821182 << " iteration " << iteration
11831183 << " / " << total_iter
0 commit comments