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

View differences:

custompackages/graph-parser/src/bi_connected_components.h
42 42
    int const num_of_vertices() const;
43 43
    StringSet const& all_art_points_id() const;
44 44
    NameToDoubleMap const& bc_score() const;
45
    NameToDoubleMap const& bc_relative_score() const;
46

  
47
    // Auto run
48
    void run();
45 49

  
46 50
    // SUB-COMPONENT
47 51
    void FindBiConnectedComponents();
48
    void CreateSubComponents();
49 52

  
50 53
    // LINK WEIGHT - calculation for all sub-components
51 54
    void CalculateLinkWeight();
55
    void CalculateLinkWeightReversed();
52 56

  
53 57
    // TRAFFIC MATRIX - calculation for all sub-components
54 58
    void CalculateTrafficMatrix();
55 59

  
60
    // BETWEENNESS CENTRALITY HEURISTIC
61
    void CalculateBetweennessCentralityHeuristic();
62

  
56 63
    // BETWEENNESS CENTRALITY
57 64
    void CalculateBetweennessCentrality();
58
    void initialize_betweenness_centrality();
59
    void calculate_bc_inter();
60
    void finalize_betweenness_centrality();
61 65

  
62 66
    // HELPERS FOR OUTPUTTING RESULT
67
    void print_all_sub_components();
68

  
69
    void print_betweenness_centrality();
70
    void print_betweenness_centrality_heuristic();
71

  
72
    void write_all_betweenness_centrality(string filepath);
73

  
63 74
    void print();
64 75
    friend std::ostream& operator<<(std::ostream& os, const BiConnectedComponents& rhs);
65 76

  
......
70 81
    Component_t BCCs;
71 82

  
72 83
private:
84
    // SUB-COMPONENT
85
    void CreateSubComponents();
86

  
73 87
    // LINK WEIGHT - calculation for all sub-components
74 88
    void initialize_weight();
75 89
    void initialize_queue();
......
77 91
    void process_vertex_component_pair(int comp_index, string vertex_id);
78 92
    void find_unknown_weight_wrt_art_point(string vertex_id);
79 93
    void find_unknown_weight_wrt_component(int comp_index);
94
    bool verify_link_weight();
95

  
96
    // BETWEENNESS CENTRALITY HEURISTIC
97
    void initialize_betweenness_centrality_heuristic();
98
    void calculate_bc_inter();
99
    void finalize_betweenness_centrality_heuristic();
100

  
101
    // BETWEENNESS CENTRALITY
102
    void initialize_betweenness_centrality();
80 103

  
81 104
    // Private variables
82 105
    ComponentVec component_vec_;
......
90 113
    std::queue<QueueElem> Q;
91 114

  
92 115
    // bc_score_ will be updated gradually, first with the score for non art points, and then the score for art points
116
    // Betweenness Centrality Heuristic
93 117
    NameToDoubleMap bc_score_;
118
    NameToDoubleMap bc_relative_score_;
94 119
    NameToDoubleMap bc_sum_art_points_; // summing all the bc score for articulation points
95 120
    NameToDoubleMap bc_inter_;
121

  
122
    // Betweenness Centrality - standard calculation
123
    CentralityVec v_centrality_vec_;
124
    CentralityPMap v_centrality_pmap_;
96 125
};
97 126

  
98 127
#endif //GRAPH_PARSER_BI_CONNECTED_COMPONENTS_H

Also available in: Unified diff