Note
This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.
rustworkx.hyperbolic_greedy_success_rate#
- hyperbolic_greedy_success_rate(graph, pos)#
Returns the proportion of successful hyperbolic greedy routing paths between all pairs of nodes. See
hyperbolic_greedy_routing()for details on the greedy routing algorithm.This algorithm has a time complexity of \(O(n^2 m)\) for \(n\) nodes and \(m\) edges.
Note
Node indices are constant across removal of nodes. Since
posmaps rows to node indices, the unused rows should not be deleted.- Parameters:
graph (PyGraph) – The input graph.
pos (list[list[float]]) – Hyperboloid coordinates of the nodes [[\(x_1(1)\), …, \(x_D(1)\)], [\(x_1(2)\), …, \(x_D(2)\)], …]. The “time” coordinate \(x_0\) is inferred from the other coordinates.
- Returns:
Proportion of successful greedy paths.
- Return type:
float