-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathRcppExports-manual.cpp
More file actions
96 lines (93 loc) · 3.91 KB
/
RcppExports-manual.cpp
File metadata and controls
96 lines (93 loc) · 3.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// These functions are defined in inst/include/TreeTools/ headers rather than
// .cpp files, because downstream packages call them.
// Hence we need to define their wrappers manually here.
// These are still picked up by compileAttributes(); the only maintenance cost
// is that changes to the function signatures must be updated here too.
#include "../inst/include/TreeTools.h"
#include "../inst/include/TreeTools/root_tree.h"
#include "../inst/include/TreeTools/keep_tip.h"
#include <Rcpp/Lightest>
using namespace Rcpp;
using namespace TreeTools;
// keep_tip
RcppExport SEXP _TreeTools_keep_tip(SEXP edgeSEXP, SEXP keepSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const IntegerMatrix >::type edge(edgeSEXP);
Rcpp::traits::input_parameter< const LogicalVector >::type keep(keepSEXP);
rcpp_result_gen = Rcpp::wrap(TreeTools::keep_tip(edge, keep));
return rcpp_result_gen;
END_RCPP
}
// preorder_weighted
RcppExport SEXP _TreeTools_preorder_weighted(SEXP parentSEXP,
SEXP childSEXP,
SEXP lengthsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const IntegerVector >::type parent(parentSEXP);
Rcpp::traits::input_parameter< const IntegerVector >::type child(childSEXP);
Rcpp::traits::input_parameter< const NumericVector >::type weight(lengthsSEXP);
rcpp_result_gen = Rcpp::wrap(TreeTools::preorder_weighted(parent, child, weight));
return rcpp_result_gen;
END_RCPP
}
// preorder_edges_and_nodes
RcppExport SEXP _TreeTools_preorder_edges_and_nodes(SEXP parentSEXP, SEXP childSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const IntegerVector >::type parent(parentSEXP);
Rcpp::traits::input_parameter< const IntegerVector >::type child(childSEXP);
rcpp_result_gen = Rcpp::wrap(TreeTools::preorder_edges_and_nodes(parent, child));
return rcpp_result_gen;
END_RCPP
}
// postorder_order
RcppExport SEXP _TreeTools_postorder_order(SEXP edgeSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const IntegerMatrix >::type edge(edgeSEXP);
rcpp_result_gen = Rcpp::wrap(TreeTools::postorder_order(edge));
return rcpp_result_gen;
END_RCPP
}
// root_binary
IntegerMatrix TreeTools::root_binary(const IntegerMatrix edge, const int outgroup);
RcppExport SEXP _TreeTools_root_binary(SEXP edgeSEXP, SEXP outgroupSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::IntegerMatrix >::type edge(edgeSEXP);
Rcpp::traits::input_parameter< const int >::type outgroup(outgroupSEXP);
rcpp_result_gen = Rcpp::wrap(TreeTools::root_binary(edge, outgroup));
return rcpp_result_gen;
END_RCPP
}
// is_valid_preorder
RcppExport SEXP _TreeTools_is_valid_preorder(SEXP parentSEXP,
SEXP childSEXP,
SEXP nTipSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::traits::input_parameter< const IntegerVector& >::type parent(parentSEXP);
Rcpp::traits::input_parameter< const IntegerVector& >::type child(childSEXP);
Rcpp::traits::input_parameter< int >::type n_tip(nTipSEXP);
rcpp_result_gen = Rcpp::wrap(TreeTools::is_valid_preorder(parent, child, n_tip));
return rcpp_result_gen;
END_RCPP
}
// root_on_node
RcppExport SEXP _TreeTools_root_on_node(SEXP phySEXP, SEXP outgroupSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const List >::type phy(phySEXP);
Rcpp::traits::input_parameter< const int >::type outgroup(outgroupSEXP);
rcpp_result_gen = Rcpp::wrap(TreeTools::root_on_node(phy, outgroup));
return rcpp_result_gen;
END_RCPP
}