pub fn meshedness_coefficient(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the meshedness coefficient of the graph.
MC = (m - n + 1) / (2n - 5)
For connected graphs, the circuit rank divided by the maximum possible circuit rank of a planar graph on n vertices. Ranges from 0 (tree) to values above 1 for dense/non-planar graphs. Returns 0.0 for disconnected graphs, graphs with fewer than 3 vertices, or edgeless graphs.
§Examples
use rust_igraph::{Graph, meshedness_coefficient};
// K_3: m=3, n=3, MC = (3-3+1)/(2·3-5) = 1/1 = 1.0
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert!((meshedness_coefficient(&g).unwrap() - 1.0).abs() < 1e-10);