pub fn bandwidth(graph: &Graph) -> IgraphResult<u32>Expand description
Compute the exact graph bandwidth B(G).
Tries all permutations of vertices and returns the minimum bandwidth. Only feasible for very small graphs (≤ ~10 vertices).
§Examples
use rust_igraph::{Graph, bandwidth};
// Path graph: optimal bandwidth is 1
let g = Graph::from_edges(&[(0,1),(1,2),(2,3)], false, Some(4)).unwrap();
assert_eq!(bandwidth(&g).unwrap(), 1);