Changeset 66


Ignore:
Timestamp:
Apr 27, 2004, 3:48:59 PM (19 years ago)
Author:
Peter
Message:

added operator for STL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/random_singleton.h

    r42 r66  
    135135    std::string get_generator_type(void) const;
    136136
     137    ///
     138    /// Operator for STL
     139    ///
     140    ///inline double operator()(void) { return get_uniform_double();}
     141
    137142
    138143    /**
     
    142147  }; // random_singleton
    143148 
     149  struct my_uniform_rng
     150  {
     151  public:
     152    inline u_long operator()(u_long i) {
     153      return random_singleton::get_instance()->get_uniform_int(i);
     154    }
     155  };
    144156
    145157double random_singleton::get_exponential( const double& mu ) const
Note: See TracChangeset for help on using the changeset viewer.