Statistics
| Branch: | Revision:

root / custompackages / graph-parser / src / utility.tpp @ efed924d

History | View | Annotate | Download (605 Bytes)

1
namespace outops {
2
    template <typename T>
3
    std::ostream& operator<<(std::ostream& os, const std::set<T>& s) {
4
        using namespace boost::spirit::karma;
5
        os << format("(" << (auto_ % "\n  ") << ")", s);
6
        os << endl;
7
    }
8
}
9

    
10
namespace graphext {
11
    template <typename Container>
12
    void id_of_vertices(const Graph& g, const Container& container, std::set<std::string>& r) {
13
        /*
14
        ** Find id for a vec
15
        */
16
        for (typename Container::const_iterator ci = container.begin(); ci != container.end(); ++ci) {
17
            r.insert(g[*ci].id);
18
        }
19
    }
20
}
21