MCPcopy Create free account
hub / github.com/Fields2Cover/Fields2Cover / getComponents

Method getComponents

src/fields2cover/utils/visualizer.cpp:288–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286}
287
288std::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
298std::vector<double> Visualizer::linspace(double min, double max, size_t N) {
299 double h = (max - min) / (N - 1.0);

Callers

nothing calls this directly

Calls 4

beginMethod · 0.45
endMethod · 0.45
getXMethod · 0.45
getYMethod · 0.45

Tested by

no test coverage detected