32 explicit MinCostFlow(
int n) : head_(static_cast<std::size_t>(n), -1) {}
33 static constexpr std::int64_t
kInf = INT64_MAX / 4;
34 void add_arc(
int u,
int v, std::int64_t cost, std::int64_t cap =
kInf);
37 std::pair<std::int64_t, std::int64_t>
solve(
int s,
int t, std::int64_t limit);
42 std::int64_t cap, cost;
44 std::vector<int> head_;
45 std::vector<Arc> arcs_;
static constexpr std::int64_t kInf
void add_arc(int u, int v, std::int64_t cost, std::int64_t cap=kInf)
std::pair< std::int64_t, std::int64_t > solve(int s, int t, std::int64_t limit)
Sends up to limit units from s to t at minimum cost; returns {flow, cost}.
Placement legality (design doc 04 §3 D/E): exact integer tests of courtyards, through-hole obstacles,...
@ Fixed
movable parts keep the rotations in the given placement: the exact relaxed optimum for them
@ Any
valid for every rotation of the movable parts (each pin may take its most favourable offset
std::int64_t hpwl_lower_bound(const Problem &p, const Placement &pl, RotationModel model)
Minimum weighted HPWL (Σ weight · HPWL, nm) over all positions of the movable parts with overlaps and...