diff -u -r random/inversive_congruential.hpp /home/matthewbg/random/inversive_congruential.hpp
|
old
|
new
|
|
| 96 | 96 | template<class It> void seed(It& first, It last) |
| 97 | 97 | { |
| 98 | 98 | if(first == last) |
| 99 | | throw std::invalid_argument("inversive_congruential::seed"); |
| | 99 | boost::throw_exception(std::invalid_argument( |
| | 100 | "inversive_congruential::seed")); |
| 100 | 101 | value = *first++; |
| 101 | 102 | } |
| 102 | 103 | IntType operator()() |
diff -u -r random/lagged_fibonacci.hpp /home/matthewbg/random/lagged_fibonacci.hpp
|
old
|
new
|
|
| 158 | 158 | x[j] = *first & wordmask; |
| 159 | 159 | i = long_lag; |
| 160 | 160 | if(first == last && j < long_lag) |
| 161 | | throw std::invalid_argument("lagged_fibonacci::seed"); |
| | 161 | boost::throw_exception(std::invalid_argument("lagged_fibonacci::seed")); |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | /** |
| … |
… |
|
| 411 | 411 | } |
| 412 | 412 | i = long_lag; |
| 413 | 413 | if(first == last && j < long_lag) |
| 414 | | throw std::invalid_argument("lagged_fibonacci_01::seed"); |
| | 414 | boost::throw_exception(std::invalid_argument( |
| | 415 | "lagged_fibonacci_01::seed")); |
| 415 | 416 | } |
| 416 | 417 | |
| 417 | 418 | result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return result_type(0); } |
diff -u -r random/linear_congruential.hpp /home/matthewbg/random/linear_congruential.hpp
|
old
|
new
|
|
| 139 | 139 | void seed(It& first, It last) |
| 140 | 140 | { |
| 141 | 141 | if(first == last) |
| 142 | | throw std::invalid_argument("linear_congruential::seed"); |
| | 142 | boost::throw_exception(std::invalid_argument( |
| | 143 | "linear_congruential::seed")); |
| 143 | 144 | seed(*first++); |
| 144 | 145 | } |
| 145 | 146 | |
diff -u -r random/linear_feedback_shift.hpp /home/matthewbg/random/linear_feedback_shift.hpp
|
old
|
new
|
|
| 95 | 95 | template<class It> void seed(It& first, It last) |
| 96 | 96 | { |
| 97 | 97 | if(first == last) |
| 98 | | throw std::invalid_argument("linear_feedback_shift::seed"); |
| | 98 | boost::throw_exception(std::invalid_argument( |
| | 99 | "linear_feedback_shift::seed")); |
| 99 | 100 | value = *first++; |
| 100 | 101 | assert(value >= (1 << (w-k))); |
| 101 | 102 | } |
diff -u -r random/mersenne_twister.hpp /home/matthewbg/random/mersenne_twister.hpp
|
old
|
new
|
|
| 153 | 153 | x[j] = *first; |
| 154 | 154 | i = n; |
| 155 | 155 | if(first == last && j < n) |
| 156 | | throw std::invalid_argument("mersenne_twister::seed"); |
| | 156 | boost::throw_exception(std::invalid_argument("mersenne_twister::seed")); |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return 0; } |
diff -u -r random/subtract_with_carry.hpp /home/matthewbg/random/subtract_with_carry.hpp
|
old
|
new
|
|
| 130 | 130 | for(j = 0; j < long_lag && first != last; ++j, ++first) |
| 131 | 131 | x[j] = *first % modulus; |
| 132 | 132 | if(first == last && j < long_lag) |
| 133 | | throw std::invalid_argument("subtract_with_carry::seed"); |
| | 133 | boost::throw_exception(std::invalid_argument( |
| | 134 | "subtract_with_carry::seed")); |
| 134 | 135 | carry = (x[long_lag-1] == 0); |
| 135 | 136 | k = 0; |
| 136 | 137 | } |
| … |
… |
|
| 330 | 331 | } |
| 331 | 332 | } |
| 332 | 333 | if(first == last && j < long_lag) |
| 333 | | throw std::invalid_argument("subtract_with_carry_01::seed"); |
| | 334 | boost::throw_exception(std::invalid_argument( |
| | 335 | "subtract_with_carry_01::seed")); |
| 334 | 336 | carry = (x[long_lag-1] ? 0 : 1 / _modulus); |
| 335 | 337 | k = 0; |
| 336 | 338 | } |