11 #ifndef __GRAPH_ALGORITHMS_H__
12 #define __GRAPH_ALGORITHMS_H__
26 #include <type_traits>
27 #include <unordered_map>
28 #include <unordered_set>
96 template<
typename NewMapGen,
typename NewSetGen>
128 template<
typename NewMapGen>
129 auto withMapGen(NewMapGen&& newVertexMapGen)
const {
132 std::decay_t<NewMapGen>,
136 std::forward<NewMapGen>(newVertexMapGen),
146 template<
typename NewSetGen>
147 auto withSetGen(NewSetGen&& newVertexSetGen)
const {
151 std::decay_t<NewSetGen>
155 std::forward<NewSetGen>(newVertexSetGen)
159 template<
typename... Params>
161 return this->vertex_map_gen.template operator()<Params...>();
164 template<
typename... Params>
166 return this->vertex_set_gen.template operator()<Params...>();
169 template<
typename... Params>
170 using VertexMap = std::decay_t<decltype(std::declval<MapGen>().template operator()<Params...>())>;
173 template<
typename... Params>
174 using VertexSet = std::decay_t<decltype(std::declval<SetGen>().template operator()<Params...>())>;
175 using PathList = std::vector<VertexPath>;
176 using EdgeSet = std::set<std::pair<VertexID, VertexID>>;
182 template<
typename STREAM,
typename GRAPH>
183 void print(STREAM&& os,
const GRAPH& g)
const {
189 template<
typename STREAM>
203 #endif // __GRAPH_ALGORITHMS_H__