Return an integer random variate between the given lower and upper bounds (inclusive) using the specified random number generator.
lower and upper can each be a scalar or a one-dimensional container. Any non-scalar inputs must be the same size.
- Template Parameters
-
| T_lower | type of lower bound, either int or std::vector<int> |
| T_upper | type of upper bound, either int or std::vector<int> |
| RNG | type of random number generator |
- Parameters
-
| lower | lower bound |
| upper | upper bound |
| rng | random number generator |
- Returns
- A (sequence of) integer random variate(s) between
lower and upper, both bounds included.
- Exceptions
-
| std::domain_error | if upper is smaller than lower. |
| std::invalid_argument | if non-scalar arguments are of different sizes. |
Definition at line 36 of file discrete_range_rng.hpp.