| 544 | } |
| 545 | |
| 546 | double peaks(double x, double y) { |
| 547 | return 3. * pow(1. - x, 2.) * exp(-pow(x, 2.) - pow(y + 1., 2.)) - |
| 548 | 10. * (x / 5. - pow(x, 3.) - pow(y, 5.)) * |
| 549 | exp(-pow(x, 2.) - pow(y, 2.)) - |
| 550 | 1. / 3. * exp(-pow(x + 1., 2.) - pow(y, 2.)); |
| 551 | } |
| 552 | |
| 553 | vector_2d peaks(const vector_2d &X, const vector_2d &Y) { |
| 554 | const size_t n_rows = std::min(X.size(), Y.size()); |