| 286 | } |
| 287 | |
| 288 | std::vector<std::vector<double>> Visualizer::getComponents( |
| 289 | const std::vector<F2CPoint>& points) { |
| 290 | std::vector<double> x, y; |
| 291 | std::transform(points.begin(), points.end(), std::back_inserter(x), |
| 292 | [](const F2CPoint& c) -> double { return c.getX();}); |
| 293 | std::transform(points.begin(), points.end(), std::back_inserter(y), |
| 294 | [](const F2CPoint& c) -> double { return c.getY();}); |
| 295 | return {x, y}; |
| 296 | } |
| 297 | |
| 298 | std::vector<double> Visualizer::linspace(double min, double max, size_t N) { |
| 299 | double h = (max - min) / (N - 1.0); |