Skip to main content

hyperbolicity

Function hyperbolicity 

Source
pub fn hyperbolicity(graph: &Graph) -> Result<f64, IgraphError>
Expand description

Compute δ-hyperbolicity as a floating-point value.

Convenience wrapper around hyperbolicity_twice that returns δ as f64.

§Examples

use rust_igraph::{Graph, hyperbolicity};

let g = Graph::from_edges(&[(0,1),(1,2),(2,3),(3,0)], false, Some(4)).unwrap();
assert!((hyperbolicity(&g).unwrap() - 1.0).abs() < 1e-10);