Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class splitmix64

boost::random::splitmix64

Synopsis

// 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;
};

Description

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 private member functions

  1.  ( word1,  word2) ;

splitmix64 public member functions

  1. void ( value = ) ;

    Seeds the generator with the default seed.

  2. 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().

  3. 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().

  4. 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.

  5. ( state = ) ;

    Seeds the generator with a user provided seed.

  6. (const  splitmix64 & other) = ;
  7. splitmix64 & (const  splitmix64 & other) = ;
  8.  () ;

    Returns the next value of the generator.

  9.  () ;

    Returns the next value of the generator.

  10. void ( z) ;

    Advances the state of the generator by z.

  11. template<typename FIter> void (FIter first, FIter last) ;

    Fills a range with random values

splitmix64 friend functions

  1. bool (const  splitmix64 & lhs, const  splitmix64 & rhs) ;

    Returns true if the two generators will produce identical sequences of values.

  2. bool (const  splitmix64 & lhs, const  splitmix64 & rhs) ;

    Returns true if the two generators will produce different sequences of values.

  3. template<typename CharT, typename Traits> 
      CharT, Traits > & 
      (CharT, Traits > & ost, const  splitmix64 & e);

    Writes a splitmix64 to a std::ostream.

  4. template<typename CharT, typename Traits> 
      CharT, Traits > & 
      (CharT, Traits > & ist, splitmix64 & e);

    Writes a splitmix64 to a std::istream.

splitmix64 public static functions

  1. constexpr () ;

    Returns the largest value that the splitmix64 can produce.

  2. constexpr () ;

    Returns the smallest value that the splitmix64 can produce.


PrevUpHomeNext