2 #ifndef ANDRES_GRAPH_PATHS_HXX
3 #define ANDRES_GRAPH_PATHS_HXX
8 #include "andres/graph/graph.hxx"
20 template<
class GRAPH,
class ITERATOR>
21 inline std::pair<bool, std::size_t>
26 const bool ignoreEdgeBetweenFirstAndLast =
false
29 ignoreEdgeBetweenFirstAndLast);
40 template<
class GRAPH,
class SUBGRAPH_MASK,
class ITERATOR>
41 inline std::pair<bool, std::size_t>
44 const SUBGRAPH_MASK& mask,
47 const bool ignoreEdgeBetweenFirstAndLast =
false
49 for(ITERATOR it = begin; it != end - 1; ++it)
50 for(ITERATOR it2 = it + 2; it2 != end; ++it2) {
51 if(ignoreEdgeBetweenFirstAndLast && it == begin && it2 == end - 1) {
54 std::pair<bool, std::size_t> p = graph.findEdge(*it, *it2);
55 if(p.first && mask.edge(p.second)) {
59 return std::pair<bool, std::size_t>(
false, 0);
65 #endif // #ifndef ANDRES_GRAPH_PATHS_HXX