Changeset 438

Show
Ignore:
Timestamp:
07/28/09 15:53:00 (15 years ago)
Author:
vbarta
Message:

testing matrix inversion

Location:
library/tests
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • library/tests/square_mat_stress.cpp

    r426 r438  
    7272        cout << "opupdt: " << elapsed << " s" << endl; 
    7373 
     74        TMatrix invmat(sz); 
     75 
     76        tt.tic(); 
     77        sqmat.inv(invmat); 
     78        elapsed = tt.toc(); 
     79 
     80        if (!fast) { 
     81            mat invA = inv(A); 
     82            CHECK_CLOSE(invA, invmat.to_mat(), epsilon); 
     83        } 
     84 
     85        cout << "inv: " << elapsed << " s" << endl; 
     86 
    7487        sz *= 7; 
    7588    } 
  • library/tests/square_mat_test.cpp

    r437 r438  
    4545    res = A + w * outer_product(v, v); 
    4646    CHECK_CLOSE(res, sqmat2.to_mat(), epsilon); 
     47 
     48    TMatrix invmat(sz); 
     49    sqmat.inv(invmat); 
     50    mat invA = inv(A); 
     51    CHECK_CLOSE(invA, invmat.to_mat(), epsilon); 
    4752 
    4853    double d = det(A);