-
Notifications
You must be signed in to change notification settings - Fork 15
/
unifrac_task.hpp
91 lines (89 loc) · 5.96 KB
/
unifrac_task.hpp
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
#include "task_parameters.hpp"
#include <math.h>
#include <vector>
#include <stdint.h>
namespace su {
/* void su::unifrac tasks
*
* all methods utilize the same function signature. that signature is as follows:
*
* dm_stripes vector<double> the stripes of the distance matrix being accumulated
* into for unique branch length
* dm_stripes vector<double> the stripes of the distance matrix being accumulated
* into for total branch length (e.g., to normalize unweighted unifrac)
* embedded_proportions <double*> the proportions vector for a sample, or rather
* the counts vector normalized to 1. this vector is embedded as it is
* duplicated: if A, B and C are proportions for features A, B, and C, the
* vector will look like [A B C A B C].
* length <double> the branch length of the current node to its parent.
* task_p <task_parameters*> task specific parameters.
*/
void _unnormalized_weighted_unifrac_task(std::vector<double*> &__restrict__ dm_stripes,
std::vector<double*> &__restrict__ dm_stripes_total,
double* __restrict__ embedded_proportions,
double length,
const su::task_parameters* task_p);
void _normalized_weighted_unifrac_task(std::vector<double*> &__restrict__ dm_stripes,
std::vector<double*> &__restrict__ dm_stripes_total,
double* __restrict__ embedded_proportions,
double length,
const su::task_parameters* task_p);
void _unweighted_unifrac_task(std::vector<double*> &__restrict__ dm_stripes,
std::vector<double*> &__restrict__ dm_stripes_total,
double* __restrict__ embedded_proportions,
double length,
const su::task_parameters* task_p);
void _generalized_unifrac_task(std::vector<double*> &__restrict__ dm_stripes,
std::vector<double*> &__restrict__ dm_stripes_total,
double* __restrict__ embedded_proportions,
double length,
const su::task_parameters* task_p);
/* void su::unifrac_vaw tasks
*
* all methods utilize the same function signature. that signature is as follows:
*
* dm_stripes vector<double> the stripes of the distance matrix being accumulated
* into for unique branch length
* dm_stripes vector<double> the stripes of the distance matrix being accumulated
* into for total branch length (e.g., to normalize unweighted unifrac)
* embedded_proportions <double*> the proportions vector for a sample, or rather
* the counts vector normalized to 1. this vector is embedded as it is
* duplicated: if A, B and C are proportions for features A, B, and C, the
* vector will look like [A B C A B C].
* embedded_counts <double*> the counts vector embedded in the same way and order as
* embedded_proportions. the values of this array are unnormalized feature
* counts for the subtree.
* sample_total_counts <double*> the total unnormalized feature counts for all samples
* embedded in the same way and order as embedded_proportions.
* length <double> the branch length of the current node to its parent.
* task_p <task_parameters*> task specific parameters.
*/
void _vaw_unnormalized_weighted_unifrac_task(std::vector<double*> &__restrict__ dm_stripes,
std::vector<double*> &__restrict__ dm_stripes_total,
double* __restrict__ embedded_proportions,
double* __restrict__ embedded_counts,
double* __restrict__ sample_total_counts,
double length,
const su::task_parameters* task_p);
void _vaw_normalized_weighted_unifrac_task(std::vector<double*> &__restrict__ dm_stripes,
std::vector<double*> &__restrict__ dm_stripes_total,
double* __restrict__ embedded_proportions,
double* __restrict__ embedded_counts,
double* __restrict__ sample_total_counts,
double length,
const su::task_parameters* task_p);
void _vaw_unweighted_unifrac_task(std::vector<double*> &__restrict__ dm_stripes,
std::vector<double*> &__restrict__ dm_stripes_total,
double* __restrict__ embedded_proportions,
double* __restrict__ embedded_counts,
double* __restrict__ sample_total_counts,
double length,
const su::task_parameters* task_p);
void _vaw_generalized_unifrac_task(std::vector<double*> &__restrict__ dm_stripes,
std::vector<double*> &__restrict__ dm_stripes_total,
double* __restrict__ embedded_proportions,
double* __restrict__ embedded_counts,
double* __restrict__ sample_total_counts,
double length,
const su::task_parameters* task_p);
}