ALPS Home Libraries License Support People ALPS Web Site

PrevUpHomeNext

Class template buffered_rng

alps::buffered_rng

Synopsis

// In header: <alps/random/buffered_rng.h>

template<typename RNG> 
class buffered_rng : public alps::buffered_rng_base {
public:
  // construct/copy/destruct
  buffered_rng();
  buffered_rng(RNG);

  // private member functions
   BOOST_STATIC_ASSERT((::boost::is_same< typename RNG::result_type, uint32_t >::value));

  // public member functions
  template<typename IT> void seed(IT, IT);
  virtual void seed(uint32_t);
  virtual void seed();
  virtual void seed(pseudo_des &);
  virtual result_type min BOOST_PREVENT_MACRO_SUBSTITUTION() const;
  virtual result_type max BOOST_PREVENT_MACRO_SUBSTITUTION() const;
  virtual void write(std::ostream &) const;
  virtual void read(std::istream &);
  virtual void write_all(std::ostream &) const;
  virtual void read_all(std::istream &);

  // protected member functions
  virtual void fill_buffer();
};

Description

a concrete implementation of a buffered random number generator

buffered_rng public construct/copy/destruct

  1. buffered_rng();
    constructs a default-seeded generator
  2. buffered_rng(RNG rng);

    constructs a generator by copying the argument

    Parameters:

    rng

    generator to be copied

buffered_rng private member functions

  1.  BOOST_STATIC_ASSERT((::boost::is_same< typename RNG::result_type, uint32_t >::value));

buffered_rng public member functions

  1. template<typename IT> void seed(IT start, IT end);
  2. virtual void seed(uint32_t s);

    seed from an integer using seed_with_sequence

    See Also:

    seed_with_sequence()

  3. virtual void seed();
    seed with the default value
  4. virtual void seed(pseudo_des & inigen);
    seed with the pseudo_des generator
  5. virtual result_type min BOOST_PREVENT_MACRO_SUBSTITUTION() const;
  6. virtual result_type max BOOST_PREVENT_MACRO_SUBSTITUTION() const;
  7. virtual void write(std::ostream &) const;
    write the state to a std::ostream
  8. virtual void read(std::istream &);
    read the state from a std::istream
  9. virtual void write_all(std::ostream & os) const;
    write the full state (including buffer) to a std::ostream
  10. virtual void read_all(std::istream &);
    read the full state (including buffer) from a std::istream

buffered_rng protected member functions

  1. virtual void fill_buffer();
    refills the buffer
Copyright © 2006-2008 Brigitte Surer, Matthias Troyer

PrevUpHomeNext