| 68 | } |
| 69 | |
| 70 | MySolution crossover( |
| 71 | const MySolution& X1, |
| 72 | const MySolution& X2, |
| 73 | const std::function<double(void)> &rnd01) |
| 74 | { |
| 75 | MySolution X_new; |
| 76 | double r; |
| 77 | r=rnd01(); |
| 78 | X_new.x=r*X1.x+(1.0-r)*X2.x; |
| 79 | r=rnd01(); |
| 80 | X_new.y=r*X1.y+(1.0-r)*X2.y; |
| 81 | return X_new; |
| 82 | } |
| 83 | |
| 84 | std::vector<double> calculate_MO_objectives(const GA_Type::thisChromosomeType &X) |
| 85 | { |
nothing calls this directly
no outgoing calls
no test coverage detected