#include <random-generator.hpp>
|
using | DataT = unsigned int |
|
◆ DataT
◆ RandomInterface()
template<class DeriveT >
Kazv::RandomInterface::RandomInterface |
( |
DeriveT |
obj | ) |
|
|
inline |
Construct a RandomInterface using an implementation.
- Parameters
-
obj | The random generator implementation. |
The implementation obj must be of a movable type and must be such that the following call is valid, and after that v should contain a random number:
unsigned int v = obj();
◆ fillRange()
Fill the given range.
- Parameters
-
- Returns
- A range filled with random elements. Its size will be the same as
range
.
◆ generateRange()
template<class RangeT >
RangeT Kazv::RandomInterface::generateRange |
( |
std::size_t |
size | ) |
|
|
inline |
Generate a range containing size
random elements.
RangeT must have a constructor such that RangeT(size, ValueT())
constructs a range of size
elements valued ValueT()
, where ValueT
is the value type of RangeT
.
- Parameters
-
size | The size of the range to create. |
- Returns
- A RangeT containing
size
random elements.
◆ operator()()
DataT Kazv::RandomInterface::operator() |
( |
| ) |
|
|
inline |
Generate a random number of type DataT.
- Returns
- A randomly generated DataT.
The documentation for this class was generated from the following file: