首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::linear_congruential_engine::discard

void discard( unsigned long long z );

?

(since C++11)

通过以下方式推进内部状态z时代。相当于呼叫operator()z重复并丢弃结果。

参数

z

-

integer value specifying the number of times to advance the state by

返回值

%280%29

复杂性

注记

对于一些引擎来说,“快速跳转”算法是众所周知的,它将状态提升了许多步骤--数百万的28阶,而不是计算中间状态的转换。

另见

operator()

advances the engine's state and returns the generated value (public member function)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com