This repository has been archived by the owner on Jan 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
export.cpp
61 lines (50 loc) · 1.59 KB
/
export.cpp
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
#include "export.h"
#include "bmlrp.h"
#include "debug.h"
#include "graph.h"
#include "misc.h"
#include "sim.h"
using std::string;
using std::vector;
// [[Rcpp::export]]
void SetSeed_R(uint seed) {
Gen.seed(seed);
}
// [[Rcpp::export]]
Network_R Random_R(int n, float r_coeff, float random_edges_ratio_nodes,
int level, string filter, int label) {
return Network_R(
GetNetworkLevel(Random(n, r_coeff, random_edges_ratio_nodes), level),
filter, label);
}
// [[Rcpp::export]]
vector<float> RandomNodeDegrees_R(int n, float r_coeff,
float random_edges_ratio_nodes,
int max_level) {
return GetAverageNodeDegrees(Random(n, r_coeff, random_edges_ratio_nodes),
max_level);
}
// [[Rcpp::export]]
Network_R Manual0_R(int level, string filter) {
return Network_R(GetNetworkLevel(Manual0(), level), filter, 5);
}
// [[Rcpp::export]]
Network_R Manual1_R(int level, string filter) {
return Network_R(GetNetworkLevel(Manual1(), level), filter, 5);
}
// [[Rcpp::export]]
Network_R Manual2_R(int level, string filter) {
return Network_R(GetNetworkLevel(Manual2(), level), filter, 5);
}
// [[Rcpp::export]]
Network_R Manual3_R(int level, string filter) {
return Network_R(GetNetworkLevel(Manual3(), level), filter, 5);
}
// [[Rcpp::export]]
Network_R Manual4_R(int level, string filter) {
return Network_R(GetNetworkLevel(Manual4(), level), filter, 5);
}
// [[Rcpp::export]]
Network_R Manual5_R(int level, string filter) {
return Network_R(GetNetworkLevel(Manual5(), level), filter, 5);
}