Skip to content

Commit

Permalink
refactor(bsseq): make initializations one line when same type
Browse files Browse the repository at this point in the history
  • Loading branch information
jamespeapen committed Aug 8, 2024
1 parent 7e3acaf commit ea88c91
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/bsseq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
#include "../inst/include/iscream_types.h"

typedef struct CpG {
int chr;
int start;
int chr, start;
} CpG;

static kh_inline khint_t kh_eq_cpg(CpG a, CpG b) {
Expand Down Expand Up @@ -50,10 +49,7 @@ class BS {
khmap_t *cpg_map;

bool is_merged;
int n_intervals;
int n_cpgs;
int chr_id;
int n_samples;
int n_intervals, n_cpgs, chr_id, n_samples;
Rcpp::CharacterVector seqnames;
Rcpp::IntegerVector start;
std::vector<std::string> sample_names;
Expand All @@ -66,8 +62,7 @@ class BS {
void print_mat(std::vector<std::vector<int>>& matrix, const std::string& matrix_name);
void print_BS();

arma::umat cov_mat;
arma::umat m_mat;
arma::umat cov_mat, m_mat;
Rcpp::List assays;
Rcpp::S4 wrap() {
Rcpp::Function BSseq("BSseq", Rcpp::Environment::namespace_env("bsseq"));
Expand Down

0 comments on commit ea88c91

Please sign in to comment.