Changeset 162 for tests/test0.cpp

Show
Ignore:
Timestamp:
09/04/08 20:27:01 (16 years ago)
Author:
smidl
Message:

opravy a dokumentace

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • tests/test0.cpp

    r101 r162  
    1212int main() 
    1313{ 
    14         RV th = RV ( "1 2","{a b }","1 1","0 0"); 
    15         RV r = RV ( "3 4" ); 
     14        RV th = RV ( "{a b }"); 
     15        RV r = RV ( "{r1 r2 }" ); 
    1616 
    1717        cout << th << r << endl; 
    1818 
    19         ldmat ld = ldmat("1 0;0.5 1","1.1 1.3"); 
    20         vec v = "1 -0.1"; 
     19        ldmat ld = ldmat("1 0 0 0; 0.2 1 0 0; 0.1 -0.1 1 0; -0.9 0.3 -0.1 1", 
     20                                         "3 4 5 6"); 
     21        vec v = "1 -1 3 -1"; 
    2122         
    2223        cout << "Test to_mat"<<endl; 
    2324//      cout << ld << endl; 
    24         cout << ld.to_mat()<<endl; 
     25        mat L = ld.to_mat(); 
     26        cout << L <<endl; 
    2527 
    2628        cout << "Test opupdt" <<endl; 
     29        cout << "w=1" <<endl; 
    2730        ldmat ldup = ld; 
    2831        ldup.opupdt(v,1); 
    2932        cout << ldup.to_mat()<<endl; 
     33        cout << L + outer_product(v,v) <<endl; 
     34        ldup = ld;       
     35        cout << "w=0.1" <<endl; 
     36        ldup.opupdt(v,0.1); 
     37        cout << ldup.to_mat()<<endl; 
     38        cout << L + 0.1*outer_product(v,v) <<endl; 
    3039 
    3140        cout << "Test +="<<endl; 
    3241        ldmat ld2x = ld; 
    3342        ld2x+=ld; 
    34         cout << ld.to_mat() << ld2x.to_mat() <<endl; 
     43        cout << ld.to_mat() <<endl << ld2x.to_mat() <<endl; 
    3544 
     45        cout << "Test *="<<endl; 
     46        ld2x = ld; 
     47        ld2x*=2; 
     48        cout << ld.to_mat() <<endl << ld2x.to_mat() <<endl; 
     49         
    3650        cout << "Test ldinv()"<<endl; 
    3751        ldmat Il = ld;