Skip to content

Commit

Permalink
Removed old commented code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Allévius committed Aug 2, 2017
1 parent b27f0c7 commit c1aa0d2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/PBPOIscan.h
Expand Up @@ -111,15 +111,12 @@ inline void PBPOIscan::calculate(const int storage_index,
inline void PBPOIscan::simulate_counts() {
Rcpp::NumericVector probs(m_counts.n_cols * m_counts.n_rows);
probs = armaVec2rcppVec(arma::vectorise(m_baselines_orig)) / m_total_count;
// probs = Rcpp::as<Rcpp::NumericVector>(
// Rcpp::wrap(arma::vectorise(m_baselines_orig))) / m_total_count;

arma::uvec vec_counts(m_counts.n_cols * m_counts.n_rows);
vec_counts = rcppIVec2armaVec(
Rcpp::RcppArmadillo::Rf_rmultinom(m_total_count, probs));
// vec_counts = Rcpp::as<arma::uvec>(
// Rcpp::RcppArmadillo::Rf_rmultinom(m_total_count, probs));

// Columns of m_counts should be cumulative sums
for (arma::uword j = 0; j < m_counts.n_cols; ++j) {
m_counts.col(j) = arma::cumsum(
vec_counts.subvec(j * m_counts.n_rows, (j + 1) * m_counts.n_rows - 1));
Expand Down

0 comments on commit c1aa0d2

Please sign in to comment.