Namespaces
Variants

std:: independent_bits_engine

From cppreference.net
헤더에 정의됨 <random>
template <

class Engine,
std:: size_t W,
class UIntType

> class independent_bits_engine ;
(C++11부터)

independent_bits_engine 는 래핑된 엔진과 다른 비트 수를 가진 난수를 생성하는 난수 엔진 어댑터입니다.

목차

템플릿 매개변수

Engine - 래핑된 엔진의 타입
W - 생성될 숫자가 가져야 할 비트 수
UIntType - 생성되는 난수의 타입. 매개변수가 cv-unqualified이고 다음 중 하나인 경우가 아니면 효과는 정의되지 않음: unsigned short , unsigned int , unsigned long , 또는 unsigned long long .
타입 요구사항
-
Engine RandomNumberEngine 요구사항을 충족해야 함.
-
W 는 0보다 커야 하며, std:: numeric_limits < UIntType > :: digits 보다 크지 않아야 함.

멤버 타입

멤버 타입 정의
result_type (C++11) UIntType

멤버 함수

엔진 어댑터를 생성함
(public member function)
(C++11)
기본 엔진의 상태를 설정함
(public member function)
(C++11)
기본 엔진을 반환함
(public member function)
생성
(C++11)
기본 엔진의 상태를 진행시키고 생성된 값을 반환함
(public member function)
(C++11)
어댑터의 상태를 지정된 양만큼 진행시킴
(public member function)
특성
[static] (C++11)
출력 범위에서 가능한 가장 작은 값을 얻음 (항상 0).
(public static member function)
[static] (C++11)
출력 범위에서 가능한 가장 큰 값을 얻음 (항상 2 w
- 1).
(public static member function)

비멤버 함수

(C++11) (C++11) (removed in C++20)
어댑터와 기본 엔진의 내부 상태를 비교합니다
(함수)
의사 난수 엔진 어댑터에 대한 스트림 입력 및 출력을 수행합니다
(함수)

예제