Vita
evolution_summary.h
Go to the documentation of this file.
1
13#if !defined(VITA_EVOLUTION_SUMMARY_H)
14#define VITA_EVOLUTION_SUMMARY_H
15
16#include <chrono>
17
18#include "kernel/analyzer.h"
20
21namespace vita
22{
28template<class T>
30{
31public:
32 // --- Constructor and support functions ---
33 summary();
34
35 void clear();
36
37 // --- Serialization ---
38 bool load(std::istream &, const problem &);
39 bool save(std::ostream &) const;
40
41 // --- Public data members ---
42 analyzer<T> az;
43
44 struct
45 {
46 T solution;
48 } best;
49
51 std::chrono::milliseconds elapsed;
52
54 std::uintmax_t crossovers;
55
57 std::uintmax_t mutations;
58
59 unsigned gen, last_imp;
60};
61
62#include "kernel/evolution_summary.tcc"
63
64} // namespace vita
65
66#endif // include guard
Analyzer takes a statistics snapshot of a population.
Definition: analyzer.h:44
Aggregates the problem-related data needed by an evolutionary program.
Definition: problem.h:24
A summary of evolution (results, statistics...).
std::uintmax_t mutations
Number of mutations performed.
std::chrono::milliseconds elapsed
Time elapsed from evolution beginning.
std::uintmax_t crossovers
Number of crossovers performed.
The main namespace for the project.
A collection of measurements.