FFPopSim  2.0
Library for Population Genetics
 All Classes Files Functions Variables Macros Pages
hypercube_lowd Class Reference

Binary hypercube_lowd used in low-dimensional simulations. More...

#include <ffpopsim_lowd.h>

Public Member Functions

 hypercube_lowd ()
 
 hypercube_lowd (int dim_in, int s=0)
 
 ~hypercube_lowd ()
 
int set_up (int dim_in, int s=0)
 
int gaussian_coefficients (double *vark, bool add=false)
 
int additive (double *additive_effects, bool add=false)
 
int init_rand_gauss (double sigma, bool add=false)
 
int init_list (vector< index_value_pair_t > iv, bool add=false)
 
int init_coeff_list (vector< index_value_pair_t > iv, bool add=false)
 
void calc_order ()
 
void set_state (int s)
 
int read_coeff (istream &in)
 
int write_func (ostream &out)
 
int write_coeff (ostream &in, bool label=false)
 
int read_func (istream &out)
 
int read_func_labeled (istream &in)
 
int signature (int point)
 
int fft_func_to_coeff ()
 
int fft_coeff_to_func ()
 
int get_state ()
 
unsigned int get_dim ()
 
unsigned int get_seed ()
 
double get_func (int point)
 
double get_coeff (int point)
 
int argmax ()
 
double valuemax ()
 
void func_set (int point, double f)
 
void func_increment (int point, double f)
 
int normalize (double targetnorm=1.0)
 
int reset ()
 
int scale (double scale)
 
int shift (double shift)
 
int test ()
 

Public Attributes

int dim
 
int state
 
double * coeff
 
double * func
 
int * order
 

Protected Attributes

gsl_rng * rng
 
unsigned int seed
 

Detailed Description

Binary hypercube_lowd used in low-dimensional simulations.

This class is a generic object that can be used to represent various things, e.g.

  • the fitness landscape or any other phenotypic landscape;
  • the genotype frequencies of a population with a genome of size L.

If you are planning to model a whole population evolving on the hypercube_lowd, see the class haploid_lowd.

Notes on scalability:

  • The number of genotypes to store increases as \(2^L\), where L is the number of sites
  • The number of recombination intermediates to be stored increases as \(3^L\), this class can thus only be used for \(L\) up to 20 or so.
  • The population size N is actually unimportant, as far as it can be stored as a long integer. In other words, this class scales with N like O(1).

Constructor & Destructor Documentation

hypercube_lowd::hypercube_lowd ( )
hypercube_lowd::hypercube_lowd ( int  dim_in,
int  s = 0 
)

Here is the call graph for this function:

hypercube_lowd::~hypercube_lowd ( )

Member Function Documentation

int hypercube_lowd::additive ( double *  additive_effects,
bool  add = false 
)

Here is the call graph for this function:

int hypercube_lowd::argmax ( )

Here is the call graph for this function:

void hypercube_lowd::calc_order ( )
int hypercube_lowd::fft_coeff_to_func ( )

Here is the caller graph for this function:

int hypercube_lowd::fft_func_to_coeff ( )

Here is the caller graph for this function:

void hypercube_lowd::func_increment ( int  point,
double  f 
)
inline
void hypercube_lowd::func_set ( int  point,
double  f 
)
inline
int hypercube_lowd::gaussian_coefficients ( double *  vark,
bool  add = false 
)

Here is the call graph for this function:

double hypercube_lowd::get_coeff ( int  point)
inline
unsigned int hypercube_lowd::get_dim ( )
inline
double hypercube_lowd::get_func ( int  point)
inline

Here is the caller graph for this function:

unsigned int hypercube_lowd::get_seed ( )
inline
int hypercube_lowd::get_state ( )
inline

Here is the caller graph for this function:

int hypercube_lowd::init_coeff_list ( vector< index_value_pair_t iv,
bool  add = false 
)

Here is the call graph for this function:

int hypercube_lowd::init_list ( vector< index_value_pair_t iv,
bool  add = false 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int hypercube_lowd::init_rand_gauss ( double  sigma,
bool  add = false 
)

Here is the call graph for this function:

int hypercube_lowd::normalize ( double  targetnorm = 1.0)

Here is the call graph for this function:

Here is the caller graph for this function:

int hypercube_lowd::read_coeff ( istream &  in)
int hypercube_lowd::read_func ( istream &  out)
int hypercube_lowd::read_func_labeled ( istream &  in)
int hypercube_lowd::reset ( )

Here is the caller graph for this function:

int hypercube_lowd::scale ( double  scale)

Here is the call graph for this function:

Here is the caller graph for this function:

void hypercube_lowd::set_state ( int  s)
inline

Here is the caller graph for this function:

int hypercube_lowd::set_up ( int  dim_in,
int  s = 0 
)

Here is the caller graph for this function:

int hypercube_lowd::shift ( double  shift)

Here is the call graph for this function:

int hypercube_lowd::signature ( int  point)
int hypercube_lowd::test ( )
double hypercube_lowd::valuemax ( )

Here is the call graph for this function:

int hypercube_lowd::write_coeff ( ostream &  in,
bool  label = false 
)
int hypercube_lowd::write_func ( ostream &  out)

Member Data Documentation

double* hypercube_lowd::coeff
int hypercube_lowd::dim
double* hypercube_lowd::func
int* hypercube_lowd::order
gsl_rng* hypercube_lowd::rng
protected
unsigned int hypercube_lowd::seed
protected
int hypercube_lowd::state

The documentation for this class was generated from the following files: