-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cc
28 lines (25 loc) · 837 Bytes
/
main.cc
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
#include "main_utils.h"
#include "random_utils.h"
int
main (int argc, char **argv)
{
init ();
run_command_parameters (
argc,
argv,
std::string("kout"),
[&] (std::vector<stake_t> stakes, stake_t total_stake, size_t factor) {
return new k_out_protocol_simulator (
[&, stakes, total_stake, factor] (party_t i) { // imitation function
return (size_t) ((ceil ((((double) (stakes[i] * stakes.size ()))
/ ((double) total_stake))))
* (double) factor);
},
[&, stakes, total_stake, factor] (party_t i) { // nr flooding targets
return (size_t) (ceil ((((double) (stakes[i] * stakes.size ()))
/ ((double) total_stake))));
},
stakes);
});
return 0;
}