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

Function arc_head

plugins/askrene/child/graph.h:92–98  ·  view source on GitHub ↗

Give me the node at the head of an arc. */

Source from the content-addressed store, hash-verified

90
91/* Give me the node at the head of an arc. */
92static inline struct node arc_head(const struct graph *graph,
93 const struct arc arc)
94{
95 const struct arc dual = arc_dual(graph, arc);
96 assert(dual.idx < graph_max_num_arcs(graph));
97 return graph->arc_tail[dual.idx];
98}
99
100/* We use an arc array but not all arcs in that array do exist in the graph. */
101static inline bool arc_enabled(const struct graph *graph, const struct arc arc)

Callers 8

BFS_pathFunction · 0.70
dijkstra_pathFunction · 0.70
reduced_costFunction · 0.70
dijkstra_nearest_sinkFunction · 0.70
get_flow_pathsFunction · 0.70
showFunction · 0.50
showFunction · 0.50
showFunction · 0.50

Calls 2

graph_max_num_arcsFunction · 0.85
arc_dualFunction · 0.70

Tested by 3

showFunction · 0.40
showFunction · 0.40
showFunction · 0.40