MCPcopy Index your code
hub / github.com/PyVRP/PyVRP / statistics

Method statistics

pyvrp/cpp/search/LocalSearch.cpp:516–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514}
515
516LocalSearch::Statistics LocalSearch::statistics() const
517{
518 size_t numMoves = 0;
519 size_t numImproving = 0;
520
521 auto const count = [&](auto const *op)
522 {
523 auto const &stats = op->statistics();
524 numMoves += stats.numEvaluations;
525 numImproving += stats.numApplications;
526 };
527
528 std::for_each(nodeOps.begin(), nodeOps.end(), count);
529 std::for_each(routeOps.begin(), routeOps.end(), count);
530
531 assert(numImproving <= numUpdates_);
532 return {numMoves, numImproving, numUpdates_};
533}
534
535LocalSearch::LocalSearch(ProblemData const &data,
536 SearchSpace::Neighbours neighbours,

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected