Changeset 373


Ignore:
Timestamp:
Aug 5, 2005, 4:18:10 PM (18 years ago)
Author:
Peter
Message:

modified (deleted) rnd_test to make it compile. Should be modified to use new Random classes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/rnd_test.cc

    r358 r373  
    1212  my_rnd = utility::random_singleton::instance( -1 );
    1313 
    14   double* prob = new double[ 5 ];
    15   prob[ 0 ] = 0.2;
    16   prob[ 1 ] = 0.2;
    17   prob[ 2 ] = 0.2;
    18   prob[ 3 ] = 0.2;
    19   prob[ 4 ] = 0.2;
    20   my_rnd->general_distribution_prob( 5, prob );
    21   delete prob;
    22 
    23   int antal[5];
    24   antal[ 0 ] = 0;
    25   antal[ 1 ] = 0;
    26   antal[ 2 ] = 0;
    27   antal[ 3 ] = 0;
    28   antal[ 4 ] = 0;
    29 
    30   for( size_t i = 0; i < 100; ++i )
    31     antal[ my_rnd->rnd_discrete() ]++;
    32 
    33   delete my_rnd;
    3414
    3515  return 0;
Note: See TracChangeset for help on using the changeset viewer.