libstdc++: std::random_device Class Reference

libstdc++

std::random_device Class Reference
Numerics » Random Number Generation » Random Number Generators

`#include <random>`

## Public Types
typedef unsigned int | result_type

## Public Member Functions
| random_device (const random_device &)=delete
| random_device (const std::string &__token)
double | entropy () const noexcept
result_type | operator() ()
void | operator= (const random_device &)=delete

## Static Public Member Functions
static constexpr result_type | max ()
static constexpr result_type | min ()

## Detailed Description

A standard interface to a platform-specific non-deterministic random number generator (if any are available).

Since
  C++11

Definition at line 2363 of file random.h.

## Member Typedef Documentation

## ◆ result_type

typedef unsigned int std::random_device::result_type

The type of the generated random value.

Definition at line 2367 of file random.h.

## Constructor & Destructor Documentation

## ◆ random_device() [1/2]

std::random_device::random_device | ( |  | ) |
| inline

Definition at line 2371 of file random.h.

## ◆ random_device() [2/2]

std::random_device::random_device | ( | const std::string & | __token | ) |
| inlineexplicit

Definition at line 2374 of file random.h.

## ◆ ~random_device()

std::random_device::~random_device | ( |  | ) |
| inline

Definition at line 2376 of file random.h.

## Member Function Documentation

## ◆ entropy()

double std::random_device::entropy | ( |  | ) | const
| inlinenoexcept

Definition at line 2388 of file random.h.

## ◆ max()

constexpr result_type std::random_device::max | ( |  | ) |
| inlinestaticconstexpr

Definition at line 2384 of file random.h.

## ◆ min()

constexpr result_type std::random_device::min | ( |  | ) |
| inlinestaticconstexpr

Definition at line 2380 of file random.h.

## ◆ operator()()

result_type std::random_device::operator() | ( |  | ) |
| inline

Definition at line 2392 of file random.h.

## Member Data Documentation

## ◆ _M_fd

int std::random_device::_M_fd

Definition at line 2417 of file random.h.

## ◆ _M_file

void* std::random_device::_M_file

Definition at line 2415 of file random.h.

## ◆ _M_func

result_type(* std::random_device::_M_func) (void *)

Definition at line 2416 of file random.h.

## ◆ _M_mt

mt19937 std::random_device::_M_mt

Definition at line 2419 of file random.h.

The documentation for this class was generated from the following file:

- random.h