Revision 19, 0.6 kB
(checked in by smidl, 17 years ago)
|
Switch to CMake
|
Line | |
---|
1 | #include <itpp/itbase.h> |
---|
2 | #include <estim/libPF.h> |
---|
3 | #include <math/libDC.h> |
---|
4 | #include <stat/libEF.h> |
---|
5 | |
---|
6 | using namespace itpp; |
---|
7 | |
---|
8 | //These lines are needed for use of cout and endl |
---|
9 | using std::cout; |
---|
10 | using std::endl; |
---|
11 | |
---|
12 | int main() { |
---|
13 | |
---|
14 | RV x("1"); |
---|
15 | RV xm=x; xm.t(-1); |
---|
16 | RV y("2"); |
---|
17 | |
---|
18 | mat A = "1"; |
---|
19 | vec vR = "1"; |
---|
20 | ldmat R(vR); |
---|
21 | |
---|
22 | |
---|
23 | vec ptc = randn(10); |
---|
24 | vec w = exp(-0.5*(pow(ptc,2))/0.2); |
---|
25 | |
---|
26 | cout << "p:" << ptc << endl; |
---|
27 | cout << "w:" << w << endl; |
---|
28 | |
---|
29 | PF pf(w); |
---|
30 | ivec ind = pf.resample(); |
---|
31 | |
---|
32 | cout << ind << endl; |
---|
33 | /* |
---|
34 | mlnorm<ldmat> obs(x,xm,A,R); |
---|
35 | mlnorm<ldmat> par(y,x,A,R); |
---|
36 | |
---|
37 | TrivialPF TPF(obs,par,10); |
---|
38 | */ |
---|
39 | //Exit program: |
---|
40 | return 0; |
---|
41 | |
---|
42 | } |
---|