uniform_real Class

Generates a uniform floating-point distribution. Retained for TR1 compatibility. Use uniform_real_distribution instead.

template<class RealType = double>
    class uniform_real {
public:
    typedef RealType input_type;
    tpyedef RealType result_type;
    explicit uniform_real(result_type min0 = result_type(0), result_type max0 = result_type(1));
    result_type min() const;
    result_type max() const;
    void reset();
    template<class Engine>
        result_type operator()(Engine& eng);
private:
    result_type stored_min;    // exposition only
    result_type stored_max;    // exposition only
    };

Parameters

  • RealType
    The floating-point result type.

Remarks

The template class describes a distribution that produces values of a user-specified floating-point type with a uniform distribution.

Requirements

Header: <random>

Namespace: std

See Also

Reference

<random>

uniform_real::operator()

uniform_real::uniform_real

Other Resources

<random> Members