| 14 | *************************************************/ |
| 15 | |
| 16 | struct MySolution |
| 17 | { |
| 18 | std::vector<double> x; |
| 19 | |
| 20 | MySolution() |
| 21 | { |
| 22 | // default constructor is a must |
| 23 | } |
| 24 | |
| 25 | MySolution(std::vector<double> x): |
| 26 | x(x) |
| 27 | { |
| 28 | // initialize the solution with the given vector |
| 29 | } |
| 30 | |
| 31 | std::string to_string() const |
| 32 | { |
| 33 | std::ostringstream out; |
| 34 | out<<"{"; |
| 35 | for(unsigned long i=0;i<x.size();i++) |
| 36 | out<<(i?",":"")<<std::setprecision(10)<<x[i]; |
| 37 | out<<"}"; |
| 38 | return out.str(); |
| 39 | } |
| 40 | }; |
| 41 | |
| 42 | struct MyMiddleCost |
| 43 | { |