lemon/random.h
changeset 2387 317b9a88c350
parent 2386 81b47fc5c444
child 2391 14a343be7a5a
equal deleted inserted replaced
11:48e75795eb44 12:25ecfc9065f3
   306       }
   306       }
   307     };
   307     };
   308 
   308 
   309 
   309 
   310     template <typename Result, typename Word,
   310     template <typename Result, typename Word,
   311               bool one_word = std::numeric_limits<Word>::digits < 
   311               bool one_word = (std::numeric_limits<Word>::digits < 
   312                               std::numeric_limits<Result>::digits>
   312 			       std::numeric_limits<Result>::digits) >
   313     struct Mapping {
   313     struct Mapping {
   314       static Result map(RandomCore<Word>& rnd, const Result& bound) {
   314       static Result map(RandomCore<Word>& rnd, const Result& bound) {
   315         Word max = Word(bound - 1);
   315         Word max = Word(bound - 1);
   316         Result mask = Masker<Result>::mask(bound - 1);
   316         Result mask = Masker<Result>::mask(bound - 1);
   317         Result num;
   317         Result num;