21 #include "boost/smart_ptr.hpp"
26 void crossover(boost::shared_ptr<T> ind1, boost::shared_ptr<T> ind2,
29 typedef typename T::genes_t genes_t;
31 genes_ind2 = ind2->genes_m;
34 size_t position =
static_cast<size_t>(
35 ((double) ind1->genes_m.size() * (double) rand() / (RAND_MAX + 1.0))
38 for(
size_t i = position; i < ind1->genes_m.size(); i++) {
39 ind2->genes_m[i] = ind1->genes_m[i];
40 ind1->genes_m[i] = genes_ind2[i];
boost::shared_ptr< CmdArguments > CmdArguments_t
void crossover(boost::shared_ptr< T > ind1, boost::shared_ptr< T > ind2, CmdArguments_t)