pub fn is_bowtie_free(graph: &Graph) -> IgraphResult<bool>Expand description
Check whether a graph is bowtie-free (no induced bowtie / butterfly).
The bowtie is two triangles sharing a single vertex. It has 5 vertices {a, b, c, d, e} where c is the center: edges {a-b, a-c, b-c, c-d, c-e, d-e}, and no other edges among these 5 vertices.
Returns false for directed graphs.
ยงExamples
use rust_igraph::{Graph, is_bowtie_free};
// Triangle is bowtie-free
let mut g = Graph::with_vertices(3);
g.add_edge(0, 1).unwrap();
g.add_edge(1, 2).unwrap();
g.add_edge(2, 0).unwrap();
assert!(is_bowtie_free(&g).unwrap());
// Bowtie: triangles {0,1,2} and {2,3,4} sharing vertex 2
let mut g = Graph::with_vertices(5);
g.add_edge(0, 1).unwrap();
g.add_edge(0, 2).unwrap();
g.add_edge(1, 2).unwrap();
g.add_edge(2, 3).unwrap();
g.add_edge(2, 4).unwrap();
g.add_edge(3, 4).unwrap();
assert!(!is_bowtie_free(&g).unwrap());