| 484 | } |
| 485 | |
| 486 | std::pair<vector_2d, vector_2d> meshgrid(const vector_1d &x, |
| 487 | const vector_1d &y) { |
| 488 | vector_2d X(y.size(), std::vector<double>(x.size(), 0)); |
| 489 | vector_2d Y(y.size(), std::vector<double>(x.size(), 0)); |
| 490 | for (size_t i = 0; i < y.size(); ++i) { |
| 491 | for (size_t j = 0; j < x.size(); ++j) { |
| 492 | X[i][j] = x[j]; |
| 493 | Y[i][j] = y[i]; |
| 494 | } |
| 495 | } |
| 496 | return std::make_pair(X, Y); |
| 497 | } |
| 498 | |
| 499 | std::pair<vector_2d, vector_2d> meshgrid(const vector_1d &x_and_y) { |
| 500 | return meshgrid(x_and_y, x_and_y); |
no test coverage detected