Espaços nominais
Variantes
Acções

std::seed_seq

Da cppreference.com
< cpp‎ | numeric‎ | random

 
 
Biblioteca numéricos
Funções matemáticas comuns
De ponto flutuante ambiente
Números complexos
Matrizes numéricas
Pseudo-aleatório de geração de números
Tempo de compilação aritmética racional (C++11)
Genéricos operações numéricas
Original:
Generic numeric operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
 
Pseudo-aleatório de geração de números
Motores e adaptadores de motor
Original:
Engines and engine adaptors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Geradores
Original:
Generators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Distribuições
Original:
Distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Distribuições uniformes
Original:
Uniform distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Distribuições de Bernoulli
Original:
Bernoulli distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Distribuições de Poisson
Original:
Poisson distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Distribuições normais
Original:
Normal distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Distribuições de amostragem
Original:
Sampling distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Seqüências de sementes
Original:
Seed Sequences
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
seed_seq
(C++11)
C biblioteca
Original:
C library
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
std::seed_seq
Funções de membro
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
seed_seq::seed_seq
seed_seq::generate
seed_seq::size
seed_seq::param
 
Definido no cabeçalho <random>
class seed_seq;
(desde C++11)
std::seed_seq consome uma sequência de número inteiro com valores de dados e produz um número requerido de valores inteiros sem sinal i, 0 ≤ i < 232
, com base nos dados consumidos. Os valores produzidos são distribuídos ao longo da gama de 32-bit inteiro, mesmo que os valores são consumidos perto.
Original:
std::seed_seq consumes a sequence of integer-valued data and produces a requested number of unsigned integer values i, 0 ≤ i < 232
, based on the consumed data. The produced values are distributed over the entire 32-bit range even if the consumed values are close.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Ele fornece um modo de sementes de um grande número de mecanismos de números aleatórios ou de sementes de um gerador, que requer uma grande quantidade de entropia, dada uma pequena semente ou de uma sequência de sementes mal distribuída inicial.
Original:
It provides a way to seed a large number of random number engines or to seed a generator that requires a lot of entropy, given a small seed or a poorly distributed initial seed sequence.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::seed_seq cumpre os requisitos da SeedSequence.
Original:
std::seed_seq meets the requirements of SeedSequence.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Tipos de membro

Tipo de membro
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 std::uint_least32_t

[editar] Funções de membro

construções e sementes o std :: objeto seed_seq
Original:
constructs and seeds the std::seed_seq object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro)
operator=
(excluída)
cópia não-transmissíveis
Original:
not copy-assignable
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro)
calcula o viés-eliminados, distribuídos uniformemente valores de 32 bits
Original:
calculates the bias-eliminated, evenly distributed 32-bit values
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro)
obtém o número de valores de 32 bits armazenados em std :: seed_seq
Original:
obtains the number of 32-bit values stored in std::seed_seq
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro)
obtém os valores de 32 bits armazenados em std :: seed_seq
Original:
obtains the 32-bit values stored in std::seed_seq
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro)

[editar] Exemplo

#include <random>
#include <iostream>
 
int main()
{
    std::seed_seq seq({1,2,3,4,5});
    std::vector<std::uint32_t> seeds(10);
    seq.generate(seeds.begin(), seeds.end());
    for(std::uint32_t n : seeds)
        std::cout << n << '\n';
}

Saída:

4204997637
4246533866
1856049002
1129615051
690460811
1075771511
46783058
3904109078
1534123438
1495905678