root/tests/test0.cpp @ 35

Revision 35, 1.0 kB (checked in by mido, 16 years ago)

zasadni zmeny ve /win32

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