DIAlign
utils.h
1 #ifndef UTILS_H
2 #define UTILS_H
3 
4 #include <vector>
5 //#include <cstring>
6 // iostream is required for std::string why?
7 #include <iostream>
8 
9 #ifdef DIALIGN_PURE_CPP
10 #else
11 #define DIALIGN_USE_Rcpp
12 #endif
13 
14 #ifdef DIALIGN_USE_DIALIGN_PRECONDITION
15 #define DIALIGN_PRECONDITION(condition, message) assert(condition); // If you don't put the message, C++ will output the code.
16 #else
17 #define DIALIGN_PRECONDITION(condition, message); // If DIALIGN_USE_DIALIGN_PRECONDITION is defined, compiler will replace calls with empty.
18 #endif
19 
20 #include <cmath>
21 #include <algorithm>
22 #include <iostream>
23 #include <iomanip>
24 
25 namespace DIAlign
26 {
28 namespace Utils
29 {
37  double getQuantile(std::vector<double> vec, double quantile);
38 } // namespace Utils
39 } // namespace DIAlign
40 
41 #endif // UTILS_H
double getQuantile(std::vector< double > vec, double quantile)
Returns the quantile of the vector.
Definition: utils.cpp:15
Generic namespace for all classes and functions of DIAlign.
Definition: affinealignment.cpp:29