Add docs for generators and generators::petersen

This commit is contained in:
2026-09-29 23:19:08 +02:00
parent c8855daddf
commit b943dddf1b
+8
View File
@@ -1,5 +1,13 @@
//! Generators for common graphs.
use crate::traits::{GraphTopology, GraphTopologyAddition};
/// Generates a Petersen graph.
///
/// Generates a [Petersen graph] in `graph` as a new connected component and returns the new
/// vertices and edges. This graph is also the Kneser graph *KG(5, 2)*.
///
/// [Petersen graph]: https://en.wikipedia.org/wiki/Petersen_graph
pub fn petersen<G>(
graph: &mut G,
) -> (