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

Function arc_head

plugins/renepay/mcf.c:410–416  ·  view source on GitHub ↗

Helper function. * Given an arc idx, return the node that this arc is pointing to in the residual network. */

Source from the content-addressed store, hash-verified

408/* Helper function.
409 * Given an arc idx, return the node that this arc is pointing to in the residual network. */
410static u32 arc_head(const struct linear_network *linear_network,
411 const struct arc arc)
412{
413 const struct arc dual = arc_dual(arc);
414 assert(dual.idx < tal_count(linear_network->arc_tail_node));
415 return linear_network->arc_tail_node[dual.idx];
416}
417
418/* Helper function.
419 * Given node idx `node`, return the idx of the first arc whose tail is `node`.

Callers 3

find_admissible_pathFunction · 0.70
find_optimal_pathFunction · 0.70
get_flow_pathsFunction · 0.70

Calls 1

arc_dualFunction · 0.70

Tested by

no test coverage detected