CLASS TEMPL(3)

NAME
boost::random::subtract_with_carry

SYNOPSIS

// In header: <boost/random/subtract_with_carry.hpp>
template<typename IntType, IntType m, unsigned int s, unsigned int r,
         IntType val>
class subtract_with_carry {
public:
  // types
  typedef IntType result_type;
  // construct/copy/destruct
  subtract_with_carry();
  subtract_with_carry(uint32_t);
  template<typename Generator> subtract_with_carry(Generator &);
  template<typename It> subtract_with_carry(It &, It);
  // public member functions
  void seed();
  void seed(uint32_t);
  template<typename Generator> void seed(Generator &);
  template<typename It> void seed(It &, It);
  result_type min() const;
  result_type max() const;
  result_type operator()();
  // public static functions
  static bool validation(result_type);
  static const bool has_fixed_range;
  static const result_type min_value;
  static const result_type max_value;
  static const result_type modulus;
  static const unsigned int long_lag;
  static const unsigned int short_lag;
};

DESCRIPTION

Instantiations of subtract_with_carry model a pseudo-random number generator . The algorithm is described in

  subtract_with_carry public construct/copy/destruct

    1.

    subtract_with_carry();

    2.

    subtract_with_carry(uint32_t value);

    3.

    template<typename Generator> subtract_with_carry(Generator & gen);

    4.

    template<typename It> subtract_with_carry(It & first, It last);

  subtract_with_carry public member functions

    1.

    void seed();

    2.

    void seed(uint32_t value);

    3.

    template<typename Generator> void seed(Generator & gen);

    4.

    template<typename It> void seed(It & first, It last);

    5.

    result_type min() const;

    6.

    result_type max() const;

    7.

    result_type operator()();

  subtract_with_carry public static functions

    1.

    static bool validation(result_type x);