Update to 1.11.0-beta1
This commit is contained in:
@@ -235,7 +235,7 @@ bool DistanceAnnotation::IsBetter(const DistanceAnnotation *base, uint cap,
|
||||
bool CapacityAnnotation::IsBetter(const CapacityAnnotation *base, uint cap,
|
||||
int free_cap, uint dist) const
|
||||
{
|
||||
int min_cap = Path::GetCapacityRatio(min(base->free_capacity, free_cap), min(base->capacity, cap));
|
||||
int min_cap = Path::GetCapacityRatio(std::min(base->free_capacity, free_cap), std::min(base->capacity, cap));
|
||||
int this_cap = this->GetCapacityRatio();
|
||||
if (min_cap == this_cap) {
|
||||
/* If the capacities are the same and the other path isn't disconnected
|
||||
@@ -354,7 +354,7 @@ uint MCF1stPass::FindCycleFlow(const PathVector &path, const Path *cycle_begin)
|
||||
uint flow = UINT_MAX;
|
||||
const Path *cycle_end = cycle_begin;
|
||||
do {
|
||||
flow = min(flow, cycle_begin->GetFlow());
|
||||
flow = std::min(flow, cycle_begin->GetFlow());
|
||||
cycle_begin = path[cycle_begin->GetNode()];
|
||||
} while (cycle_begin != cycle_end);
|
||||
return flow;
|
||||
@@ -528,7 +528,7 @@ MCF1stPass::MCF1stPass(LinkGraphJob &job) : MultiCommodityFlow(job)
|
||||
finished_sources[source] = !source_demand_left;
|
||||
this->CleanupPaths(source, paths);
|
||||
}
|
||||
} while (more_loops || this->EliminateCycles());
|
||||
} while ((more_loops || this->EliminateCycles()) && !job.IsJobAborted());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -544,7 +544,7 @@ MCF2ndPass::MCF2ndPass(LinkGraphJob &job) : MultiCommodityFlow(job)
|
||||
uint accuracy = job.Settings().accuracy;
|
||||
bool demand_left = true;
|
||||
std::vector<bool> finished_sources(size);
|
||||
while (demand_left) {
|
||||
while (demand_left && !job.IsJobAborted()) {
|
||||
demand_left = false;
|
||||
for (NodeID source = 0; source < size; ++source) {
|
||||
if (finished_sources[source]) continue;
|
||||
|
||||
Reference in New Issue
Block a user