GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::discard_block_engine(3) C++ Standard Libary std::discard_block_engine(3)

std::discard_block_engine - std::discard_block_engine


Defined in header <random>
template<


class Engine, (since C++11)
std::size_t P, std::size_t R


> class discard_block_engine;


discard_block_engine is a pseudo-random number engine adaptor that discards a
certain amount of data produced by the base engine. From each block of size P
generated by the base engine, the adaptor keeps only R numbers, discarding the rest.


Engine - the type of the wrapped engine.
P - the size of a block. Expected that \(\small{P>0}\)P > 0.
R - the number of used numbers per block. Expected that \(\small{0<R\le P}\)0 <
R ≤ P.


-
Engine must meet the requirements of RandomNumberEngine.


Member type Definition
result_type(C++11) Engine::result_type


constructor constructs the engine adaptor
(C++11) (public member function)
seed sets the state of the underlying engine
(C++11) (public member function)
base returns the underlying engine
(C++11) (public member function)


operator() advances the state of the underlying engine and returns the
(C++11) generated value
(public member function)
discard advances the adaptor's state by a specified amount
(C++11) (public member function)


min gets the smallest possible value in the output range of the
[static] (C++11) underlying engine.
(public static member function)
max gets the largest possible value in the output range of the
[static] (C++11) underlying engine.
(public static member function)


operator== compares the internal states of the adaptors and
operator!= underlying engines
(C++11) (function)
(C++11)(removed in C++20)
operator<< performs stream input and output on pseudo-random number
operator>> engine adaptor
(C++11) (function)


constexpr size_t block_size the size of the block, P
[static] (C++11) (public static member constant)
constexpr size_t used_block the number of used numbers per block, R
[static] (C++11) (public static member constant)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.