fn compute_paths<G, C>(
graph: &G,
src: &OffchainPublicKey,
dest: &OffchainPublicKey,
length: NonZeroUsize,
take: usize,
cost_fn: C,
) -> Vec<PathWithCost>where
G: NetworkGraphTraverse<NodeId = OffchainPublicKey> + NetworkGraphView<NodeId = OffchainPublicKey>,
<G as NetworkGraphTraverse>::Observed: EdgeObservableRead + Send + 'static,
C: ValueFn<Weight = <G as NetworkGraphTraverse>::Observed, Value = f64>,Expand description
Compute candidate paths from src to dest through graph.
length is the number of edges to traverse (= intermediate hops + 1).
take caps the number of candidate paths returned.
The source node is stripped from every returned path; callers receive
([intermediates..., dest], cost).