Helper function. * Given an arc of the network (not residual) give me the flow. */
| 306 | /* Helper function. |
| 307 | * Given an arc of the network (not residual) give me the flow. */ |
| 308 | static s64 get_arc_flow( |
| 309 | const s64 *arc_residual_capacity, |
| 310 | const struct graph *graph, |
| 311 | const struct arc arc) |
| 312 | { |
| 313 | assert(!arc_is_dual(graph, arc)); |
| 314 | struct arc dual = arc_dual(graph, arc); |
| 315 | assert(dual.idx < tal_count(arc_residual_capacity)); |
| 316 | return arc_residual_capacity[dual.idx]; |
| 317 | } |
| 318 | |
| 319 | /* Set *capacity to value, up to *cap_on_capacity. Reduce cap_on_capacity */ |
| 320 | static void set_capacity(s64 *capacity, u64 value, u64 *cap_on_capacity) |
no test coverage detected