pub fn kautz(m: u32, n: u32) -> IgraphResult<Graph>Expand description
Build the Kautz graph K(m, n).
The result is always directed (matches IGRAPH_DIRECTED in the C
constructor). For n ≥ 1 every vertex has out-degree and in-degree
equal to m.
§Errors
IgraphError::InvalidArgument—(m+1)^(n+1)overflowsu32, so the sparse string-code space cannot be addressed with the graph’su32vertex id width. The check usesu32::checked_powso the failure mode is deterministic.IgraphError::InvalidArgument— vcount(m+1) · m^nor ecountm · vcountoverflowsusizeso the index tables / edge buffer cannot be sized safely.
§Examples
use rust_igraph::kautz;
// K(2, 1) — directed graph on 6 vertices; every vertex has
// out-degree 2 and in-degree 2 → 12 arcs total.
let g = kautz(2, 1).unwrap();
assert_eq!(g.vcount(), 6);
assert_eq!(g.ecount(), 12);
assert!(g.is_directed());