@@ -67,6 +67,50 @@ struct to_impl;
6767
6868} // namespace detail
6969
70+ // / @brief A general-purpose graph container.
71+ // /
72+ // / This class represents a highly customizable graph data structure configured by the provided
73+ // / `GraphTraits`. It serves as the primary interface for managing vertices, edges, and their properties.
74+ // /
75+ // / @tparam GraphTraits An instantiation of @ref gl::graph_traits
76+ // /
77+ // / ### Mathematics
78+ // / Here is an inline math equation using standard dollars: $V = E - F + 2$,
79+ // / and one using Big-O: $\mathcal{O}(\vert V \vert + \vert E \vert)$.
80+ // /
81+ // / And here is a normal (multiline) math block:
82+ // /
83+ // / $$
84+ // / \sum_{v \in V} \text{deg}(v) = 2 \vert E \vert
85+ // / $$
86+ // /
87+ // / Or alternatively for environments like cases:
88+ // /
89+ // / $$
90+ // / A_{i,j} = \begin{cases} 1 & \text{if } (i,j) \in E \\\\ 0 & \text{otherwise} \end{cases}
91+ // / $$
92+ // /
93+ // / ### Code Example
94+ // / ```cpp
95+ // / gl::directed_graph<> g;
96+ // / auto v1 = g.add_vertex();
97+ // / auto v2 = g.add_vertex();
98+ // / g.add_edge(v1, v2);
99+ // / for (const auto v : graph.vertices()) {
100+ // / std::cout << v << ": ";
101+ // / for (const auto u : graph.neighbors(v)) {
102+ // / std::cout << u << " ";
103+ // / }
104+ // / }
105+ // / ```
106+ // /
107+ // / ### References
108+ // / For a general overview and integration instructions, see the [Project Overview](/#overview)
109+ // / or the [Installation Guide](/#installing-the-library).
110+ // /
111+ // / > [!WARNING]
112+ // / > This class relies on its internal implementation tag to correctly define its layout. Modifying
113+ // / > the underlying structure bypassing the API can lead to undefined behavior.
70114template <traits::c_instantiation_of<graph_traits> GraphTraits>
71115class graph final {
72116public:
0 commit comments