1 | |
---|
2 | /*! |
---|
3 | \file |
---|
4 | \brief Robust |
---|
5 | \author Vasek Smidl |
---|
6 | |
---|
7 | */ |
---|
8 | |
---|
9 | #include "robustlib.h" |
---|
10 | #include <vector> |
---|
11 | using namespace itpp; |
---|
12 | |
---|
13 | using namespace bdm; |
---|
14 | |
---|
15 | int main ( int argc, char* argv[] ) { |
---|
16 | |
---|
17 | emlig* emlig1 = new emlig(3); |
---|
18 | |
---|
19 | emlig1->set_correction_factors(3); |
---|
20 | |
---|
21 | //emlig1->step_me(0); |
---|
22 | |
---|
23 | for(int i = 0;i<500;i++) |
---|
24 | { |
---|
25 | cout << "Step:" << i << endl; |
---|
26 | |
---|
27 | double condition[4]; |
---|
28 | |
---|
29 | condition[0] = rand()/1000.0; |
---|
30 | condition[1] = rand()/1000.0; |
---|
31 | condition[2] = rand()/1000.0; |
---|
32 | condition[3] = rand()/1000.0; |
---|
33 | /*condition[4] = rand()/1000.0; |
---|
34 | condition[5] = rand()/1000.0; |
---|
35 | condition[6] = rand()/1000.0; |
---|
36 | condition[7] = rand()/1000.0; |
---|
37 | condition[8] = rand()/1000.0;*/ |
---|
38 | |
---|
39 | |
---|
40 | vec* condition_vec = new vec(condition,4); |
---|
41 | emlig1->add_condition(*condition_vec); |
---|
42 | |
---|
43 | emlig1->step_me(i); |
---|
44 | |
---|
45 | vector<int> sizevector; |
---|
46 | for(int s = 0;s<=emlig1->number_of_parameters;s++) |
---|
47 | { |
---|
48 | sizevector.push_back(emlig1->statistic_rowsize(s)); |
---|
49 | } |
---|
50 | } |
---|
51 | |
---|
52 | |
---|
53 | |
---|
54 | /* |
---|
55 | emlig1->step_me(1); |
---|
56 | |
---|
57 | vec condition = "2.0 0.0 1.0"; |
---|
58 | |
---|
59 | emlig1->add_condition(condition); |
---|
60 | |
---|
61 | vector<int> sizevector; |
---|
62 | for(int s = 0;s<=emlig1->number_of_parameters;s++) |
---|
63 | { |
---|
64 | sizevector.push_back(emlig1->statistic_rowsize(s)); |
---|
65 | } |
---|
66 | |
---|
67 | emlig1->step_me(2); |
---|
68 | |
---|
69 | condition = "2.0 1.0 0.0"; |
---|
70 | |
---|
71 | emlig1->add_condition(condition); |
---|
72 | |
---|
73 | sizevector.clear(); |
---|
74 | for(int s = 0;s<=emlig1->number_of_parameters;s++) |
---|
75 | { |
---|
76 | sizevector.push_back(emlig1->statistic_rowsize(s)); |
---|
77 | } |
---|
78 | */ |
---|
79 | |
---|
80 | return 0; |
---|
81 | } |
---|