Show
Ignore:
Timestamp:
06/09/10 14:00:40 (14 years ago)
Author:
mido
Message:

astyle applied all over the library

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/tests/stresssuite/merger_2d_stress.cpp

    r886 r1064  
    1212TEST ( merger_2d_stress ) { 
    1313 
    14         RNG_randomize(); 
     14    RNG_randomize(); 
    1515 
    16         RV x ( "{x }", "1" ); 
    17         RV y ( "{y }", "1" ); 
     16    RV x ( "{x }", "1" ); 
     17    RV y ( "{y }", "1" ); 
    1818 
    19         RV xy = x; 
    20         xy.add ( y ); 
     19    RV xy = x; 
     20    xy.add ( y ); 
    2121 
    22         enorm_fsqmat_ptr f1; 
    23         f1->set_rv ( xy ); 
    24         enorm_fsqmat_ptr f2; 
    25         f2->set_rv ( xy ); 
     22    enorm_fsqmat_ptr f1; 
     23    f1->set_rv ( xy ); 
     24    enorm_fsqmat_ptr f2; 
     25    f2->set_rv ( xy ); 
    2626 
    27         mat R1 ( "0.5 0.48; 0.48 0.5" ); 
    28         mat R2 ( "0.5 0; 0 0.1" ); 
    29         f1->set_parameters ( "1 1", R1 ); 
    30         f2->set_parameters ( "1 1", mat ( "0.5 0; 0 0.1" ) ); 
     27    mat R1 ( "0.5 0.48; 0.48 0.5" ); 
     28    mat R2 ( "0.5 0; 0 0.1" ); 
     29    f1->set_parameters ( "1 1", R1 ); 
     30    f2->set_parameters ( "1 1", mat ( "0.5 0; 0 0.1" ) ); 
    3131 
    32         pdf_array A ( 2 ); 
    33         A ( 0 ) = f1; 
    34         A ( 1 ) = f2; 
     32    pdf_array A ( 2 ); 
     33    A ( 0 ) = f1; 
     34    A ( 1 ) = f2; 
    3535 
    36         int Npoints = 100; 
    37         mat x_grid ( 1, Npoints ); 
    38         x_grid.set_row ( 0, linspace ( -2.0, 4.0, Npoints ) ); 
    39         mat y_grid ( 1, Npoints ); 
    40         y_grid.set_row ( 0, linspace ( -2.0, 4.0, Npoints ) ); 
     36    int Npoints = 100; 
     37    mat x_grid ( 1, Npoints ); 
     38    x_grid.set_row ( 0, linspace ( -2.0, 4.0, Npoints ) ); 
     39    mat y_grid ( 1, Npoints ); 
     40    y_grid.set_row ( 0, linspace ( -2.0, 4.0, Npoints ) ); 
    4141 
    42         mat Grid ( 2, Npoints*Npoints ); 
    43         Grid.set_submatrix ( 0, 0, kron ( x_grid, ones ( 1, Npoints ) ) ); 
    44         Grid.set_submatrix ( 1, 0, kron ( ones ( 1, Npoints ), y_grid ) ); 
     42    mat Grid ( 2, Npoints*Npoints ); 
     43    Grid.set_submatrix ( 0, 0, kron ( x_grid, ones ( 1, Npoints ) ) ); 
     44    Grid.set_submatrix ( 1, 0, kron ( ones ( 1, Npoints ), y_grid ) ); 
    4545 
    46         merger_mix M ( A ); 
    47         enorm<fsqmat> g0; 
    48         g0.set_rv ( xy ); 
    49         g0.set_parameters ( vec ( "1 1" ), mat ( "10 0; 0 10" ) ); 
     46    merger_mix M ( A ); 
     47    enorm<fsqmat> g0; 
     48    g0.set_rv ( xy ); 
     49    g0.set_parameters ( vec ( "1 1" ), mat ( "10 0; 0 10" ) ); 
    5050 
    51         M.set_parameters ( 1 ); 
    52         M.set_method ( LOGNORMAL, 1e8 ); 
    53         M.set_support ( g0, 400 ); 
    54         M.merge(); 
     51    M.set_parameters ( 1 ); 
     52    M.set_method ( LOGNORMAL, 1e8 ); 
     53    M.set_support ( g0, 400 ); 
     54    M.merge(); 
    5555 
    56         MixEF &MM = M._Mix(); 
    57         emix* MP = MM.epredictor(); //xy 
     56    MixEF &MM = M._Mix(); 
     57    emix* MP = MM.epredictor(); //xy 
    5858 
    59         vec Res1 = M.evallog_mat ( Grid ); 
    60         mat Res2 = ( MP )->evallog_coms ( Grid ); 
     59    vec Res1 = M.evallog_mat ( Grid ); 
     60    mat Res2 = ( MP )->evallog_coms ( Grid ); 
    6161 
    62         it_file it ( "merger_2d_test.it" ); 
    63         it << Name ( "Npoints" ) << Npoints; 
    64         it << Name ( "Grid" ) << Grid; 
    65         it << Name ( "Res1" ) << Res1; 
    66         it << Name ( "Res2" ) << Res2; 
    67         it << Name ( "S1" ) << f1->evallog_mat ( Grid ); 
    68         it << Name ( "S2" ) << f2->evallog_mat ( Grid ); 
     62    it_file it ( "merger_2d_test.it" ); 
     63    it << Name ( "Npoints" ) << Npoints; 
     64    it << Name ( "Grid" ) << Grid; 
     65    it << Name ( "Res1" ) << Res1; 
     66    it << Name ( "Res2" ) << Res2; 
     67    it << Name ( "S1" ) << f1->evallog_mat ( Grid ); 
     68    it << Name ( "S2" ) << f2->evallog_mat ( Grid ); 
    6969//      cout << ( ( enorm<ldmat>* ) ( MP->_Coms ( 0 ).get() ) )->_R().to_mat() << endl; 
    7070}