| 38 | } |
| 39 | |
| 40 | bool eval_solution( |
| 41 | const MySolution& p, |
| 42 | MyMiddleCost &c) |
| 43 | { |
| 44 | double x=p.x; |
| 45 | double y=p.y; |
| 46 | // the middle comupations of cost: |
| 47 | c.cost_A=log(1.0+x*sqrt(x*y)); |
| 48 | c.cost_B=98.0-100.0*(1.0-1.0/(1.0+y*sqrt(x*y))); |
| 49 | return true; // genes are accepted |
| 50 | } |
| 51 | |
| 52 | MySolution mutate( |
| 53 | const MySolution& X_base, |
nothing calls this directly
no outgoing calls
no test coverage detected