std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::seed (3) - Linux Manuals
std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::seed: std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::seed
Command to display std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::seed
manual in Linux: $ man 3 std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::seed
NAME
std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::seed - std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::seed
Synopsis
void seed( result_type value = default_seed ); (1) (since C++11)
template< class Sseq > (2) (since C++11)
void seed( Sseq& seq );
Reinitializes the internal state of the random-number engine using new seed value.
This section is incomplete
Parameters
value - seed value to use in the initialization of the internal state
seq - seed sequence to use in the initialization of the internal state
Exceptions
(none)
Complexity
This section is incomplete
Example
// Run this code
#include <iostream>
#include <random>
int main()
{
std::mt19937 gen;
// Seed the engine with an unsigned int
gen.seed(1);
std::cout << "after seed by 1: " << gen() << '\n';
// Seed the engine with two unsigned ints
std::seed_seq sseq{1, 2};
gen.seed(sseq);
std::cout << "after seed by {1,2}: " << gen() << '\n';
}
Possible output:
after seed by 1: 1791095845
after seed by {1,2}: 3127717181
Pages related to std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::seed
- std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::discard (3) - std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::discard
- std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::max (3) - std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::max
- std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::mersenne_twister_engine (3) - std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::mersenne_twister_engine
- std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::min (3) - std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::min
- std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::operator() (3) - std::mersenne_twister_engine<UIntType,w,n,m,r,a,u,d,s,b,t,c,l,f>::operator()
- std::mersenne_twister_engine (3) - std::mersenne_twister_engine
- std::merge (3) - std::merge
- std::mem_fn (3) - std::mem_fn
- std::mem_fun (3) - std::mem_fun
- std::mem_fun_ref (3) - std::mem_fun_ref
- std::mem_fun_ref_t,std::mem_fun1_ref_t,std::const_mem_fun_ref_t, (3) - std::mem_fun_ref_t,std::mem_fun1_ref_t,std::const_mem_fun_ref_t,