Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Generates a geometric distribution.
template<class IntType = int, class RealType = double>
class geometric_distribution {
public:
typedef RealType input_type;
typedef IntType result_type;
explicit geometric_distribution(const RealType& p0 = RealType(0.5));
RealType p() const;
void reset();
template<class Engine>
result_type operator()(Engine& eng);
private:
RealType stored_p; // exposition only
};
Parameters
IntType
The integer result type.RealType
The floating-point engine value type.
Remarks
The template class decribes a distribution that produces values of a user-specified integral type with a geometric distribution.
Requirements
Header: <random>
Namespace: std::tr1