上传cppreference
This commit is contained in:
87
web/cppreference-zh/chmhelp/cpp-named_req-seedsequence.html
Normal file
87
web/cppreference-zh/chmhelp/cpp-named_req-seedsequence.html
Normal file
@@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" dir="ltr" class="client-nojs" xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh">
|
||||
<head><meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>C++ 具名要求:种子序列 (SeedSequence)</title>
|
||||
<link rel="stylesheet" href="ext.css" />
|
||||
<link rel="stylesheet" href="site_modules.css" />
|
||||
</head>
|
||||
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-cpp_named_req_SeedSequence skin-cppreference2 action-view cpp-navbar">
|
||||
<div id="cpp-content-base">
|
||||
<div id="content"><a id="top"></a>
|
||||
<h1 id="firstHeading" class="firstHeading"><span style="font-size:0.7em; line-height:130%">C++ 具名要求:</span><span style="font-style:italic">种子序列</span> <span style="font-family: Georgia, 'DejaVu Serif', serif; font-style:italic">(SeedSequence)</span></h1>
|
||||
<div id="bodyContent">
|
||||
<div id="contentSub"><span class="subpages">< <a href="cpp.html">cpp</a>‎ | <a href="cpp-named_req.html">named req</a></span></div>
|
||||
<div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr" xml:lang="zh">
|
||||
<p><strong class="selflink"><span style="font-style:italic">种子序列</span> <span style="font-family: Georgia, 'DejaVu Serif', serif; font-style:italic">(SeedSequence)</span></strong> 是基于消费的整数数据范围,产生 <span class="texhtml" style="white-space: nowrap;">0 ≤ i < 2<span class="t-su">32<br /></span></span> 范围中的无符号整数值 <span class="texhtml" style="white-space: nowrap;">i</span> 的对象。</p>
|
||||
<h3><span class="mw-headline" id=".E8.A6.81.E6.B1.82">要求</span></h3>
|
||||
<ul>
|
||||
<li><code><b>S</b></code> 是种子序列 (<span style="font-style:italic">种子序列</span> <span style="font-family: Georgia, 'DejaVu Serif', serif; font-style:italic">(SeedSequence)</span> ) 。</li>
|
||||
<li><code><b>q</b></code> 是 <code>S</code> 的对象且 <code><b>r</b></code> 是 <code>S</code> 的潜在常对象。</li>
|
||||
<li><code><b>T</b></code> 为 <code>result_type</code> 。</li>
|
||||
<li><code><b>ib</b></code> 、 <code><b>ie</b></code> 是<a href="cpp-named_req-InputIterator.html"><span style="font-style:italic">老式输入迭代器</span> <span style="font-family: Georgia, 'DejaVu Serif', serif; font-style:italic">(LegacyInputIterator)</span></a> ,其 <code>value_type</code> 为至少 32 位的无符号整数值。</li>
|
||||
<li><code><b>il</b></code> 是一个 <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="cpp-utility-initializer_list.html"><span class="kw960">std::<span class="me2">initializer_list</span></span></a><span class="sy1"><</span>T<span class="sy1">></span></span></span> 。</li>
|
||||
<li><code><b>rb</b></code> 、 <code><b>re</b></code> 是<a href="cpp-named_req-OutputIterator.html">可变</a><a href="cpp-named_req-RandomAccessIterator.html"><span style="font-style:italic">老式随机访问迭代器</span> <span style="font-family: Georgia, 'DejaVu Serif', serif; font-style:italic">(LegacyRandomAccessIterator)</span></a> ,其 <code>value_type</code> 为至少 32 位的无符号整数值。</li>
|
||||
<li><code><b>ob</b></code> 是<a href="cpp-named_req-OutputIterator.html"><span style="font-style:italic">老式输出迭代器</span> <span style="font-family: Georgia, 'DejaVu Serif', serif; font-style:italic">(LegacyOutputIterator)</span></a> 。</li>
|
||||
</ul>
|
||||
<table class="wikitable">
|
||||
<tr>
|
||||
<th>表达式</th>
|
||||
<th>类型</th>
|
||||
<th>注意</th>
|
||||
<th>复杂度</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>S::result_type</code></td>
|
||||
<td><code>T</code></td>
|
||||
<td>至少 32 位的无符号整数</td>
|
||||
<td>编译时</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>S()</code></td>
|
||||
<td></td>
|
||||
<td>创建拥有同 <code>S</code> 类型其他对象的默认值的种子序列</td>
|
||||
<td>常数</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>S(ib,ie)</code></td>
|
||||
<td></td>
|
||||
<td>创建基于 <span class="texhtml" style="white-space: nowrap;">[<code>ib</code>,<code>ie</code>)</span> 所提供输入位的种子序列</td>
|
||||
<td><span class="texhtml" style="white-space: nowrap;">O(ie-ib)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>S(il)</code></td>
|
||||
<td></td>
|
||||
<td>同 <code>S(il.begin(), il.end())</code></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>q.generate(rb,re)</code></td>
|
||||
<td><code>void</code></td>
|
||||
<td>以依赖初始提供值和潜在的到 <code>generate</code> 的先前调用的 32 位数量填充 <span class="texhtml" style="white-space: nowrap;">[<code>rb</code>,<code>re</code>)</span> 。若 <code>rb == re</code> 则不做任何事。</td>
|
||||
<td><span class="texhtml" style="white-space: nowrap;">O(re-rb)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>r.size()</code></td>
|
||||
<td><code>size_t</code></td>
|
||||
<td><code>param</code> 所复制的 32 位整数的量。</td>
|
||||
<td>常数</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>r.param(ob)</code></td>
|
||||
<td><code>void</code></td>
|
||||
<td>复制 32 位值,到若传递给 <code>S</code> 的构造函数则会重生成对象当前状态的 <code>ob</code> 。</td>
|
||||
<td><span class="texhtml" style="white-space: nowrap;">O(r.size())</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3><span class="mw-headline" id=".E5.8F.82.E9.98.85">参阅</span></h3>
|
||||
<ul>
|
||||
<li><span class="t-lc"><a href="cpp-numeric-random-seed_seq.html">std::seed_seq</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="visualClear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user