diff --git a/src/phangorn_utils.cpp b/src/phangorn_utils.cpp index de7e80d0..d8f3dde0 100644 --- a/src/phangorn_utils.cpp +++ b/src/phangorn_utils.cpp @@ -88,14 +88,14 @@ int countCycle_cpp(IntegerMatrix M){ // [[Rcpp::export]] IntegerVector countCycle2_cpp(IntegerMatrix M){ int tmp; - int l = M.nrow(); - int m = M.ncol(); + size_t l = M.nrow(); + size_t m = M.ncol(); IntegerVector res(l); - for (int i=0; i left, std::vector right, int h, NumericVector nh, int nTips, NumericVector dm){ +void copheneticHelpCpp(std::vector left, std::vector right, size_t h, NumericVector nh, int nTips, NumericVector dm){ int ind; for(std::size_t i=0; i > bip = bipCPP(edge, nTips); NumericVector dm( nTips * (nTips-1) /2 ); int l=0, left, right; - for(int h=nNode; h<(nNode + nTips); h++){ + for(size_t h=nNode; h<(nNode + nTips); h++){ // changed from NumericVector to IntegerVector IntegerVector tmp_ch = ch[h]; l = tmp_ch.size();