|
quint64 | generate () |
| Generates one 64-bit random value and returns it.
|
result_type | operator() () |
| Generates a 64-bit random quantity and returns it.
|
| QRandomGenerator64 (quint32 seedValue=1) |
template<qsizetype N> |
| QRandomGenerator64 (const quint32(&seedBuffer)[N]) |
| QRandomGenerator64 (const quint32 *seedBuffer, qsizetype len) |
| QRandomGenerator64 (std::seed_seq &sseq) noexcept |
| QRandomGenerator64 (const quint32 *begin, const quint32 *end) |
| QRandomGenerator64 (const QRandomGenerator &other) |
void | discard (unsigned long long z) |
template<typename ForwardIterator> |
void | generate (ForwardIterator begin, ForwardIterator end) |
| Generates 32-bit quantities and stores them in the range between begin and end.
|
void | generate (quint32 *begin, quint32 *end) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
Public Member Functions inherited from QRandomGenerator |
| QRandomGenerator (quint32 seedValue=1) |
| Initializes this QRandomGenerator object with the value seedValue as the seed.
|
template<qsizetype N> |
| QRandomGenerator (const quint32(&seedBuffer)[N]) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Initializes this QRandomGenerator object with the values found in the array seedBuffer as the seed.
|
| QRandomGenerator (const quint32 *seedBuffer, qsizetype len) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Initializes this QRandomGenerator object with len values found in the array seedBuffer as the seed.
|
Q_CORE_EXPORT | QRandomGenerator (std::seed_seq &sseq) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Initializes this QRandomGenerator object with the seed sequence sseq as the seed.
|
Q_CORE_EXPORT | QRandomGenerator (const quint32 *begin, const quint32 *end) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Initializes this QRandomGenerator object with the values found in the range from begin to end as the seed.
|
Q_CORE_EXPORT | QRandomGenerator (const QRandomGenerator &other) |
| Creates a copy of the generator state in the other object.
|
Q_CORE_EXPORT QRandomGenerator & | operator= (const QRandomGenerator &other) |
| ~QRandomGenerator ()=default |
quint32 | generate () |
| Generates a 32-bit random quantity and returns it.
|
quint64 | generate64 () |
| Generates a 64-bit random quantity and returns it.
|
double | generateDouble () |
| Generates one random qreal in the canonical range [0, 1) (that is, inclusive of zero and exclusive of 1).
|
double | bounded (double highest) |
| Generates one random double in the range between 0 (inclusive) and highest (exclusive).
|
quint32 | bounded (quint32 highest) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 32-bit quantity in the range between 0 (inclusive) and highest (exclusive).
|
quint32 | bounded (quint32 lowest, quint32 highest) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 32-bit quantity in the range between lowest (inclusive) and highest (exclusive).
|
int | bounded (int highest) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 32-bit quantity in the range between 0 (inclusive) and highest (exclusive).
|
int | bounded (int lowest, int highest) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 32-bit quantity in the range between lowest (inclusive) and highest (exclusive), both of which may be negative, but highest must be greater than lowest.
|
quint64 | bounded (quint64 highest) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 64-bit quantity in the range between 0 (inclusive) and highest (exclusive).
|
quint64 | bounded (quint64 lowest, quint64 highest) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 64-bit quantity in the range between lowest (inclusive) and highest (exclusive).
|
qint64 | bounded (qint64 highest) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 64-bit quantity in the range between 0 (inclusive) and highest (exclusive).
|
qint64 | bounded (qint64 lowest, qint64 highest) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 64-bit quantity in the range between lowest (inclusive) and highest (exclusive), both of which may be negative, but highest must be greater than lowest.
|
qint64 | bounded (int lowest, qint64 highest) |
qint64 | bounded (qint64 lowest, int highest) |
quint64 | bounded (unsigned lowest, quint64 highest) |
quint64 | bounded (quint64 lowest, unsigned highest) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.This function exists to help with overload resolution when the types of the parameters don't exactly match.
|
template<typename UInt, IfValidUInt< UInt > = true> |
void | fillRange (UInt *buffer, qsizetype count) |
| Generates count 32- or 64-bit quantities (depending on the type UInt ) and stores them in the buffer pointed by buffer.
|
template<typename UInt, size_t N, IfValidUInt< UInt > = true> |
void | fillRange (UInt(&buffer)[N]) |
| Generates N 32- or 64-bit quantities (depending on the type UInt ) and stores them in the buffer array.
|
template<typename ForwardIterator> |
void | generate (ForwardIterator begin, ForwardIterator end) |
| Generates 32-bit quantities and stores them in the range between begin and end.
|
void | generate (quint32 *begin, quint32 *end) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
result_type | operator() () |
| Generates a 32-bit random quantity and returns it.
|
void | seed (quint32 s=1) |
| Reseeds this object using the value seed as the seed.
|
void | seed (std::seed_seq &sseq) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Reseeds this object using the seed sequence seed as the seed.
|
Q_CORE_EXPORT void | discard (unsigned long long z) |
| Discards the next z entries from the sequence.
|
\inmodule QtCore
- Since
- 5.10
The QRandomGenerator64 class allows one to obtain 64-bit random values from a high-quality, seed-less Random Number Generator.
QRandomGenerator64 is a simple adaptor class around QRandomGenerator, making the QRandomGenerator::generate64() function the default for operator()(), instead of the function that returns 32-bit quantities. This class is intended to be used in conjunction with Standard Library algorithms that need 64-bit quantities instead of 32-bit ones.
In all other aspects, the class is the same. Please refer to QRandomGenerator's documentation for more information.
- See also
- QRandomGenerator
Definition at line 211 of file qrandom.h.