std::discard_block_engine<Engine,P,R>:: discard_block_engine
From cppreference.net
<
cpp
|
numeric
|
random
|
discard block engine
C++
Numerics library
| Common mathematical functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mathematical special functions (C++17) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mathematical constants (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Basic linear algebra algorithms (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Data-parallel types (SIMD) (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Floating-point environment (C++11) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Complex numbers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Numeric array (
valarray
)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Pseudo-random number generation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bit manipulation (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Saturation arithmetic (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Factor operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Interpolations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Generic numeric operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| C-style checked integer arithmetic | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Pseudo-random number generation
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::discard_block_engine
| Member functions | ||||
|
discard_block_engine::discard_block_engine
|
||||
| Generation | ||||
| Characteristics | ||||
| Non-member functions | ||||
|
(C++11)
(C++11)
(until C++20)
|
||||
|
(C++11)
(C++11)
|
|
discard_block_engine
(
)
;
|
(1) | (C++11부터) |
|
explicit
discard_block_engine
(
result_type s
)
;
|
(2) | (C++11부터) |
|
template
<
class
SeedSeq
>
explicit discard_block_engine ( SeedSeq & seq ) ; |
(3) | (C++11부터) |
|
explicit
discard_block_engine
(
const
Engine
&
e
)
;
|
(4) | (C++11부터) |
|
explicit
discard_block_engine
(
Engine
&&
e
)
;
|
(5) | (C++11부터) |
새로운 의사 난수 엔진 어댑터를 생성합니다.
1)
기본 생성자. 내부 엔진도 기본 생성됩니다.
2)
기본 엔진을
s
로 구성합니다.
3)
기본 엔진을 시드 시퀀스
seq
로 구성합니다.
4)
기본 엔진을
e
의 사본으로 구성합니다.
5)
기본 엔진을
e
로 이동 생성합니다.
e
는 이후에 지정되지 않았지만 유효한 상태를 유지합니다.
목차 |
매개변수
| s | - | 기본 엔진을 생성하는 데 사용되는 정수 값 |
| seq | - | 기본 엔진을 생성하는 데 사용되는 시드 시퀀스 |
| e | - | 초기화에 사용되는 의사 난수 엔진 |
예외
예제
결함 보고서
다음 동작 변경 결함 보고서는 이전에 발표된 C++ 표준에 소급 적용되었습니다.
| DR | 적용 대상 | 게시된 동작 | 올바른 동작 |
|---|---|---|---|
| LWG 2181 | C++11 |
오버로드
(
3
)
는
seq.generate
호출이 예외를 발생시키는 경우에도 예외를 발생시키지 않음
|
예외를 전파함 |