| 99 | */ |
| 100 | template<typename Graph, typename OutIt> |
| 101 | OutIt |
| 102 | extend(const Graph& g, typename Graph::vertex_descriptor u, OutIt out) |
| 103 | { |
| 104 | typedef typename graph_traits<Graph>::vertex_descriptor vertex_descriptor; |
| 105 | std::set<vertex_descriptor> seen; |
| 106 | while (out_degree(u, g) == 1 && seen.insert(u).second) { |
| 107 | u = *adjacent_vertices(u, g).first; |
| 108 | *out++ = u; |
| 109 | } |
| 110 | return out; |
| 111 | } |
| 112 | |
| 113 | /** Assemble an unambiguous path starting at vertex u. |
| 114 | * Every edge must satisfy the predicate. */ |
no test coverage detected