Revision 437fd680 custompackages/graph-parser/src/sub_component.h

View differences:

custompackages/graph-parser/src/sub_component.h
17 17
class SubComponent {
18 18
public:
19 19
    typedef std::vector<double> CentralityVec;
20
    typedef boost::iterator_property_map<CentralityVec::iterator, VertexIndexMap> CentralityMap;
20
    typedef boost::iterator_property_map<CentralityVec::iterator, VertexIndexPMap> CentralityPMap;
21 21

  
22 22
    SubComponent();
23 23

  
......
32 32

  
33 33
    vector< vector< int > > const& traffic_matrix() const;
34 34

  
35
    CentralityVec const& v_centrality_vec() const;
36

  
35 37
    // CREATE SUB-COMPONENT
36 38
    void AddEdge(Router r1, Router r2, Link l);
37 39
    void FinalizeSubComponent(StringSet all_art_points_id);
......
51 53
    // BETWEENNESS CENTRALITY
52 54
    void CalculateBetweennessCentrality();
53 55
    void initialize_betweenness_centrality();
56
    double get_betweenness_centrality(string name);
57
    double get_betweenness_centrality(Vertex v);
54 58

  
55 59
    // HELPERS
56 60
    int num_of_vertices();
......
59 63
    string first_vertex_id_with_unknown_weight();
60 64

  
61 65
    // HELPERS FOR OUTPUTTING RESULT
62
    void print_traffic_matrix();
66
    void print();
63 67
    friend std::ostream& operator<<(std::ostream& os, const SubComponent& sc);
68
    void print_traffic_matrix();
64 69

  
65 70

  
66 71
    // OLD CODE
......
79 84
    StringSet all_vertices_id_;
80 85
    StringSet art_points_id_;
81 86
    StringSet non_art_points_id_; // vertices that are not articulation points
82
    NameToIntMap name_index_map_;
87
    NameToIntMap name_index_pmap_;
83 88

  
84 89

  
85 90
    NameToIntMap weight_map_;
......
88 93
    vector<vector<int> > traffic_matrix_;
89 94

  
90 95
    CentralityVec v_centrality_vec_;
91
    CentralityMap v_centrality_map_;
96
    CentralityPMap v_centrality_pmap_;
92 97

  
93 98

  
94 99
};
95

  
96

  
97 100
#endif //GRAPH_PARSER_SUB_COMPONENT_H

Also available in: Unified diff