To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

genome.hpp 513 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <vector>

class Genome {

    public:
        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
    

    private:
        int B; // span of time considered in the simulation
        std::vector<int> sequence; // vector containing the genes
};