pub fn is_dart_free(graph: &Graph) -> IgraphResult<bool>Expand description
Check whether a graph is dart-free (no induced dart).
The dart is a diamond plus a pendant from a degree-2 vertex of the diamond. A dart-free graph has no induced dart.
Returns false for directed graphs.
ยงExamples
use rust_igraph::{Graph, is_dart_free};
// Diamond is dart-free (only 4 vertices)
let mut g = Graph::with_vertices(4);
g.add_edge(0, 1).unwrap();
g.add_edge(0, 2).unwrap();
g.add_edge(0, 3).unwrap();
g.add_edge(1, 2).unwrap();
g.add_edge(1, 3).unwrap();
assert!(is_dart_free(&g).unwrap());
// Dart: diamond {0,1,2,3} (missing 2-3) + pendant 2-4
let mut g = Graph::with_vertices(5);
g.add_edge(0, 1).unwrap();
g.add_edge(0, 2).unwrap();
g.add_edge(0, 3).unwrap();
g.add_edge(1, 2).unwrap();
g.add_edge(1, 3).unwrap();
g.add_edge(2, 4).unwrap();
assert!(!is_dart_free(&g).unwrap());