@@ -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.
3940template <typename G>
4041concept 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.
4446template <typename G>
4547concept 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.
4952template <typename G>
5053concept 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.
5458template <typename G>
5559concept 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.
6067template <typename G>
6168concept 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.
6573template <typename G>
6674concept 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.
7189template <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.
8194template <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.
9097template <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).
11871199template <traits::c_graph Graph>
11881200[[nodiscard]] Graph clone (const Graph& source) {
11891201 return Graph (source);
0 commit comments