MCPcopy Create free account
hub / github.com/PyVRP/PyVRP / Proposal

Method Proposal

pyvrp/cpp/search/Route.h:1029–1041  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1027
1028template <Segment... Segments>
1029Route::Proposal<Segments...>::Proposal(Segments &&...segments)
1030 : segments_(std::forward<Segments>(segments)...)
1031{
1032 static_assert(sizeof...(Segments) > 0, "Proposal cannot be empty.");
1033
1034 [[maybe_unused]] auto &&first = std::get<0>(segments_);
1035 [[maybe_unused]] auto &&last = std::get<sizeof...(Segments) - 1>(segments_);
1036 assert(first.route() == last.route()); // must start and end at same route
1037
1038 [[maybe_unused]] auto const *route = this->route();
1039 assert(first.first() == route->startDepot()); // must start at route start
1040 assert(last.last() == route->endDepot()); // must end at route end
1041}
1042
1043template <Segment... Segments> size_t Route::Proposal<Segments...>::size() const
1044{

Callers

nothing calls this directly

Calls 5

routeMethod · 0.45
firstMethod · 0.45
startDepotMethod · 0.45
lastMethod · 0.45
endDepotMethod · 0.45

Tested by

no test coverage detected