13#if !defined(VITA_POPULATION_H)
14#define VITA_POPULATION_H
42 using layer_t = std::vector<T>;
44 const T &operator[](coord)
const;
46 unsigned individuals()
const;
47 unsigned individuals(
unsigned)
const;
48 unsigned allowed(
unsigned)
const;
50 void init_layer(
unsigned);
52 unsigned layers()
const;
53 void add_to_layer(
unsigned,
const T &);
54 void pop_from_layer(
unsigned);
55 void remove_layer(
unsigned);
56 void set_allowed(
unsigned,
unsigned);
60 const problem &get_problem()
const;
62 bool is_valid()
const;
73 bool load(std::istream &,
const problem &);
74 bool save(std::ostream &)
const;
80 std::vector<layer_t> pop_;
81 std::vector<unsigned> allowed_;
88#include "kernel/population_coord.tcc"
89#include "kernel/population_iterator.tcc"
90#include "kernel/population.tcc"
A group of individuals which may interact together (for example by mating) producing offspring.
Aggregates the problem-related data needed by an evolutionary program.
The main namespace for the project.