You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By definition in the document appendix.html, it should return 0 I believe.
g(v, f) = Sum{...} - Sum{...}
This implies the sum of g(v, f) over all vertices is zero.
g(v, f) = g(v, f') holds for all vertices v other than s and t.
Since s = t, this also implies g(t, f) = g(t, f'). (∵ everywhere except t is fixed, and the sum is fixed)
g(t,f′)−g(t,f) is maximized under these conditions. It returns this g(t,f′)−g(t,f)
Since g(t, f) = g(t, f'), the returned value should be 0.
Though, the actual implementation returns inf or the third argument (limit),
The current return value also makes sense if you view the problem as an instance of MaxFlow formulated as LP. You'll most likely get a primal unbounded, dual infeasible instance, depending on the choose of formulation.
Since there are multiple return values that makes some sense, both fix (fix documentation / fix implementation) would still leave confusion. So it might be better to assert(s != t) and document it.
By definition in the document appendix.html, it should return 0 I believe.
This implies the sum of g(v, f) over all vertices is zero.
Since s = t, this also implies g(t, f) = g(t, f'). (∵ everywhere except t is fixed, and the sum is fixed)
Since g(t, f) = g(t, f'), the returned value should be 0.
Though, the actual implementation returns inf or the third argument (limit),
The current return value also makes sense if you view the problem as an instance of MaxFlow formulated as LP. You'll most likely get a primal unbounded, dual infeasible instance, depending on the choose of formulation.
Since there are multiple return values that makes some sense, both fix (fix documentation / fix implementation) would still leave confusion. So it might be better to
assert(s != t)
and document it.https://github.com/rust-lang-ja/ac-library-rs/pull/24/files#r485363476
The text was updated successfully, but these errors were encountered: