8 #include "boost/random/binomial_distribution.hpp"
9 #include "boost/random/poisson_distribution.hpp"
10 #include "boost/random/variate_generator.hpp"
11 #include "boost/random/mersenne_twister.hpp"
22 #if ULONG_MAX > 0xFFFFFFFFUL
23 #define LONG_IS_64_BITS
30 #ifdef LONG_IS_64_BITS
36 #if defined(_MSC_VER) || defined(__BORLANDC__) // windobe version 64bits int
37 typedef unsigned __int64 ulong64;
38 typedef signed __int64 long64;
39 #define CRUMB 32 // number of base that can be coded in a number, 64 for uint128, 32 for ulong64
40 #define typeDNA __ulong64
41 #else //linux version 128 bits int
42 typedef unsigned long long ulong64;
43 typedef signed long long long64;
44 #define CRUMB 32 // number of base that can be coded in a number, 64 for uint128, 32 for ulong64
45 #define typeDNA ulong64
49 #define rand2 (int)((rand()/((double)RAND_MAX+1)*2))
51 int rBinom(
int,
double );
53 int * poisson_array(
int N,
double lambda);
56 ptrdiff_t myrand(ptrdiff_t);
57 int dist_dna(
int,
int);
58 unsigned long long int dist_dna(
unsigned long long int,
unsigned long long int);
59 unsigned long long convertDnaToInt(std::string dna);
60 std::vector<unsigned long long> convertDnaToIntSplit(std::string dna);
62 __uint128_t dist_dna(__uint128_t a, __uint128_t b);
64 double harmonic(
int n);
65 int * poisson_array_smart(
int Nparents,
int Nchildren);
66 char convertToChar(
unsigned number);
67 std::string convertIntToQuaternaryString(typeDNA dna,
int nbcrumb = CRUMB);
68 double tajima_a1(
int n);
69 double tajima_a2(
int n);
70 double tajima_b1(
int n);
71 double tajima_b2(
int n);
72 double tajima_c1(
int n);
73 double tajima_c2(
int n);
74 unsigned long long dna_distance(
unsigned long long c);
75 std::vector<std::string> split_string(std::string tosplit,std::string sep);
76 std::vector<typeDNA> dna_string_to_int(std::string);
77 double harm_square(
int i);
78 std::vector<std::string> &split(
const std::string &s,
char delim, std::vector<std::string> &elems);
79 std::vector<std::string> split(
const std::string &s,
char delim);
80 bool isFloat(std::string myString);
81 bool isInt(std::string myString);
84 inline std::string to_string (
const T& t)
92 std::string convertToStr(T number)
109 int convertToInt(T letter)