![]() |
Home | Libraries | People | FAQ | More |
boost::random::splitmix64
// In header: <boost/random/splitmix64.hpp> class splitmix64 { public: // types typedef ; typedef ; // private member functions (, ) ; // public member functions void ( = ) ; template<typename Sseq, typename std::enable_if<!std::is_convertible< Sseq, std::uint64_t >::value, bool >::type> void (Sseq &); template<typename Sseq, typename std::enable_if<!std::is_convertible< Sseq, splitmix64 >::value, bool >::type> (Sseq &); template<typename T, typename std::enable_if< std::is_convertible< T, std::uint64_t >::value, bool >::type> void (T = ) ; ( = ) ; (const splitmix64 &) = ; splitmix64 & (const splitmix64 &) = ; () ; () ; void () ; template<typename FIter> void (FIter, FIter) ; // friend functions bool (const splitmix64 &, const splitmix64 &) ; bool (const splitmix64 &, const splitmix64 &) ; template<typename CharT, typename Traits> CharT, Traits > & (CharT, Traits > &, const splitmix64 &); template<typename CharT, typename Traits> CharT, Traits > & (CharT, Traits > &, splitmix64 &); // public static functions constexpr () ; constexpr () ; // public data members static constexpr bool has_fixed_range; };
This is a fixed-increment version of Java 8's SplittableRandom generator See http://dx.doi.org/10.1145/2714064.2660195 and http://docs.oracle.com/javase/8/docs/api/java/util/SplittableRandom.html It is a very fast generator passing BigCrush, and it can be useful if for some reason you absolutely want 64 bits of state; otherwise, we rather suggest to use a xoroshiro128+ (for moderately parallel computations) or xorshift1024* (for massively parallel computations) generator.
splitmix64
public member functionsvoid ( value = ) ;
Seeds the generator with the default seed.
template<typename Sseq, typename std::enable_if<!std::is_convertible< Sseq, std::uint64_t >::value, bool >::type> void (Sseq & seq);
Seeds the generator with 32-bit values produced by seq.generate()
.
template<typename Sseq, typename std::enable_if<!std::is_convertible< Sseq, splitmix64 >::value, bool >::type> (Sseq & seq);
Seeds the generator with 64-bit values produced by seq.generate()
.
template<typename T, typename std::enable_if< std::is_convertible< T, std::uint64_t >::value, bool >::type> void (T value = ) ;
Seeds the generator with a user provided seed.
( state = ) ;
Seeds the generator with a user provided seed.
(const splitmix64 & other) = ;
splitmix64 & (const splitmix64 & other) = ;
() ;
Returns the next value of the generator.
() ;
Returns the next value of the generator.
void ( z) ;
Advances the state of the generator by z
.
template<typename FIter> void (FIter first, FIter last) ;
Fills a range with random values
splitmix64
friend functionsbool (const splitmix64 & lhs, const splitmix64 & rhs) ;
Returns true if the two generators will produce identical sequences of values.
bool (const splitmix64 & lhs, const splitmix64 & rhs) ;
Returns true if the two generators will produce different sequences of values.
template<typename CharT, typename Traits> CharT, Traits > & (CharT, Traits > & ost, const splitmix64 & e);
Writes a splitmix64
to a std::ostream
.
template<typename CharT, typename Traits> CharT, Traits > & (CharT, Traits > & ist, splitmix64 & e);
Writes a splitmix64
to a std::istream
.
splitmix64
public static functionsconstexpr () ;
Returns the largest value that the splitmix64
can produce.
constexpr () ;
Returns the smallest value that the splitmix64
can produce.