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

Function renormalize_dials

plugins/askrene/child/mcf.c:1432–1442  ·  view source on GitHub ↗

Renormalize the dials so that their sum is always 1. * All values assumed to be positive. */

Source from the content-addressed store, hash-verified

1430/* Renormalize the dials so that their sum is always 1.
1431 * All values assumed to be positive. */
1432static void renormalize_dials(double *fee_dial,
1433 double *delay_dial,
1434 double *per_hop_dial,
1435 double *prob_dial)
1436{
1437 double sum = *fee_dial + *delay_dial + *per_hop_dial + *prob_dial;
1438 *fee_dial /= sum;
1439 *delay_dial /= sum;
1440 *per_hop_dial /= sum;
1441 *prob_dial /= sum;
1442}
1443
1444static const char *
1445linear_routes(const tal_t *ctx, struct route_query *rq,

Callers 1

linear_routesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected