25 #ifndef FFPOPGEN_GENERIC_H_
26 #define FFPOPGEN_GENERIC_H_
37 #include <gsl/gsl_sf.h>
38 #include <gsl/gsl_randist.h>
39 #include <gsl/gsl_rng.h>
40 #include <gsl/gsl_histogram.h>
41 #include <gsl/gsl_histogram2d.h>
42 #include <gsl/gsl_matrix.h>
43 #include <gsl/gsl_vector.h>
44 #include <gsl/gsl_eigen.h>
45 #include <boost/dynamic_bitset.hpp>
47 #define MIN(a,b) (a<b)?a:b
48 #define MAX(a,b) (a>b)?a:b
49 #define RNG gsl_rng_taus2 //choose the random number generator algorithm, see http://www.gnu.org/software/gsl/manual/html_node/Random-number-generator-algorithms.html
51 #define FREE_RECOMBINATION 1
53 #define SINGLE_CROSSOVER 3
72 genotype_value_pair_t(boost::dynamic_bitset<> genotype_in=boost::dynamic_bitset<>(0),
double val_in=0) : genotype(genotype_in), val(val_in) {};
81 stat_t(
double mean_in=0,
double variance_in=0) : mean(mean_in), variance(variance_in) {};
84 #define SAMPLE_ERROR -12312154
111 int set_distribution(
int bins=100);
112 void set_range(
double min,
double max) {range_min=min; range_max=max; with_range=
true;}
115 int calc_distribution();
116 int print_distribution(ostream &out);