13#if !defined(VITA_GA_I_GA_H)
31 using genome_t = std::vector<int>;
32 using const_iterator = genome_t::const_iterator;
33 using iterator = genome_t::iterator;
34 using value_type = genome_t::value_type;
36 const_iterator
begin()
const;
37 const_iterator
end()
const;
42 value_type operator[](std::size_t i)
const
48 value_type &operator[](std::size_t i)
55 operator std::vector<value_type>()
const;
56 i_ga &operator=(
const std::vector<value_type> &);
59 unsigned mutation(
double,
const problem &);
71 std::size_t
size()
const {
return genome_.size(); }
98 bool load_impl(std::istream &,
const symbol_set &);
99 bool save_impl(std::ostream &)
const;
109i_ga crossover(
const i_ga &,
const i_ga &);
112std::ostream &in_line(
const i_ga &, std::ostream & = std::cout);
113std::ostream &
operator<<(std::ostream &,
const i_ga &);
120 return genome_.begin();
128 return genome_.end();
136 return genome_.begin();
144 return genome_.end();
An GA-individual optimized for combinatorial optimization.
std::size_t parameters() const
hash_t signature() const
The signature (hash value) of this individual.
void graphviz(std::ostream &) const
Produces a dot-language representation of this individual.
const_iterator begin() const
const_iterator end() const
bool operator==(const i_ga &) const
unsigned distance(const i_ga &) const
A single member of a population.
MurmurHash3 (https://github.com/aappleby/smhasher) by Austin Appleby.
Aggregates the problem-related data needed by an evolutionary program.
A container for the symbols used by the GP engine.
The main namespace for the project.
std::ostream & operator<<(std::ostream &o, hash_t h)
Mainly useful for debugging / testing.
A 128bit unsigned integer used as individual's signature / hash table look-up key.
void clear()
Resets the content of the object.