pub fn require_non_empty<A, W, Ty: GraphConstructor<A, W> + EdgeType>(
graph: &BaseGraph<A, W, Ty>,
algo_name: &str,
) -> Result<()>Expand description
Validates that the graph is non-empty.
Returns Ok(()) if the graph has at least one node, otherwise returns an error.