MCPcopy Create free account
hub / github.com/Arash-codedev/openGA / SO_report_generation

Method SO_report_generation

examples/so-bind/example_bind.cpp:123–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 }
122
123 void SO_report_generation(
124 int generation_number,
125 const EA::GenerationType<MySolution,MyMiddleCost> &last_generation,
126 const MySolution& best_genes)
127 {
128 std::cout
129 <<"Generation ["<<generation_number<<"], "
130 <<"Best="<<last_generation.best_total_cost<<", "
131 <<"Average="<<last_generation.average_cost<<", "
132 <<"Best genes=("<<best_genes.to_string()<<")"<<", "
133 <<"Exe_time="<<last_generation.exe_time
134 <<std::endl;
135
136 output_file
137 <<generation_number<<"\t"
138 <<best_genes.x<<"\t"
139 <<best_genes.y<<"\t"
140 <<last_generation.average_cost<<"\t"
141 <<last_generation.best_total_cost<<"\n";
142 }
143};
144
145int main()

Callers

nothing calls this directly

Calls 1

to_stringMethod · 0.45

Tested by

no test coverage detected