Revision 162e1bda custompackages/graph-parser/src/utility.h

View differences:

custompackages/graph-parser/src/utility.h
7 7
#define GRAPH_PARSER_UTILITY_H
8 8

  
9 9
#include <iostream>
10
#include <fstream>
10 11
#include <boost/graph/graph_traits.hpp>
11 12
#include <boost/graph/undirected_graph.hpp>
12 13
#include <boost/spirit/include/karma.hpp>
......
42 43
    template <typename Container>
43 44
    void id_of_some_vertices(const Graph& g, const Container& container, std::set<std::string>& r);
44 45

  
46
    void print_edge(const Graph& g, const Edge& e);
47

  
45 48
    void print_v_index_std_map(const Graph& g, const VertexIndexStdMap& v_index_std_map);
46 49
    void print_v_index_pmap(const Graph& g, const VertexIndexPMap& v_index_pmap);
47 50
    void print_e_index_pmap(const Graph& g, const EdgeIndexPMap& e_index_pmap);
51

  
52
    void write_betweenness_centrality(Graph const& g, std::vector<double> v_centrality_vec, string filepath);
48 53
}
49 54

  
50 55
namespace setops {
......
55 60
namespace stdhelper {
56 61
    template <typename T1, typename T2> bool exists(const std::map<T1, T2>& m, const T1& key);
57 62
    template <typename T> bool exists(const std::set<T>& s, const T& element);
63

  
64
}
65

  
66
namespace helper {
67
    // I do not want to use boost::filesystem, due to additional library must be included
68
    string get_file_name(const string& s);
58 69
}
59 70

  
60 71
template <typename Pair>
......
75 86
    typename Pair::second_type value_;
76 87
};
77 88

  
89
template <typename T1, typename T2>
90
struct less_second {
91
    typedef pair<T1, T2> type;
92
    bool operator ()(type const& a, type const& b) const {
93
        return a.second < b.second;
94
    }
95
};
96

  
78 97
#include "utility.tpp"
79 98

  
80 99
#endif //GRAPH_PARSER_UTILITY_H

Also available in: Unified diff