std::random_device:: operator()
From cppreference.net
<
cpp
|
numeric
|
random
|
random device
C++
Numerics library
| Common mathematical functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mathematical special functions (C++17) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mathematical constants (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Basic linear algebra algorithms (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Data-parallel types (SIMD) (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Floating-point environment (C++11) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Complex numbers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Numeric array (
valarray
)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Pseudo-random number generation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bit manipulation (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Saturation arithmetic (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Factor operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Interpolations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Generic numeric operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| C-style checked integer arithmetic | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Pseudo-random number generation
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::random_device
| Member functions | ||||
| Generation | ||||
|
random_device::operator()
|
||||
| Characteristics | ||||
|
result_type operator
(
)
(
)
;
|
(seit C++11) | |
Erzeugt einen nicht-deterministischen gleichverteilten Zufallswert.
Inhaltsverzeichnis |
Parameter
(keine)
Rückgabewert
Eine gleichmäßig verteilte Zufallszahl im Bereich [ min ( ) , max ( ) ].
Exceptions
Wirft eine implementierungsdefinierte Ausnahme, abgeleitet von std::exception , falls eine Zufallszahl nicht generiert werden konnte.
Siehe auch
|
[static]
|
gibt den kleinstmöglichen Wert im Ausgabebereich zurück
(öffentliche statische Elementfunktion) |
|
[static]
|
gibt den größtmöglichen Wert im Ausgabebereich zurück
(öffentliche statische Elementfunktion) |