Skip to content

Commit 6e2ca57

Browse files
committed
docs alignment
1 parent 5e538db commit 6e2ca57

4 files changed

Lines changed: 34 additions & 17 deletions

File tree

docs/concepts_cfg.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
"GL": {
99
"prefix": "gl::",
1010
"filename": "gl_concepts.md",
11-
"anchor": "gl-traits-concepts-documentation",
11+
"anchor": "gl-concepts-documentation",
1212
"title": "GL Concepts",
1313
"description": "This page documents the C++20 concepts defined within the GL module of the library."
1414
},
1515
"HGL": {
1616
"prefix": "hgl::",
1717
"filename": "hgl_concepts.md",
18-
"anchor": "hgl-traits-concepts-documentation",
18+
"anchor": "hgl-concepts-documentation",
1919
"title": "HGL Concepts",
2020
"description": "This page documents the C++20 concepts defined within the HGL module of the library."
2121
}

docs/groups.dox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
///
6363
/// @section concepts_link Detailed Concept Specifications
6464
/// For a detailed list of all GL module's concepts and their formal requirements, please refer to
65-
/// the [GL Concepts Documentation](gl_concepts.md#gl-traits-concepts-documentation) page.
65+
/// the [GL Concepts Documentation](gl_concepts.md#gl-concepts-documentation) page.
6666

6767
/// @defgroup GL-Types Generic Types
6868
/// @ingroup GL

include/gl/conversion.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,14 @@ struct to_impl<impl::matrix_t, impl::flat_matrix_t> {
144144

145145
} // namespace detail
146146

147+
/// @ingroup GL GL-Core
148+
/// @headerfile gl/conversion.hpp
147149
/// @brief Converts a graph from one implementation model to another.
148-
/// @tparam TargetImplTag The desired implementation tag (e.g., gl::impl::flat_list_t)
149-
/// @tparam Graph The automatically deduced type of the source graph
150+
/// ### Template Parameters
151+
/// | Parameter | Description | Constraints |
152+
/// | :------------ | :---------- | :---------- |
153+
/// | TargetImplTag | The implementation tag of the desired target representation (e.g., `gl::impl::flat_list_t`) | [**c_graph_impl_tag**](gl_concepts.md#gl-traits-c-graph-impl-tag) |
154+
/// | Graph | The type of the source graph, which will be automatically deduced from the function argument. | [**c_graph**](gl_concepts.md#gl-traits-c-graph) |
150155
/// @param source The graph to convert. After the operation it will be left in a valid, empty state.
151156
/// @return A new graph containing the moved data, structured according to TargetImplTag.
152157
template <traits::c_graph_impl_tag TargetImplTag, traits::c_graph Graph>

include/gl/graph.hpp

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,57 +36,64 @@ concept c_graph = c_instantiation_of<G, graph>;
3636

3737
/// @ingroup GL GL-Traits
3838
/// @brief Concept checking if a graph is directed.
39+
/// @see gl::directed_t "directed_t" : For the directional tag used to specify directed graph configuration.
3940
template <typename G>
4041
concept c_directed_graph = c_graph<G> and c_directed_edge<typename G::edge_type>;
4142

4243
/// @ingroup GL GL-Traits
4344
/// @brief Concept checking if a graph is undirected.
45+
/// @see gl::undirected_t "undirected_t" : For the directional tag used to specify undirected graph configuration.
4446
template <typename G>
4547
concept c_undirected_graph = c_graph<G> and c_undirected_edge<typename G::edge_type>;
4648

4749
/// @ingroup GL GL-Traits
4850
/// @brief Concept checking if a graph utilizes the standard adjacency list implementation.
51+
/// @see gl::impl::list_t "list_t" : For the implementation tag used to specify the standard adjacency list representation.
4952
template <typename G>
5053
concept c_list_graph = c_graph<G> and std::same_as<typename G::implementation_tag, impl::list_t>;
5154

5255
/// @ingroup GL GL-Traits
5356
/// @brief Concept checking if a graph utilizes the flattened adjacency list implementation.
57+
/// @see gl::impl::flat_list_t "flat_list_t" : For the implementation tag used to specify the flattened adjacency list representation.
5458
template <typename G>
5559
concept c_flat_list_graph =
5660
c_graph<G> and std::same_as<typename G::implementation_tag, impl::flat_list_t>;
5761

5862
/// @ingroup GL GL-Traits
5963
/// @brief Concept checking if a graph utilizes any list-based adjacency implementation.
64+
/// ### See Also
65+
/// - @ref gl::impl::list_t "list_t" : For the implementation tag used to specify the standard adjacency list representation.
66+
/// - @ref gl::impl::flat_list_t "flat_list_t" : For the implementation tag used to specify the flattened adjacency list representation.
6067
template <typename G>
6168
concept c_adjacency_list_graph = c_list_graph<G> or c_flat_list_graph<G>;
6269

6370
/// @ingroup GL GL-Traits
6471
/// @brief Concept checking if a graph utilizes the standard adjacency matrix implementation.
72+
/// @see gl::impl::matrix_t "matrix_t" : For the implementation tag used to specify the standard adjacency matrix representation.
6573
template <typename G>
6674
concept c_matrix_graph =
6775
c_graph<G> and std::same_as<typename G::implementation_tag, impl::matrix_t>;
6876

77+
/// @ingroup GL GL-Traits
78+
/// @brief Concept checking if a graph utilizes the flattened adjacency matrix implementation.
79+
/// @see gl::impl::flat_matrix_t "flat_matrix_t" : For the implementation tag used to specify the flattened adjacency matrix representation.
80+
template <typename G>
81+
concept c_flat_matrix_graph =
82+
c_graph<G> and std::same_as<typename G::implementation_tag, impl::flat_matrix_t>;
83+
6984
/// @ingroup GL GL-Traits
7085
/// @brief Concept checking if a graph utilizes any matrix-based adjacency implementation.
86+
/// ### See Also
87+
/// - @ref gl::impl::matrix_t "matrix_t" : For the implementation tag used to specify the standard adjacency matrix representation.
88+
/// - @ref gl::impl::flat_matrix_t "flat_matrix_t" : For the implementation tag used to specify the flattened adjacency matrix representation.
7189
template <typename G>
72-
concept c_adjacency_matrix_graph = c_matrix_graph<G>;
90+
concept c_adjacency_matrix_graph = c_matrix_graph<G> or c_flat_matrix_graph<G>;
7391

7492
} // namespace traits
7593

76-
/// @ingroup GL GL-Core
77-
/// @brief Creates a deep copy of the given graph.
78-
/// @tparam Graph The type of the graph.
79-
/// @param source The graph instance to clone.
80-
/// @return A newly constructed graph containing identical vertices and edges.
8194
template <traits::c_graph Graph>
8295
[[nodiscard]] Graph clone(const Graph& source);
8396

84-
/// @ingroup GL GL-Core
85-
/// @brief Converts a graph to a different implementation type defined by `TargetImplTag`.
86-
/// @tparam TargetImplTag The implementation tag of the desired target representation.
87-
/// @tparam Graph The type of the source graph.
88-
/// @param source The source graph to convert.
89-
/// @return A new graph instance utilizing the target implementation.
9097
template <traits::c_graph_impl_tag TargetImplTag, traits::c_graph Graph>
9198
[[nodiscard]] auto to(Graph&& source);
9299

@@ -1184,6 +1191,11 @@ class graph final {
11841191

11851192
// --- general graph utility ---
11861193

1194+
/// @ingroup GL GL-Core
1195+
/// @brief Creates a deep copy of the given graph.
1196+
/// @tparam Graph The type of the graph.
1197+
/// @param source The graph instance to clone.
1198+
/// @return A newly constructed graph containing identical vertices, edges and properties (if applicable).
11871199
template <traits::c_graph Graph>
11881200
[[nodiscard]] Graph clone(const Graph& source) {
11891201
return Graph(source);

0 commit comments

Comments
 (0)