std::linear_congruential_engine
De cppreference.com
![]() |
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
Definido en el archivo de encabezado <random>
|
||
template< class UIntType, |
(desde C++11) | |
A linear_congruential_engine produce sin firmar números pseudoaleatorios enteros. El estado de un LCG es de tamaño 1 y consta de un único entero .
Original:
A linear_congruential_engine produces unsigned integer pseudorandom numbers. The state of a LCG is of size 1 and consists of a single integer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
El algoritmo de transición de la función de LCG es x
i+1 ← (ax
i+c) mod m .
i+1 ← (ax
i+c) mod m .
Original:
The transition algorithm of the LCG function is x
i+1 ← (ax
i+c) mod m.
i+1 ← (ax
i+c) mod m.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[editar] Tipos de miembros
Miembro de tipo
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
result_type
|
El tipo integral generada por el motor. Los resultados son indefinido si esto no es un tipo entero sin signo .
Original: The integral type generated by the engine. Results are undefined if this is not an unsigned integral type. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[editar] Las funciones miembro
Original: Construction and Seeding The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
construye el motor Original: constructs the engine The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro pública) | |
establece el estado actual del motor Original: sets the current state of the engine The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro pública) | |
Original: Generation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
avanza el estado del motor de generación aleatorio y devuelve el valor generado (función miembro pública) | |
avances del estado del motor en una cantidad especificada Original: advances the engine's state by a specified amount The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro pública) | |
Original: Characteristics The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
[estático] |
se obtiene el valor más pequeño posible en el rango de salida Original: gets the smallest possible value in the output range The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro estática pública) |
[estático] |
gets the largest possible value in the output range (función miembro estática pública) |
[editar] Terceros funciones
compara los estados internos de dos motores de números pseudo-aleatorios (función) | |
realiza flujo de entrada y de salida en el motor de números pseudo-aleatorios (función) |
[editar] Objetos miembros
constexpr UIntType multiplier [estático] |
el término multiplicador (a) . Original: the multiplier term (a). The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (constante miembro pública estática) |
constexpr UIntType increment [estático] |
el plazo de incremento (c) . Original: the increment term (c). The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (constante miembro pública estática) |
constexpr UIntType modulus [estático] |
el término módulo (m) . Original: the modulus term (m). The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (constante miembro pública estática) |
constexpr UIntType default_seed [estático] |
la semilla por defecto (1) . Original: the default seed (1). The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (constante miembro pública estática) |