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

View differences:

custompackages/graph-parser/src/sub_component.h
10 10

  
11 11
#include <boost/graph/betweenness_centrality.hpp>
12 12
#include <boost/graph/copy.hpp>
13
#include "centrality.h"
13 14
#include "common.h"
14 15
#include "utility.h"
15 16
#include "graph_manager.h"
......
30 31
    NameToIntMap const& weight_map() const;
31 32
    NameToIntMap const& weight_reversed_map() const;
32 33

  
33
    vector< vector< int > > const& traffic_matrix() const;
34
    std::map< std::pair<string, string>, int > const& traffic_matrix() const;
34 35

  
35 36
    CentralityVec const& v_centrality_vec() const;
36 37

  
......
43 44
    int get_weight_map(string name);
44 45
    int get_weight_reversed_map(string name);
45 46
    void update_weight_map(string name, int value);
47
    void update_weight_reversed_map(string name, int value);
48
    void calculate_weight_reversed(int V);
46 49

  
47 50
    // TRAFFIC MATRIX CALCULATION
48 51
    void CalculateTrafficMatrix();
......
51 54
    void update_traffic_matrix(string name_1, string name_2, int value);
52 55

  
53 56
    // BETWEENNESS CENTRALITY
54
    void CalculateBetweennessCentrality();
57
    void CalculateBetweennessCentralityHeuristic();
55 58
    void initialize_betweenness_centrality();
56 59
    double get_betweenness_centrality(string name);
57 60
    double get_betweenness_centrality(Vertex v);
......
64 67

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

  
70 73

  
71 74
    // OLD CODE
......
86 89
    StringSet non_art_points_id_; // vertices that are not articulation points
87 90
    NameToIntMap name_index_pmap_;
88 91

  
89

  
90 92
    NameToIntMap weight_map_;
91 93
    NameToIntMap weight_reversed_map_;
92 94

  
93
    vector<vector<int> > traffic_matrix_;
95
    typedef std::map< std::pair<string, string>, int> TrafficMatrixStdMap;
96
    typedef boost::associative_property_map<TrafficMatrixStdMap> TrafficMatrixPMap;
97
    TrafficMatrixStdMap traffic_matrix_;
98
    TrafficMatrixPMap traffic_matrix_pmap_;
99

  
100
    // vector<vector<int> > traffic_matrix_;
94 101

  
95 102
    CentralityVec v_centrality_vec_;
96 103
    CentralityPMap v_centrality_pmap_;

Also available in: Unified diff