Helper function. * Given an arc idx, return the node that this arc is pointing to in the residual network. */
| 408 | /* Helper function. |
| 409 | * Given an arc idx, return the node that this arc is pointing to in the residual network. */ |
| 410 | static 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`. |
no test coverage detected