| 278 | } |
| 279 | |
| 280 | InterpolationDemo::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 | |
| 301 | InterpolationDemo::ErrorAndDuration InterpolationDemo::interpolateAndComputeError( |
| 302 | const std::string world, const std::string &method) const |
nothing calls this directly
no outgoing calls
no test coverage detected