Commit c9f165e3 authored by Erick Turricelli's avatar Erick Turricelli
Browse files

Headers for Penna model simulation

parent db4280fc
#include "genome.hpp"
class Animal {
Animal() {}; // constructor that initializes the genome sequence
static int counter; // count the animals alive ~ population
~Animal() {}; // destructor when an animal dies
void give_birth(); // have a child (only one is allowed)
void prob_life(); // after the threshold, an individual is alive only with a certain probability
Genome sequence();
int mutation_rate; // mutation rate that determines how many bits are gonna change for the child
int reproduction_age; // minimum age to have a child
int life_threshold; // threshold for mutations allowed before death risks
int max_population; // maximum numbers of individuals in the population
\ No newline at end of file
#include <vector>
class Genome {
Genome() {}; // generation of a random sequence (used for the first generation)
Genome(bool child) {}; // creation of a child starting from a mother
void mutation(int position); // change a single bit in a particual position of a sequence
~Genome() {}; // destructor when an animal dies
int B; // span of time considered in the simulation
std::vector<int> sequence; // vector containing the genes
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment