-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresultInfo.h
165 lines (138 loc) · 3.16 KB
/
resultInfo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
//
// Created by sbian on 2019/9/5.
//
#ifndef BIM_RESULTINFO_H
#define BIM_RESULTINFO_H
class ResultInfo
{
private:
double __RunningTime = -1.0, __Influence = -1.0, __InfluenceOriginal = -1.0, __Approx = -1.0;
int __SeedSize = 0;
size_t __RRsetsSize = 0;
double __BoundMin_inf = 0;
double __BoundMin_inf_cost = 0;
Nodelist __VecSeed;
Nodelist __VecSeed_inf;
Nodelist __VecSeed_inf_cost;
public:
ResultInfo()
{
}
~ResultInfo()
{
}
/// Get running time.
double get_running_time() const
{
return __RunningTime;
}
/// Get influence spread.
double get_influence() const
{
return __Influence;
}
/// Get self-estimated influence spread.
double get_influence_original() const
{
return __InfluenceOriginal;
}
/// Get approximation guarantee.
double get_approximation() const
{
return __Approx;
}
/// Get Bound influence
double get_boundmin_inf() const
{
return __BoundMin_inf;
}
/// Get Bound influence cost
double get_boundmin_inf_cost() const
{
return __BoundMin_inf_cost;
}
/// Get seed sets.
Nodelist get_seed_vec() const
{
return __VecSeed;
}
/// Get seed greedy influence
Nodelist get_seed_inf_vec() const
{
return __VecSeed_inf;
}
/// Get seed greedy influence/cost
Nodelist get_seed_inf_cost_vec() const
{
return __VecSeed_inf_cost;
}
/// Get seed size.
int get_seed_size() const
{
return __SeedSize;
}
/// Get the number of RR sets.
size_t get_RRsets_size() const
{
return __RRsetsSize;
}
/// Set running time.
void set_running_time(const double value)
{
__RunningTime = value;
}
/// Set influence spread.
void set_influence(const double value)
{
__Influence = value;
}
/// Set self-estimated influence spread
void set_influence_original(const double value)
{
__InfluenceOriginal = value;
}
/// Set approximation guarantee.
void set_approximation(const double value)
{
__Approx = value;
}
/// Set seed sets.
void set_seed_vec(Nodelist& vecSeed)
{
__VecSeed = vecSeed;
set_seed_size((int)vecSeed.size());
}
/// Set seed influence sets.
void set_seed_inf_vec(Nodelist & vecSeed)
{
__VecSeed_inf = vecSeed;
}
/// Set seed influence/cost sets
void set_seed_inf_cost_vec(Nodelist & vecSeed)
{
__VecSeed_inf_cost = vecSeed;
}
/// Set bound min influence
void set_boundmin_inf(const double value)
{
__BoundMin_inf = value;
}
/// Set bound min influence cost
void set_boundmin_inf_cost(const double value)
{
__BoundMin_inf_cost = value;
}
/// Set seed size.
void set_seed_size(const int value)
{
__SeedSize = value;
}
/// Set the number of RR sets.
void set_RR_sets_size(const size_t value)
{
__RRsetsSize = value;
}
};
typedef ResultInfo TResult;
typedef std::shared_ptr<ResultInfo> PResult;
#endif //BIM_RESULTINFO_H