Function star_graph

Source
pub fn star_graph(n: usize) -> Result<Graph<usize, f64>>
Expand description

Generates a star graph with one central node connected to all others

§Arguments

  • n - Total number of nodes (must be >= 1)

§Returns

  • Result<Graph<usize, f64>> - A star graph with node 0 as the center