parametric.hpp file
Functions
-
template<typename Graph, typename T, typename Fn1, typename Fn2, typename Mapping>auto max_parametric(const Graph& gra, T& r_opt, Fn1&& distrance, Fn2&& zero_cancel, Mapping&& dist, size_t max_iters = 1000) -> auto
- maximum parametric problem
Function documentation
template<typename Graph, typename T, typename Fn1, typename Fn2, typename Mapping>
auto max_parametric(const Graph& gra,
T& r_opt,
Fn1&& distrance,
Fn2&& zero_cancel,
Mapping&& dist,
size_t max_iters = 1000)
maximum parametric problem
| Template parameters | |
|---|---|
| Graph | |
| T | |
| Fn1 | |
| Fn2 | |
| Mapping | |
| Parameters | |
| gra in | directed graph |
| r_opt in/out | parameter to be maximized, initially a large number |
| distrance in | monotone decreasing function w.r.t. r |
| zero_cancel in | |
| dist in/out | |
| max_iters | |
| Returns | optimal r and the critical cycle |
This function solves the following network parametric problem:
max r
s.t. dist[vtx] - dist[utx] \ge distrance(utx, vtx, r)
\forall edge(utx, vtx) \in gra(V, E)