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
pub const HG_PI : f64 = std::f64::consts::PI;
pub const HG_INF_TEMPERATURE : f64 = 10.0;
pub const HG_INF_GAMMA : f64 = 10.0;
pub const HG_INF_RADIUS : f64 = 1000.0;
pub type Graph = (Vec<HgCoordinateType>, Vec<HgConnectionType>);
pub struct HgCoordinateType {
pub r: f64, pub theta: f64, }
pub struct HgConnectionType {
pub id: usize,
pub other_id: usize,
}
pub enum HgGraphType {
HyperbolicRgg,
HyperbolicStandard,
SoftConfigurationModel,
AngularRgg,
SoftRgg,
ErdosRenyi
}
pub struct HgParametersType {
pub gtype: HgGraphType,
pub expected_n: usize,
pub temperature: f64,
pub expected_gamma: f64,
pub expected_degree: f64,
pub zeta_eta: f64,
pub starting_id: usize
}
impl HgParametersType {
pub fn new(n: usize,
k_bar: f64,
exp_gamma: f64,
t: f64,
zeta_eta: f64,
gtype: HgGraphType) -> Self {
Self {
gtype: gtype,
expected_n: n,
temperature: t,
expected_gamma: exp_gamma,
expected_degree: k_bar,
zeta_eta: zeta_eta,
starting_id: 1,
}
}
}
pub struct HgAlgorithmParametersType {
pub radius: f64,
pub alpha: f64,
pub eta: f64,
pub c: f64,
}
impl HgAlgorithmParametersType {
pub fn new() -> Self {
Self {
radius: -1.0,
alpha: -1.0,
eta: -1.0,
c: -1.0
}
}
}
pub struct HgFParams {
pub rr: f64, pub alpha: f64,
pub zeta: f64,
pub eta: f64,
pub beta: f64,
}
impl HgFParams {
pub fn new(rr: f64, alpha: f64, zeta: f64, eta: f64, beta: f64) -> Self {
Self {
rr: rr,
alpha: alpha,
zeta: zeta,
eta: eta,
beta: beta,
}
}
}