// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#include <Rcpp.h>

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// bind_tip_core_cpp
List bind_tip_core_cpp(IntegerVector parent, IntegerVector node, NumericVector branch_length, CharacterVector label, LogicalVector is_tip, std::string where, std::string tip_label, std::string node_label_str, double frac, bool new_node_above, double node_height);
RcppExport SEXP _rtrees_bind_tip_core_cpp(SEXP parentSEXP, SEXP nodeSEXP, SEXP branch_lengthSEXP, SEXP labelSEXP, SEXP is_tipSEXP, SEXP whereSEXP, SEXP tip_labelSEXP, SEXP node_label_strSEXP, SEXP fracSEXP, SEXP new_node_aboveSEXP, SEXP node_heightSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type parent(parentSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type node(nodeSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type branch_length(branch_lengthSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type label(labelSEXP);
    Rcpp::traits::input_parameter< LogicalVector >::type is_tip(is_tipSEXP);
    Rcpp::traits::input_parameter< std::string >::type where(whereSEXP);
    Rcpp::traits::input_parameter< std::string >::type tip_label(tip_labelSEXP);
    Rcpp::traits::input_parameter< std::string >::type node_label_str(node_label_strSEXP);
    Rcpp::traits::input_parameter< double >::type frac(fracSEXP);
    Rcpp::traits::input_parameter< bool >::type new_node_above(new_node_aboveSEXP);
    Rcpp::traits::input_parameter< double >::type node_height(node_heightSEXP);
    rcpp_result_gen = Rcpp::wrap(bind_tip_core_cpp(parent, node, branch_length, label, is_tip, where, tip_label, node_label_str, frac, new_node_above, node_height));
    return rcpp_result_gen;
END_RCPP
}
// graft_all_cpp
List graft_all_cpp(IntegerVector parent0, IntegerVector node0, NumericVector bl0, CharacterVector label0, LogicalVector is_tip0, CharacterVector where_labels, CharacterVector new_tip_labels, CharacterVector new_node_labels, NumericVector fracs, LogicalVector above_flags, NumericVector node_heights_vec);
RcppExport SEXP _rtrees_graft_all_cpp(SEXP parent0SEXP, SEXP node0SEXP, SEXP bl0SEXP, SEXP label0SEXP, SEXP is_tip0SEXP, SEXP where_labelsSEXP, SEXP new_tip_labelsSEXP, SEXP new_node_labelsSEXP, SEXP fracsSEXP, SEXP above_flagsSEXP, SEXP node_heights_vecSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type parent0(parent0SEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type node0(node0SEXP);
    Rcpp::traits::input_parameter< NumericVector >::type bl0(bl0SEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type label0(label0SEXP);
    Rcpp::traits::input_parameter< LogicalVector >::type is_tip0(is_tip0SEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type where_labels(where_labelsSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type new_tip_labels(new_tip_labelsSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type new_node_labels(new_node_labelsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type fracs(fracsSEXP);
    Rcpp::traits::input_parameter< LogicalVector >::type above_flags(above_flagsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type node_heights_vec(node_heights_vecSEXP);
    rcpp_result_gen = Rcpp::wrap(graft_all_cpp(parent0, node0, bl0, label0, is_tip0, where_labels, new_tip_labels, new_node_labels, fracs, above_flags, node_heights_vec));
    return rcpp_result_gen;
END_RCPP
}
// fast_internal_offspring_cpp
IntegerVector fast_internal_offspring_cpp(IntegerVector parent, IntegerVector node, LogicalVector is_tip, int root_node);
RcppExport SEXP _rtrees_fast_internal_offspring_cpp(SEXP parentSEXP, SEXP nodeSEXP, SEXP is_tipSEXP, SEXP root_nodeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type parent(parentSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type node(nodeSEXP);
    Rcpp::traits::input_parameter< LogicalVector >::type is_tip(is_tipSEXP);
    Rcpp::traits::input_parameter< int >::type root_node(root_nodeSEXP);
    rcpp_result_gen = Rcpp::wrap(fast_internal_offspring_cpp(parent, node, is_tip, root_node));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_rtrees_bind_tip_core_cpp", (DL_FUNC) &_rtrees_bind_tip_core_cpp, 11},
    {"_rtrees_graft_all_cpp", (DL_FUNC) &_rtrees_graft_all_cpp, 11},
    {"_rtrees_fast_internal_offspring_cpp", (DL_FUNC) &_rtrees_fast_internal_offspring_cpp, 4},
    {NULL, NULL, 0}
};

RcppExport void R_init_rtrees(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}
