1#ifndef UTOPIA_CORE_GRAPH_ITERATORS_HH
2#define UTOPIA_CORE_GRAPH_ITERATORS_HH
4#include <boost/graph/adjacency_list.hpp>
5#include <boost/graph/adjacency_matrix.hpp>
6#include <boost/graph/subgraph.hpp>
7#include <boost/graph/filtered_graph.hpp>
67template<IterateOver iterate_over,
typename Graph>
69 using namespace boost;
80 "Only the iterator pairs of vertices and edges can be"
81 "returned: iterate_over is set wrong!");
106template<IterateOver iterate_over,
typename Graph,
typename EntityDesc>
108 using namespace boost;
127 "Only the iterator pairs of neighbors, inv_neighbors, "
128 "in_edge, and out_edge can be returned: "
129 "iterate_over is set wrong!");
148template<IterateOver iterate_over,
typename Graph>
150 return boost::make_iterator_range(
151 GraphUtils::iterator_pair<iterate_over>(
g));
176template<IterateOver iterate_over,
typename Graph,
typename EntityDesc>
178 return boost::make_iterator_range(
179 GraphUtils::iterator_pair<iterate_over>(
e,
g));
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213
IterateOver
Over which graph entity to iterate.
Definition iterator.hh:19
decltype(auto) range(const Graph &g)
Get the iterator range over selected graph entities.
Definition iterator.hh:149
@ in_edges
Iterate over the in edges of a vertex.
@ out_edges
Iterate over the out edges of a vertex.
@ neighbors
Iterate over neighbors (adjacent_vertices).
@ inv_neighbors
Iterate inversely over neighbors (adjacent_vertices).
@ vertices
Iterate over vertices.
@ edges
Iterate over edges.
decltype(auto) iterator_pair(const Graph &g)
Get an iterator pair over selected graph entities.
Definition iterator.hh:68