pub fn transmission_ratio(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the transmission ratio.
mean_transmission / max_transmission where transmission of a
vertex is the sum of distances from it to all other vertices.
Returns 0.0 for disconnected or trivial graphs.
ยงExamples
use rust_igraph::{Graph, transmission_ratio};
// K_3: all transmissions = 2, ratio = 1.0
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert!((transmission_ratio(&g).unwrap() - 1.0).abs() < 1e-10);