pub fn atlas(number: u32) -> IgraphResult<Graph>Expand description
Build the number-th graph from Read-Wilson’s An Atlas of Graphs.
number must be in 0..1253. The returned graph is always
undirected. See the module docstring for the ordering convention.
§Errors
IgraphError::InvalidArgument—numberis outside0..1253.
§Examples
use rust_igraph::atlas;
// 0: the null graph (0 vertices, 0 edges)
let g = atlas(0).unwrap();
assert_eq!((g.vcount(), g.ecount()), (0, 0));
// 3: the single edge K_2
let k2 = atlas(3).unwrap();
assert_eq!((k2.vcount(), k2.ecount()), (2, 1));
// 1252 (last): the complete graph K_7
let k7 = atlas(1252).unwrap();
assert_eq!((k7.vcount(), k7.ecount()), (7, 21));