Update traits module documentation

This commit is contained in:
2026-07-24 20:56:39 +02:00
parent b5cc3b1c3f
commit 6e80b2fc9a
+4 -1
View File
@@ -1,14 +1,17 @@
//! Core traits for undirected graph topologies.
use crate::maps::{EdgeMap, VertexMap}; use crate::maps::{EdgeMap, VertexMap};
// TODO: Add functions to reserve memory for vertices and edges. // TODO: Add functions to reserve memory for vertices and edges.
// TODO: Split out GraphTopologyAddition trait. // TODO: Split out GraphTopologyAddition trait.
// TODO: Introduce an Incidence struct.
/// A trait representing an undirected graph topology. /// A trait representing an undirected graph topology.
/// ///
/// An undirected graph is a set of vertices and undirected edges, where each edge connects either /// An undirected graph is a set of vertices and undirected edges, where each edge connects either
/// exactly two vertices or one vertex with itself (loop edge). This trait provides methods for /// exactly two vertices or one vertex with itself (loop edge). This trait provides methods for
/// querying a graph topology, iterating over vertices and edges, and adding new vertices and edges. /// querying a graph topology, iterating over vertices and edges, and adding new vertices and edges.
/// ///
/// # Vertices and Edges /// # Vertices and edges
/// ///
/// Vertices and edges are identified by opaque handles ([`Vertex`] and [`Edge`]) that implement /// Vertices and edges are identified by opaque handles ([`Vertex`] and [`Edge`]) that implement
/// [`Copy`] and [`Eq`]. Handles remain valid for the lifetime of the graph unless the graph also /// [`Copy`] and [`Eq`]. Handles remain valid for the lifetime of the graph unless the graph also