MCPcopy Create free account
hub / github.com/ANYbotics/grid_map / computeStatistics

Method computeStatistics

grid_map_demos/src/InterpolationDemo.cpp:280–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280InterpolationDemo::Statistics InterpolationDemo::computeStatistics() const
281{
282 Statistics stats;
283 for (auto world = worlds.cbegin(); world != worlds.cend(); ++world) {
284 std::map<std::string, Statistic> methodsStats;
285 for (auto method = interpolationMethods.cbegin(); method != interpolationMethods.cend();
286 ++method) {
287 const auto errorAndDuration = interpolateAndComputeError(world->first, method->first);
288 Statistic statistic;
289 statistic.duration_ = errorAndDuration.second;
290 statistic.error_ = errorAndDuration.first;
291 statistic.interpolationMethod_ = method->first;
292 statistic.world_ = world->first;
293 methodsStats.insert( { method->first, statistic });
294 }
295 stats.insert( { world->first, methodsStats });
296 }
297
298 return std::move(stats);
299}
300
301InterpolationDemo::ErrorAndDuration InterpolationDemo::interpolateAndComputeError(
302 const std::string world, const std::string &method) const

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected