| 98 | } |
| 99 | |
| 100 | MySolution crossover( |
| 101 | const MySolution& X1, |
| 102 | const MySolution& X2, |
| 103 | const std::function<double(void)> &rnd01) |
| 104 | { |
| 105 | MySolution X_new; |
| 106 | double r; |
| 107 | r=rnd01(); |
| 108 | X_new.x=r*X1.x+(1.0-r)*X2.x; |
| 109 | r=rnd01(); |
| 110 | X_new.y=r*X1.y+(1.0-r)*X2.y; |
| 111 | return X_new; |
| 112 | } |
| 113 | |
| 114 | double calculate_SO_total_fitness(const GA_Type::thisChromosomeType &X) |
| 115 | { |
nothing calls this directly
no outgoing calls
no test coverage detected