pub fn signless_laplacian_smallest(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the smallest signless Laplacian eigenvalue q_1(Q).
Equals 0 for graphs with a bipartite component, positive otherwise.
This is a useful bipartiteness test: a connected graph is bipartite
if and only if q_1 = 0.
ยงExamples
use rust_igraph::{Graph, signless_laplacian_smallest};
// K_{2,2} (bipartite): q_1 = 0
let g = Graph::from_edges(&[(0,2),(0,3),(1,2),(1,3)], false, Some(4)).unwrap();
let q1 = signless_laplacian_smallest(&g).unwrap();
assert!(q1.abs() < 0.01);
// K_3 (non-bipartite): q_1 = 1
let k3 = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
let q1k = signless_laplacian_smallest(&k3).unwrap();
assert!(q1k > 0.5);