Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/consensus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ using namespace Rcpp;
#include "../inst/include/TreeTools/ClusterTable.h" /* for ClusterTable */

#include <algorithm> /* for fill */
#include <chrono>
#include <thread>
using namespace std::chrono_literals;
#include <array> /* for array */
#include <vector> /* for vector */

Expand All @@ -19,7 +22,7 @@ RawMatrix consensus_tree(const List trees, const NumericVector p) {
int16 w = 0;
int16 L, R, N, W;
int16 L_j, R_j, N_j, W_j;

std::this_thread::sleep_for(10ms);
const int32 n_trees = trees.length();
const int32 frac_thresh = int32(n_trees * p[0]) + 1;
const int32 thresh = frac_thresh > n_trees ? n_trees : frac_thresh;
Expand Down
Loading