-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathRcppExports.cpp
More file actions
536 lines (529 loc) · 24.6 KB
/
RcppExports.cpp
File metadata and controls
536 lines (529 loc) · 24.6 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include "../inst/include/TreeTools.h"
#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
// ClusterTable_new
SEXP ClusterTable_new(Rcpp::List phylo);
RcppExport SEXP _TreeTools_ClusterTable_new(SEXP phyloSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::List >::type phylo(phyloSEXP);
rcpp_result_gen = Rcpp::wrap(ClusterTable_new(phylo));
return rcpp_result_gen;
END_RCPP
}
// ClusterTable_matrix
Rcpp::IntegerMatrix ClusterTable_matrix(SEXP xp);
RcppExport SEXP _TreeTools_ClusterTable_matrix(SEXP xpSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< SEXP >::type xp(xpSEXP);
rcpp_result_gen = Rcpp::wrap(ClusterTable_matrix(xp));
return rcpp_result_gen;
END_RCPP
}
// ClusterTable_decode
Rcpp::IntegerVector ClusterTable_decode(SEXP xp);
RcppExport SEXP _TreeTools_ClusterTable_decode(SEXP xpSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< SEXP >::type xp(xpSEXP);
rcpp_result_gen = Rcpp::wrap(ClusterTable_decode(xp));
return rcpp_result_gen;
END_RCPP
}
// ape_neworder_phylo
IntegerVector ape_neworder_phylo(IntegerVector n_tips, IntegerVector parent, IntegerVector child, IntegerVector n_edges, IntegerVector order);
RcppExport SEXP _TreeTools_ape_neworder_phylo(SEXP n_tipsSEXP, SEXP parentSEXP, SEXP childSEXP, SEXP n_edgesSEXP, SEXP orderSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< IntegerVector >::type n_tips(n_tipsSEXP);
Rcpp::traits::input_parameter< IntegerVector >::type parent(parentSEXP);
Rcpp::traits::input_parameter< IntegerVector >::type child(childSEXP);
Rcpp::traits::input_parameter< IntegerVector >::type n_edges(n_edgesSEXP);
Rcpp::traits::input_parameter< IntegerVector >::type order(orderSEXP);
rcpp_result_gen = Rcpp::wrap(ape_neworder_phylo(n_tips, parent, child, n_edges, order));
return rcpp_result_gen;
END_RCPP
}
// ape_neworder_pruningwise
IntegerVector ape_neworder_pruningwise(IntegerVector n_tips, IntegerVector n_node, IntegerVector parent, IntegerVector child, IntegerVector n_edges);
RcppExport SEXP _TreeTools_ape_neworder_pruningwise(SEXP n_tipsSEXP, SEXP n_nodeSEXP, SEXP parentSEXP, SEXP childSEXP, SEXP n_edgesSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< IntegerVector >::type n_tips(n_tipsSEXP);
Rcpp::traits::input_parameter< IntegerVector >::type n_node(n_nodeSEXP);
Rcpp::traits::input_parameter< IntegerVector >::type parent(parentSEXP);
Rcpp::traits::input_parameter< IntegerVector >::type child(childSEXP);
Rcpp::traits::input_parameter< IntegerVector >::type n_edges(n_edgesSEXP);
rcpp_result_gen = Rcpp::wrap(ape_neworder_pruningwise(n_tips, n_node, parent, child, n_edges));
return rcpp_result_gen;
END_RCPP
}
// as_newick
CharacterVector as_newick(const IntegerMatrix edge);
RcppExport SEXP _TreeTools_as_newick(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(as_newick(edge));
return rcpp_result_gen;
END_RCPP
}
// split_frequencies
List split_frequencies(const List trees);
RcppExport SEXP _TreeTools_split_frequencies(SEXP treesSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const List >::type trees(treesSEXP);
rcpp_result_gen = Rcpp::wrap(split_frequencies(trees));
return rcpp_result_gen;
END_RCPP
}
// consensus_tree
RawMatrix consensus_tree(const List trees, const NumericVector p);
RcppExport SEXP _TreeTools_consensus_tree(SEXP treesSEXP, SEXP pSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const List >::type trees(treesSEXP);
Rcpp::traits::input_parameter< const NumericVector >::type p(pSEXP);
rcpp_result_gen = Rcpp::wrap(consensus_tree(trees, p));
return rcpp_result_gen;
END_RCPP
}
// descendant_edges
LogicalMatrix descendant_edges(const IntegerVector parent, const IntegerVector child, const IntegerVector postorder);
RcppExport SEXP _TreeTools_descendant_edges(SEXP parentSEXP, SEXP childSEXP, SEXP postorderSEXP) {
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 IntegerVector >::type postorder(postorderSEXP);
rcpp_result_gen = Rcpp::wrap(descendant_edges(parent, child, postorder));
return rcpp_result_gen;
END_RCPP
}
// descendant_edges_single
LogicalVector descendant_edges_single(const IntegerVector parent, const IntegerVector child, const IntegerVector postorder, const int edge_index, const bool include_self);
RcppExport SEXP _TreeTools_descendant_edges_single(SEXP parentSEXP, SEXP childSEXP, SEXP postorderSEXP, SEXP edge_indexSEXP, SEXP include_selfSEXP) {
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 IntegerVector >::type postorder(postorderSEXP);
Rcpp::traits::input_parameter< const int >::type edge_index(edge_indexSEXP);
Rcpp::traits::input_parameter< const bool >::type include_self(include_selfSEXP);
rcpp_result_gen = Rcpp::wrap(descendant_edges_single(parent, child, postorder, edge_index, include_self));
return rcpp_result_gen;
END_RCPP
}
// descendant_tips
LogicalMatrix descendant_tips(const IntegerVector parent, const IntegerVector child, const IntegerVector postorder);
RcppExport SEXP _TreeTools_descendant_tips(SEXP parentSEXP, SEXP childSEXP, SEXP postorderSEXP) {
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 IntegerVector >::type postorder(postorderSEXP);
rcpp_result_gen = Rcpp::wrap(descendant_tips(parent, child, postorder));
return rcpp_result_gen;
END_RCPP
}
// first_matching_split_pair
IntegerVector first_matching_split_pair(const RawMatrix x, const RawMatrix table);
RcppExport SEXP _TreeTools_first_matching_split_pair(SEXP xSEXP, SEXP tableSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const RawMatrix >::type x(xSEXP);
Rcpp::traits::input_parameter< const RawMatrix >::type table(tableSEXP);
rcpp_result_gen = Rcpp::wrap(first_matching_split_pair(x, table));
return rcpp_result_gen;
END_RCPP
}
// first_matching_split_index
int first_matching_split_index(const RawMatrix x, const RawMatrix table);
RcppExport SEXP _TreeTools_first_matching_split_index(SEXP xSEXP, SEXP tableSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const RawMatrix >::type x(xSEXP);
Rcpp::traits::input_parameter< const RawMatrix >::type table(tableSEXP);
rcpp_result_gen = Rcpp::wrap(first_matching_split_index(x, table));
return rcpp_result_gen;
END_RCPP
}
// num_to_parent
IntegerVector num_to_parent(const IntegerVector n, const IntegerVector nTip);
RcppExport SEXP _TreeTools_num_to_parent(SEXP nSEXP, SEXP nTipSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const IntegerVector >::type n(nSEXP);
Rcpp::traits::input_parameter< const IntegerVector >::type nTip(nTipSEXP);
rcpp_result_gen = Rcpp::wrap(num_to_parent(n, nTip));
return rcpp_result_gen;
END_RCPP
}
// random_parent
IntegerVector random_parent(const IntegerVector nTip, const IntegerVector seed);
RcppExport SEXP _TreeTools_random_parent(SEXP nTipSEXP, SEXP seedSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const IntegerVector >::type nTip(nTipSEXP);
Rcpp::traits::input_parameter< const IntegerVector >::type seed(seedSEXP);
rcpp_result_gen = Rcpp::wrap(random_parent(nTip, seed));
return rcpp_result_gen;
END_RCPP
}
// edge_to_num
IntegerVector edge_to_num(const IntegerVector& parent, const IntegerVector& child, const IntegerVector& nTip);
RcppExport SEXP _TreeTools_edge_to_num(SEXP parentSEXP, SEXP childSEXP, SEXP nTipSEXP) {
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 IntegerVector& >::type nTip(nTipSEXP);
rcpp_result_gen = Rcpp::wrap(edge_to_num(parent, child, nTip));
return rcpp_result_gen;
END_RCPP
}
// edge_to_mixed_base
IntegerVector edge_to_mixed_base(const IntegerVector parent, const IntegerVector child, const IntegerVector nTip);
RcppExport SEXP _TreeTools_edge_to_mixed_base(SEXP parentSEXP, SEXP childSEXP, SEXP nTipSEXP) {
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 IntegerVector >::type nTip(nTipSEXP);
rcpp_result_gen = Rcpp::wrap(edge_to_mixed_base(parent, child, nTip));
return rcpp_result_gen;
END_RCPP
}
// mixed_base_to_parent
IntegerVector mixed_base_to_parent(const IntegerVector n, const IntegerVector nTip);
RcppExport SEXP _TreeTools_mixed_base_to_parent(SEXP nSEXP, SEXP nTipSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const IntegerVector >::type n(nSEXP);
Rcpp::traits::input_parameter< const IntegerVector >::type nTip(nTipSEXP);
rcpp_result_gen = Rcpp::wrap(mixed_base_to_parent(n, nTip));
return rcpp_result_gen;
END_RCPP
}
// kept_vertices
IntegerVector kept_vertices(const IntegerMatrix edge, const LogicalVector kept);
RcppExport SEXP _TreeTools_kept_vertices(SEXP edgeSEXP, SEXP keptSEXP) {
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 kept(keptSEXP);
rcpp_result_gen = Rcpp::wrap(kept_vertices(edge, kept));
return rcpp_result_gen;
END_RCPP
}
// minimum_spanning_tree
IntegerMatrix minimum_spanning_tree(const IntegerVector order);
RcppExport SEXP _TreeTools_minimum_spanning_tree(SEXP orderSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const IntegerVector >::type order(orderSEXP);
rcpp_result_gen = Rcpp::wrap(minimum_spanning_tree(order));
return rcpp_result_gen;
END_RCPP
}
// n_cherries_wrapper
Rcpp::IntegerVector n_cherries_wrapper(const Rcpp::IntegerVector parent, const Rcpp::IntegerVector child, const int nTip);
RcppExport SEXP _TreeTools_n_cherries_wrapper(SEXP parentSEXP, SEXP childSEXP, SEXP nTipSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::IntegerVector >::type parent(parentSEXP);
Rcpp::traits::input_parameter< const Rcpp::IntegerVector >::type child(childSEXP);
Rcpp::traits::input_parameter< const int >::type nTip(nTipSEXP);
rcpp_result_gen = Rcpp::wrap(n_cherries_wrapper(parent, child, nTip));
return rcpp_result_gen;
END_RCPP
}
// path_lengths
NumericMatrix path_lengths(const IntegerMatrix edge, const DoubleVector weight, const LogicalVector init_nas);
RcppExport SEXP _TreeTools_path_lengths(SEXP edgeSEXP, SEXP weightSEXP, SEXP init_nasSEXP) {
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 DoubleVector >::type weight(weightSEXP);
Rcpp::traits::input_parameter< const LogicalVector >::type init_nas(init_nasSEXP);
rcpp_result_gen = Rcpp::wrap(path_lengths(edge, weight, init_nas));
return rcpp_result_gen;
END_RCPP
}
// cpp_edge_to_splits
Rcpp::RawMatrix cpp_edge_to_splits(const Rcpp::IntegerMatrix& edge, const Rcpp::IntegerVector& order, const Rcpp::IntegerVector& nTip);
RcppExport SEXP _TreeTools_cpp_edge_to_splits(SEXP edgeSEXP, SEXP orderSEXP, SEXP nTipSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::IntegerMatrix& >::type edge(edgeSEXP);
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type order(orderSEXP);
Rcpp::traits::input_parameter< const Rcpp::IntegerVector& >::type nTip(nTipSEXP);
rcpp_result_gen = Rcpp::wrap(cpp_edge_to_splits(edge, order, nTip));
return rcpp_result_gen;
END_RCPP
}
// duplicated_splits
LogicalVector duplicated_splits(const RawMatrix splits, const LogicalVector fromLast);
RcppExport SEXP _TreeTools_duplicated_splits(SEXP splitsSEXP, SEXP fromLastSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const RawMatrix >::type splits(splitsSEXP);
Rcpp::traits::input_parameter< const LogicalVector >::type fromLast(fromLastSEXP);
rcpp_result_gen = Rcpp::wrap(duplicated_splits(splits, fromLast));
return rcpp_result_gen;
END_RCPP
}
// mask_splits
RawMatrix mask_splits(RawMatrix x);
RcppExport SEXP _TreeTools_mask_splits(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< RawMatrix >::type x(xSEXP);
rcpp_result_gen = Rcpp::wrap(mask_splits(x));
return rcpp_result_gen;
END_RCPP
}
// not_splits
RawMatrix not_splits(const RawMatrix x);
RcppExport SEXP _TreeTools_not_splits(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const RawMatrix >::type x(xSEXP);
rcpp_result_gen = Rcpp::wrap(not_splits(x));
return rcpp_result_gen;
END_RCPP
}
// xor_splits
RawMatrix xor_splits(const RawMatrix x, const RawMatrix y);
RcppExport SEXP _TreeTools_xor_splits(SEXP xSEXP, SEXP ySEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const RawMatrix >::type x(xSEXP);
Rcpp::traits::input_parameter< const RawMatrix >::type y(ySEXP);
rcpp_result_gen = Rcpp::wrap(xor_splits(x, y));
return rcpp_result_gen;
END_RCPP
}
// and_splits
RawMatrix and_splits(const RawMatrix x, const RawMatrix y);
RcppExport SEXP _TreeTools_and_splits(SEXP xSEXP, SEXP ySEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const RawMatrix >::type x(xSEXP);
Rcpp::traits::input_parameter< const RawMatrix >::type y(ySEXP);
rcpp_result_gen = Rcpp::wrap(and_splits(x, y));
return rcpp_result_gen;
END_RCPP
}
// or_splits
RawMatrix or_splits(const RawMatrix x, const RawMatrix y);
RcppExport SEXP _TreeTools_or_splits(SEXP xSEXP, SEXP ySEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const RawMatrix >::type x(xSEXP);
Rcpp::traits::input_parameter< const RawMatrix >::type y(ySEXP);
rcpp_result_gen = Rcpp::wrap(or_splits(x, y));
return rcpp_result_gen;
END_RCPP
}
// split_consistent
Rcpp::List split_consistent(const RawMatrix needle, const Rcpp::List haystacks, const LogicalVector invert);
RcppExport SEXP _TreeTools_split_consistent(SEXP needleSEXP, SEXP haystacksSEXP, SEXP invertSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const RawMatrix >::type needle(needleSEXP);
Rcpp::traits::input_parameter< const Rcpp::List >::type haystacks(haystacksSEXP);
Rcpp::traits::input_parameter< const LogicalVector >::type invert(invertSEXP);
rcpp_result_gen = Rcpp::wrap(split_consistent(needle, haystacks, invert));
return rcpp_result_gen;
END_RCPP
}
// thin_splits
RawMatrix thin_splits(const RawMatrix splits, const LogicalVector drop);
RcppExport SEXP _TreeTools_thin_splits(SEXP splitsSEXP, SEXP dropSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const RawMatrix >::type splits(splitsSEXP);
Rcpp::traits::input_parameter< const LogicalVector >::type drop(dropSEXP);
rcpp_result_gen = Rcpp::wrap(thin_splits(splits, drop));
return rcpp_result_gen;
END_RCPP
}
// pack_splits_logical
RawMatrix pack_splits_logical(LogicalMatrix x);
RcppExport SEXP _TreeTools_pack_splits_logical(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< LogicalMatrix >::type x(xSEXP);
rcpp_result_gen = Rcpp::wrap(pack_splits_logical(x));
return rcpp_result_gen;
END_RCPP
}
// pack_splits_logical_vec
RawMatrix pack_splits_logical_vec(LogicalVector x);
RcppExport SEXP _TreeTools_pack_splits_logical_vec(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< LogicalVector >::type x(xSEXP);
rcpp_result_gen = Rcpp::wrap(pack_splits_logical_vec(x));
return rcpp_result_gen;
END_RCPP
}
// cpp_count_splits
int cpp_count_splits(const Rcpp::IntegerMatrix& edge, const int nTip);
RcppExport SEXP _TreeTools_cpp_count_splits(SEXP edgeSEXP, SEXP nTipSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Rcpp::IntegerMatrix& >::type edge(edgeSEXP);
Rcpp::traits::input_parameter< const int >::type nTip(nTipSEXP);
rcpp_result_gen = Rcpp::wrap(cpp_count_splits(edge, nTip));
return rcpp_result_gen;
END_RCPP
}
// splits_to_edge
IntegerMatrix splits_to_edge(const RawMatrix splits, const IntegerVector nTip);
RcppExport SEXP _TreeTools_splits_to_edge(SEXP splitsSEXP, SEXP nTipSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const RawMatrix >::type splits(splitsSEXP);
Rcpp::traits::input_parameter< const IntegerVector >::type nTip(nTipSEXP);
rcpp_result_gen = Rcpp::wrap(splits_to_edge(splits, nTip));
return rcpp_result_gen;
END_RCPP
}
// tips_in_splits
Rcpp::IntegerVector tips_in_splits(Rcpp::RawMatrix splits);
RcppExport SEXP _TreeTools_tips_in_splits(SEXP splitsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::RawMatrix >::type splits(splitsSEXP);
rcpp_result_gen = Rcpp::wrap(tips_in_splits(splits));
return rcpp_result_gen;
END_RCPP
}
// edge_to_rooted_shape
IntegerVector edge_to_rooted_shape(IntegerVector parent, IntegerVector child, IntegerVector nTip);
RcppExport SEXP _TreeTools_edge_to_rooted_shape(SEXP parentSEXP, SEXP childSEXP, SEXP nTipSEXP) {
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 child(childSEXP);
Rcpp::traits::input_parameter< IntegerVector >::type nTip(nTipSEXP);
rcpp_result_gen = Rcpp::wrap(edge_to_rooted_shape(parent, child, nTip));
return rcpp_result_gen;
END_RCPP
}
// rooted_shape_to_edge
IntegerMatrix rooted_shape_to_edge(IntegerVector shape, IntegerVector nTip);
RcppExport SEXP _TreeTools_rooted_shape_to_edge(SEXP shapeSEXP, SEXP nTipSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< IntegerVector >::type shape(shapeSEXP);
Rcpp::traits::input_parameter< IntegerVector >::type nTip(nTipSEXP);
rcpp_result_gen = Rcpp::wrap(rooted_shape_to_edge(shape, nTip));
return rcpp_result_gen;
END_RCPP
}
RcppExport SEXP _TreeTools_keep_tip(SEXP, SEXP);
RcppExport SEXP _TreeTools_postorder_order(SEXP);
RcppExport SEXP _TreeTools_preorder_edges_and_nodes(SEXP, SEXP);
RcppExport SEXP _TreeTools_preorder_weighted(SEXP, SEXP, SEXP);
RcppExport SEXP _TreeTools_root_binary(SEXP, SEXP);
RcppExport SEXP _TreeTools_root_on_node(SEXP, SEXP);
static const R_CallMethodDef CallEntries[] = {
{"_TreeTools_ClusterTable_new", (DL_FUNC) &_TreeTools_ClusterTable_new, 1},
{"_TreeTools_ClusterTable_matrix", (DL_FUNC) &_TreeTools_ClusterTable_matrix, 1},
{"_TreeTools_ClusterTable_decode", (DL_FUNC) &_TreeTools_ClusterTable_decode, 1},
{"_TreeTools_ape_neworder_phylo", (DL_FUNC) &_TreeTools_ape_neworder_phylo, 5},
{"_TreeTools_ape_neworder_pruningwise", (DL_FUNC) &_TreeTools_ape_neworder_pruningwise, 5},
{"_TreeTools_as_newick", (DL_FUNC) &_TreeTools_as_newick, 1},
{"_TreeTools_split_frequencies", (DL_FUNC) &_TreeTools_split_frequencies, 1},
{"_TreeTools_consensus_tree", (DL_FUNC) &_TreeTools_consensus_tree, 2},
{"_TreeTools_descendant_edges", (DL_FUNC) &_TreeTools_descendant_edges, 3},
{"_TreeTools_descendant_edges_single", (DL_FUNC) &_TreeTools_descendant_edges_single, 5},
{"_TreeTools_descendant_tips", (DL_FUNC) &_TreeTools_descendant_tips, 3},
{"_TreeTools_first_matching_split_pair", (DL_FUNC) &_TreeTools_first_matching_split_pair, 2},
{"_TreeTools_first_matching_split_index", (DL_FUNC) &_TreeTools_first_matching_split_index, 2},
{"_TreeTools_num_to_parent", (DL_FUNC) &_TreeTools_num_to_parent, 2},
{"_TreeTools_random_parent", (DL_FUNC) &_TreeTools_random_parent, 2},
{"_TreeTools_edge_to_num", (DL_FUNC) &_TreeTools_edge_to_num, 3},
{"_TreeTools_edge_to_mixed_base", (DL_FUNC) &_TreeTools_edge_to_mixed_base, 3},
{"_TreeTools_mixed_base_to_parent", (DL_FUNC) &_TreeTools_mixed_base_to_parent, 2},
{"_TreeTools_kept_vertices", (DL_FUNC) &_TreeTools_kept_vertices, 2},
{"_TreeTools_minimum_spanning_tree", (DL_FUNC) &_TreeTools_minimum_spanning_tree, 1},
{"_TreeTools_n_cherries_wrapper", (DL_FUNC) &_TreeTools_n_cherries_wrapper, 3},
{"_TreeTools_path_lengths", (DL_FUNC) &_TreeTools_path_lengths, 3},
{"_TreeTools_cpp_edge_to_splits", (DL_FUNC) &_TreeTools_cpp_edge_to_splits, 3},
{"_TreeTools_duplicated_splits", (DL_FUNC) &_TreeTools_duplicated_splits, 2},
{"_TreeTools_mask_splits", (DL_FUNC) &_TreeTools_mask_splits, 1},
{"_TreeTools_not_splits", (DL_FUNC) &_TreeTools_not_splits, 1},
{"_TreeTools_xor_splits", (DL_FUNC) &_TreeTools_xor_splits, 2},
{"_TreeTools_and_splits", (DL_FUNC) &_TreeTools_and_splits, 2},
{"_TreeTools_or_splits", (DL_FUNC) &_TreeTools_or_splits, 2},
{"_TreeTools_split_consistent", (DL_FUNC) &_TreeTools_split_consistent, 3},
{"_TreeTools_thin_splits", (DL_FUNC) &_TreeTools_thin_splits, 2},
{"_TreeTools_pack_splits_logical", (DL_FUNC) &_TreeTools_pack_splits_logical, 1},
{"_TreeTools_pack_splits_logical_vec", (DL_FUNC) &_TreeTools_pack_splits_logical_vec, 1},
{"_TreeTools_cpp_count_splits", (DL_FUNC) &_TreeTools_cpp_count_splits, 2},
{"_TreeTools_splits_to_edge", (DL_FUNC) &_TreeTools_splits_to_edge, 2},
{"_TreeTools_tips_in_splits", (DL_FUNC) &_TreeTools_tips_in_splits, 1},
{"_TreeTools_edge_to_rooted_shape", (DL_FUNC) &_TreeTools_edge_to_rooted_shape, 3},
{"_TreeTools_rooted_shape_to_edge", (DL_FUNC) &_TreeTools_rooted_shape_to_edge, 2},
{"_TreeTools_keep_tip", (DL_FUNC) &_TreeTools_keep_tip, 2},
{"_TreeTools_postorder_order", (DL_FUNC) &_TreeTools_postorder_order, 1},
{"_TreeTools_preorder_edges_and_nodes", (DL_FUNC) &_TreeTools_preorder_edges_and_nodes, 2},
{"_TreeTools_preorder_weighted", (DL_FUNC) &_TreeTools_preorder_weighted, 3},
{"_TreeTools_root_binary", (DL_FUNC) &_TreeTools_root_binary, 2},
{"_TreeTools_root_on_node", (DL_FUNC) &_TreeTools_root_on_node, 2},
{NULL, NULL, 0}
};
RcppExport void R_init_TreeTools(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}