root/applications/robust/main.cpp
@
1268
Revision 1268, 1.6 kB (checked in by sindj, 14 years ago) |
---|
Rev | Line | |
---|---|---|
[976] | 1 | |
2 | /*! | |
3 | \file | |
4 | \brief Robust | |
5 | \author Vasek Smidl | |
6 | ||
7 | */ | |
8 | ||
9 | #include "robustlib.h" | |
[1216] | 10 | #include <vector> |
[1208] | 11 | using namespace itpp; |
[976] | 12 | |
[1213] | 13 | using namespace bdm; |
[976] | 14 | |
[1268] | 15 | const int emlig_size = 3; |
16 | ||
[976] | 17 | int main ( int argc, char* argv[] ) { |
18 | ||
[1186] | 19 | |
[1268] | 20 | emlig* emlig1 = new emlig(emlig_size); |
21 | ||
[1267] | 22 | /* |
23 | emlig1->set_correction_factors(4); | |
[1266] | 24 | |
[1267] | 25 | for(int j = 0;j<emlig1->correction_factors.size();j++) |
26 | { | |
27 | for(set<my_ivec>::iterator vec_ref = emlig1->correction_factors[j].begin();vec_ref!=emlig1->correction_factors[j].end();vec_ref++) | |
28 | { | |
[1268] | 29 | cout << j << " "; |
30 | ||
[1267] | 31 | for(int i=0;i<(*vec_ref).size();i++) |
32 | { | |
33 | cout << (*vec_ref)[i]; | |
34 | } | |
35 | ||
36 | cout << endl; | |
37 | } | |
[1268] | 38 | }*/ |
39 | ||
[1267] | 40 | |
[1234] | 41 | //emlig1->step_me(0); |
42 | ||
[1219] | 43 | for(int i = 0;i<500;i++) |
44 | { | |
[1220] | 45 | cout << "Step:" << i << endl; |
[1208] | 46 | |
[1268] | 47 | double condition[emlig_size+1]; |
[1220] | 48 | |
[1268] | 49 | for(int k = 0;k<=emlig_size;k++) |
50 | { | |
51 | condition[k] = rand()/1000.0; | |
52 | } | |
53 | ||
[1216] | 54 | |
[1268] | 55 | vec* condition_vec = new vec(condition,emlig_size+1); |
[1219] | 56 | emlig1->add_condition(*condition_vec); |
[1268] | 57 | |
[1219] | 58 | |
[1234] | 59 | emlig1->step_me(i); |
[1219] | 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 | ||
68 | ||
69 | ||
70 | /* | |
71 | emlig1->step_me(1); | |
72 | ||
73 | vec condition = "2.0 0.0 1.0"; | |
74 | ||
[1208] | 75 | emlig1->add_condition(condition); |
76 | ||
[1216] | 77 | vector<int> sizevector; |
78 | for(int s = 0;s<=emlig1->number_of_parameters;s++) | |
79 | { | |
80 | sizevector.push_back(emlig1->statistic_rowsize(s)); | |
81 | } | |
82 | ||
[1219] | 83 | emlig1->step_me(2); |
[1216] | 84 | |
[1219] | 85 | condition = "2.0 1.0 0.0"; |
[1216] | 86 | |
87 | emlig1->add_condition(condition); | |
88 | ||
89 | sizevector.clear(); | |
90 | for(int s = 0;s<=emlig1->number_of_parameters;s++) | |
91 | { | |
92 | sizevector.push_back(emlig1->statistic_rowsize(s)); | |
93 | } | |
[1219] | 94 | */ |
[1216] | 95 | |
[976] | 96 | return 0; |
97 | } |
Note: See TracBrowser
for help on using the browser.