1#ifndef GRAPHLIB_INTERNAL_CONCEPTS_H
2#define GRAPHLIB_INTERNAL_CONCEPTS_H
18namespace GraphLib::Internal {
33 { os << a } -> std::same_as<std::ostream&>;
62 std::is_unsigned_v<T> && std::incrementable<T>;
77 std::numeric_limits<T>::has_infinity ==
true;
85template <val
id_
id_type I>
88template <val
id_
id_type I, val
id_weight_type W>
97template <
typename E,
typename I>
98concept valid_edge_type = std::is_aggregate_v<E> &&
requires {
typename E::id_type; } && std::derived_from<E, Edge<I>>;
106template <
typename E,
typename I>
109 typename E::weight_type;
110} && std::derived_from<E, WeightedEdge<I, typename E::weight_type>>;
114template <val
id_data_type D, val
id_
id_type I, val
id_edge_type<I> E>
117template <val
id_data_type D, val
id_
id_type I, val
id_edge_type<I> E>
120template <val
id_data_type D, val
id_
id_type I, val
id_edge_type<I> E>
123template <val
id_data_type D, val
id_
id_type I, val
id_weighted_edge_type<I> E>
126template <val
id_data_type D, val
id_
id_type I, val
id_edge_type<I> E>
136 typename G::data_type;
138 typename G::edge_type;
149 std::derived_from<G, Graph<typename G::data_type, typename G::id_type, typename G::edge_type>>;
161 std::derived_from<G, DirectedGraph<typename G::data_type, typename G::id_type, typename G::edge_type>>;
171 std::derived_from<G, UndirectedGraph<typename G::data_type, typename G::id_type, typename G::edge_type>>;
181 std::derived_from<G, WeightedGraph<typename G::data_type, typename G::id_type, typename G::edge_type>>;
191 std::derived_from<G, UnweightedGraph<typename G::data_type, typename G::id_type, typename G::edge_type>>;
A graph class representing directed graphs.
Abstract base class for a generic graph structure.
A graph class representing undirected graphs.
A graph class representing unweighted graphs.
A graph class representing weighted graphs.
Checks if a type provides the core type aliases (data_type, id_type, edge_type).
Checks whether a type supports streaming to std::ostream.
Placeholder for user-defined data types used in vertices or edges.
Checks if a type derives from DirectedGraph.
Checks whether a type is an aggregate and derived from Edge<I>.
Checks if a type derives from Graph<D, I, E>.
Concept for a valid ID type in graph components.
Checks if a type derives from UndirectedGraph.
Graph type that is both unweighted and directed.
Checks if a type derives from UnweightedGraph.
Graph type that is both unweighted and undirected.
Concept for a valid edge weight type.
Graph type that is both weighted and directed.
Checks whether a type is an aggregate and derived from WeightedEdge<I, W>.
Checks if a type derives from WeightedGraph.
Graph type that is both weighted and undirected.
Represents an unweighted edge to a node identified by an ID.
Represents a weighted edge to a node identified by an ID, with an associated weight.