Revision 1220, 1.4 kB
(checked in by sindj, 14 years ago)
|
Dodelani propagace vrcholu pri deleni. JS
|
Line | |
---|
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(8); |
---|
18 | |
---|
19 | for(int i = 0;i<500;i++) |
---|
20 | { |
---|
21 | cout << "Step:" << i << endl; |
---|
22 | |
---|
23 | double condition[9]; |
---|
24 | |
---|
25 | condition[0] = rand()/1000.0; |
---|
26 | condition[1] = rand()/1000.0; |
---|
27 | condition[2] = rand()/1000.0; |
---|
28 | condition[3] = rand()/1000.0; |
---|
29 | condition[4] = rand()/1000.0; |
---|
30 | condition[5] = rand()/1000.0; |
---|
31 | condition[6] = rand()/1000.0; |
---|
32 | condition[7] = rand()/1000.0; |
---|
33 | condition[8] = rand()/1000.0; |
---|
34 | |
---|
35 | |
---|
36 | vec* condition_vec = new vec(condition,9); |
---|
37 | emlig1->add_condition(*condition_vec); |
---|
38 | |
---|
39 | // emlig1->step_me(i); |
---|
40 | |
---|
41 | vector<int> sizevector; |
---|
42 | for(int s = 0;s<=emlig1->number_of_parameters;s++) |
---|
43 | { |
---|
44 | sizevector.push_back(emlig1->statistic_rowsize(s)); |
---|
45 | } |
---|
46 | } |
---|
47 | |
---|
48 | |
---|
49 | |
---|
50 | /* |
---|
51 | emlig1->step_me(1); |
---|
52 | |
---|
53 | vec condition = "2.0 0.0 1.0"; |
---|
54 | |
---|
55 | emlig1->add_condition(condition); |
---|
56 | |
---|
57 | vector<int> sizevector; |
---|
58 | for(int s = 0;s<=emlig1->number_of_parameters;s++) |
---|
59 | { |
---|
60 | sizevector.push_back(emlig1->statistic_rowsize(s)); |
---|
61 | } |
---|
62 | |
---|
63 | emlig1->step_me(2); |
---|
64 | |
---|
65 | condition = "2.0 1.0 0.0"; |
---|
66 | |
---|
67 | emlig1->add_condition(condition); |
---|
68 | |
---|
69 | sizevector.clear(); |
---|
70 | for(int s = 0;s<=emlig1->number_of_parameters;s++) |
---|
71 | { |
---|
72 | sizevector.push_back(emlig1->statistic_rowsize(s)); |
---|
73 | } |
---|
74 | */ |
---|
75 | |
---|
76 | return 0; |
---|
77 | } |
---|