Revision 18, 1.0 kB
(checked in by smidl, 17 years ago)
|
update
|
Line | |
---|
1 | #include <itpp/itbase.h> |
---|
2 | #include "../bdm/stat/libBM.h" |
---|
3 | #include "../bdm/math/libDC.h" |
---|
4 | |
---|
5 | using namespace itpp; |
---|
6 | |
---|
7 | //These lines are needed for use of cout and endl |
---|
8 | using std::cout; |
---|
9 | using std::endl; |
---|
10 | |
---|
11 | int main() |
---|
12 | { |
---|
13 | |
---|
14 | RV th = RV ( "1 2","{a b }","1 1","0 0","0 0" ); |
---|
15 | RV r = RV ( "3 4" ); |
---|
16 | int i =0; |
---|
17 | |
---|
18 | cout << th << r << endl; |
---|
19 | |
---|
20 | ldmat ld = ldmat("1 0;-0.1 1","1.1 1.3"); |
---|
21 | vec v = "1 -0.1"; |
---|
22 | |
---|
23 | cout << "Test to_mat"<<endl; |
---|
24 | // cout << ld << endl; |
---|
25 | cout << ld.to_mat()<<endl; |
---|
26 | |
---|
27 | cout << "Test opupdt" <<endl; |
---|
28 | ldmat ldup = ld; |
---|
29 | ldup.opupdt(v,1); |
---|
30 | cout << ldup.to_mat()<<endl; |
---|
31 | |
---|
32 | cout << "Test +="<<endl; |
---|
33 | ldmat ld2x = ld; |
---|
34 | ld2x+=ld; |
---|
35 | cout << ld.to_mat() << ld2x.to_mat() <<endl; |
---|
36 | |
---|
37 | cout << "Test ldinv()"<<endl; |
---|
38 | ldmat Il = ld; |
---|
39 | ld.inv(Il); // |
---|
40 | mat I = Il.to_mat()*ld.to_mat(); |
---|
41 | cout << "ld:"<<Il.to_mat() << "eye:"<< I <<endl; |
---|
42 | |
---|
43 | cout << "Test ldform()"<<endl; |
---|
44 | mat V = "1 2; 2 3"; |
---|
45 | ldmat lV(V); |
---|
46 | // cout << "ld:" << lV.to_mat() << "eye:"<< I <<endl; |
---|
47 | |
---|
48 | |
---|
49 | //Exit program: |
---|
50 | return 0; |
---|
51 | |
---|
52 | } |
---|