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

Method ensureValidIndex

pyvrp/cpp/search/Route.cpp:32–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void Route::Iterator::ensureValidIndex()
33{
34 // size() - 1 is the index of the end depot, and what's returned by
35 // Route::end() - we must not exceed it.
36 while (idx_ < nodes_->size() - 1 && operator*() -> isReloadDepot())
37 idx_++; // skip any intermediate reload depots
38
39 assert(0 < idx_ && idx_ < nodes_->size());
40}
41
42bool Route::Iterator::operator==(Iterator const &other) const
43{

Callers

nothing calls this directly

Calls 2

isReloadDepotMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected