MCPcopy Create free account
hub / github.com/ElementsProject/lightning / get_arc_flow

Function get_arc_flow

plugins/askrene/child/mcf.c:308–317  ·  view source on GitHub ↗

Helper function. * Given an arc of the network (not residual) give me the flow. */

Source from the content-addressed store, hash-verified

306/* Helper function.
307 * Given an arc of the network (not residual) give me the flow. */
308static 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 */
320static void set_capacity(s64 *capacity, u64 value, u64 *cap_on_capacity)

Callers 1

get_flow_pathsFunction · 0.70

Calls 2

arc_is_dualFunction · 0.70
arc_dualFunction · 0.70

Tested by

no test coverage detected