<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.14">
  <compounddef id="sampling_8h" kind="file" language="C++">
    <compoundname>sampling.h</compoundname>
    <includes local="no">cereal/access.hpp</includes>
    <includes local="no">cereal/types/polymorphic.hpp</includes>
    <includes local="no">cstdint</includes>
    <includes local="no">random</includes>
    <includes local="no">type_traits</includes>
    <includes local="no">vector</includes>
    <includes local="no">algorithm</includes>
    <includes refid="global_8h" local="yes">../global.h</includes>
    <includes local="yes">./serialization/basics.h</includes>
    <incdepgraph>
      <node id="1339">
        <label>iomanip</label>
      </node>
      <node id="1338">
        <label>glog/logging.h</label>
      </node>
      <node id="1332">
        <label>cstdint</label>
      </node>
      <node id="1343">
        <label>string</label>
      </node>
      <node id="1342">
        <label>./version.h</label>
        <link refid="version_8h"/>
      </node>
      <node id="1329">
        <label>/Users/classner/git/forpy/include/forpy/util/sampling.h</label>
        <link refid="sampling_8h"/>
        <childnode refid="1330" relation="include">
        </childnode>
        <childnode refid="1331" relation="include">
        </childnode>
        <childnode refid="1332" relation="include">
        </childnode>
        <childnode refid="1333" relation="include">
        </childnode>
        <childnode refid="1334" relation="include">
        </childnode>
        <childnode refid="1335" relation="include">
        </childnode>
        <childnode refid="1336" relation="include">
        </childnode>
        <childnode refid="1337" relation="include">
        </childnode>
        <childnode refid="1345" relation="include">
        </childnode>
      </node>
      <node id="1333">
        <label>random</label>
      </node>
      <node id="1335">
        <label>vector</label>
      </node>
      <node id="1340">
        <label>iostream</label>
      </node>
      <node id="1337">
        <label>../global.h</label>
        <link refid="global_8h"/>
        <childnode refid="1338" relation="include">
        </childnode>
        <childnode refid="1339" relation="include">
        </childnode>
        <childnode refid="1340" relation="include">
        </childnode>
        <childnode refid="1341" relation="include">
        </childnode>
        <childnode refid="1342" relation="include">
        </childnode>
        <childnode refid="1343" relation="include">
        </childnode>
        <childnode refid="1344" relation="include">
        </childnode>
      </node>
      <node id="1345">
        <label>./serialization/basics.h</label>
      </node>
      <node id="1344">
        <label>csignal</label>
      </node>
      <node id="1341">
        <label>thread</label>
      </node>
      <node id="1331">
        <label>cereal/types/polymorphic.hpp</label>
      </node>
      <node id="1334">
        <label>type_traits</label>
      </node>
      <node id="1336">
        <label>algorithm</label>
      </node>
      <node id="1330">
        <label>cereal/access.hpp</label>
      </node>
    </incdepgraph>
    <innerclass refid="classforpy_1_1_sampling_without_replacement" prot="public">forpy::SamplingWithoutReplacement</innerclass>
    <innernamespace refid="namespaceforpy">forpy</innernamespace>
      <sectiondef kind="define">
      <memberdef kind="define" id="sampling_8h_1a36682b7db5adca347048a5e9cf1efffb" prot="public" static="no">
        <name>FORPY_UTIL_SAMPLING_H_</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/classner/git/forpy/include/forpy/util/sampling.h" line="4" column="9" bodyfile="/Users/classner/git/forpy/include/forpy/util/sampling.h" bodystart="4" bodyend="-1"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*<sp/>Author:<sp/>Christoph<sp/>Lassner<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#pragma<sp/>once</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>FORPY_UTIL_SAMPLING_H_</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4" refid="sampling_8h_1a36682b7db5adca347048a5e9cf1efffb" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>FORPY_UTIL_SAMPLING_H_</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;cereal/access.hpp&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;cereal/types/polymorphic.hpp&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;cstdint&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;random&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="11"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;type_traits&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;vector&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;algorithm&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;../global.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="16"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;./serialization/basics.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><highlight class="normal"></highlight></codeline>
<codeline lineno="18"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal"><ref refid="namespaceforpy" kindref="compound">forpy</ref><sp/>{</highlight></codeline>
<codeline lineno="30" refid="namespaceforpy_1acb8e9515cc9ae3300c0395ed26dea175" refkind="member"><highlight class="keyword">static</highlight><highlight class="normal"><sp/>int64_t<sp/><ref refid="namespaceforpy_1acb8e9515cc9ae3300c0395ed26dea175" kindref="member">ibinom</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>&amp;n,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>k)<sp/>{</highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><ref refid="global_8h_1a7fbe72e39fae18e8a67a0cb688afd4be" kindref="member">FASSERT</ref>(n<sp/>&gt;=<sp/>0<sp/>&amp;&amp;<sp/>k<sp/>&gt;=<sp/>0);</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/>int64_t<sp/>b;</highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(0<sp/>==<sp/>k<sp/>||<sp/>n<sp/>==<sp/>k)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1LL;</highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(k<sp/>&gt;<sp/>n)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0LL;</highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(k<sp/>&gt;<sp/>(n<sp/>-<sp/>k))<sp/>k<sp/>=<sp/>n<sp/>-<sp/>k;</highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(1<sp/>==<sp/>k)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">static_cast&lt;</highlight><highlight class="normal">int64_t</highlight><highlight class="keyword">&gt;</highlight><highlight class="normal">(n);</highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/>b<sp/>=<sp/>1LL;</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>1;<sp/>i<sp/>&lt;=<sp/>k;<sp/>++i)<sp/>{</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/>b<sp/>*=<sp/>(n<sp/>-<sp/>(k<sp/>-<sp/>i));</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(b<sp/>&lt;<sp/>0)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1LL;<sp/></highlight><highlight class="comment">/*<sp/>Overflow<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/>b<sp/>/=<sp/>i;</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>b;</highlight></codeline>
<codeline lineno="48"><highlight class="normal">};</highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="keyword">template</highlight><highlight class="normal"><sp/>&lt;</highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T&gt;</highlight></codeline>
<codeline lineno="62" refid="classforpy_1_1_sampling_without_replacement" refkind="compound"><highlight class="normal"></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classforpy_1_1_sampling_without_replacement" kindref="compound">SamplingWithoutReplacement</ref><sp/>{</highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="64" refid="classforpy_1_1_sampling_without_replacement_1a4926767cef9a2798b10f4ea230d52d7a" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a4926767cef9a2798b10f4ea230d52d7a" kindref="member">SamplingWithoutReplacement</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>T<sp/>&amp;<ref refid="classforpy_1_1_sampling_without_replacement_1a0b40ff6ebdff42cabcb37e227f4bfdec" kindref="member">min</ref>,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>T<sp/>&amp;max,</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::shared_ptr&lt;std::mt19937&gt;<sp/>&amp;<ref refid="classforpy_1_1_sampling_without_replacement_1ab8935c9a91d6974a9501bc51f9b44420" kindref="member">random_engine</ref>)</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>:<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a0b40ff6ebdff42cabcb37e227f4bfdec" kindref="member">min</ref>(<ref refid="classforpy_1_1_sampling_without_replacement_1a0b40ff6ebdff42cabcb37e227f4bfdec" kindref="member">min</ref>),<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1ab8935c9a91d6974a9501bc51f9b44420" kindref="member">random_engine</ref>(<ref refid="classforpy_1_1_sampling_without_replacement_1ab8935c9a91d6974a9501bc51f9b44420" kindref="member">random_engine</ref>)<sp/>{</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="global_8h_1a7fbe72e39fae18e8a67a0cb688afd4be" kindref="member">FASSERT</ref>(max<sp/>&gt;=<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a0b40ff6ebdff42cabcb37e227f4bfdec" kindref="member">min</ref>);</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" kindref="member">indices</ref><sp/>=<sp/>std::vector&lt;T&gt;(max<sp/>-<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a0b40ff6ebdff42cabcb37e227f4bfdec" kindref="member">min</ref><sp/>+<sp/>1);</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/>std::iota(<ref refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" kindref="member">indices</ref>.begin(),<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" kindref="member">indices</ref>.end(),<sp/>0);</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classforpy_1_1_sampling_without_replacement_1afe7f9cc742a5148ee2f11cf5853d1e1f" kindref="member">index</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a95b993aa84242d0e8182df2e85b820c1" kindref="member">dist</ref><sp/>=<sp/>std::uniform_int_distribution&lt;size_t&gt;(0,<sp/>max<sp/>-<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a0b40ff6ebdff42cabcb37e227f4bfdec" kindref="member">min</ref>);</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="73"><highlight class="normal"></highlight></codeline>
<codeline lineno="77" refid="classforpy_1_1_sampling_without_replacement_1a8c14a4f42f20b6b7af11752aea0bb73c" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a8c14a4f42f20b6b7af11752aea0bb73c" kindref="member">sample_available</ref>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_sampling_without_replacement_1afe7f9cc742a5148ee2f11cf5853d1e1f" kindref="member">index</ref><sp/>&lt;<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" kindref="member">indices</ref>.size();<sp/>};</highlight></codeline>
<codeline lineno="78"><highlight class="normal"></highlight></codeline>
<codeline lineno="82" refid="classforpy_1_1_sampling_without_replacement_1a594c9481db1ea1e4a77e41118c20135c" refkind="member"><highlight class="normal"><sp/><sp/>T<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a594c9481db1ea1e4a77e41118c20135c" kindref="member">get_next</ref>()<sp/>{</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/>T<sp/>return_value;</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classforpy_1_1_sampling_without_replacement_1afe7f9cc742a5148ee2f11cf5853d1e1f" kindref="member">index</ref><sp/>&gt;=<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" kindref="member">indices</ref>.size())</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forpy_exception" kindref="compound">ForpyException</ref>(</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;Tried<sp/>to<sp/>redraw<sp/>without<sp/>replacement<sp/>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;from<sp/>a<sp/>limited<sp/>set<sp/>where<sp/>the<sp/>num<sp/>of<sp/>remaining<sp/>examples<sp/>was<sp/>0.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>rand_index<sp/>=<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a95b993aa84242d0e8182df2e85b820c1" kindref="member">dist</ref>(*<ref refid="classforpy_1_1_sampling_without_replacement_1ab8935c9a91d6974a9501bc51f9b44420" kindref="member">random_engine</ref>);</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>std::swap(<ref refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" kindref="member">indices</ref>[<ref refid="classforpy_1_1_sampling_without_replacement_1afe7f9cc742a5148ee2f11cf5853d1e1f" kindref="member">index</ref>],<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" kindref="member">indices</ref>[rand_index]);</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classforpy_1_1_sampling_without_replacement_1afe7f9cc742a5148ee2f11cf5853d1e1f" kindref="member">index</ref><sp/>!=<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" kindref="member">indices</ref>.size()<sp/>-<sp/>1)</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a95b993aa84242d0e8182df2e85b820c1" kindref="member">dist</ref>.param(std::uniform_int_distribution&lt;size_t&gt;::param_type(</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a95b993aa84242d0e8182df2e85b820c1" kindref="member">dist</ref>.min()<sp/>+<sp/>1,<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a95b993aa84242d0e8182df2e85b820c1" kindref="member">dist</ref>.max()));</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>return_value<sp/>=<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a0b40ff6ebdff42cabcb37e227f4bfdec" kindref="member">min</ref><sp/>+<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" kindref="member">indices</ref>[<ref refid="classforpy_1_1_sampling_without_replacement_1afe7f9cc742a5148ee2f11cf5853d1e1f" kindref="member">index</ref>++];</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>return_value;</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="98"><highlight class="normal"></highlight></codeline>
<codeline lineno="99" refid="classforpy_1_1_sampling_without_replacement_1af3daf7e997e4c19e3c3b4a0570f0a60f" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">friend</highlight><highlight class="normal"><sp/>std::ostream<sp/>&amp;<ref refid="classforpy_1_1_sampling_without_replacement_1af3daf7e997e4c19e3c3b4a0570f0a60f" kindref="member">operator&lt;&lt;</ref>(</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>std::ostream<sp/>&amp;stream,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_sampling_without_replacement" kindref="compound">SamplingWithoutReplacement</ref><sp/>&amp;</highlight><highlight class="keyword">self</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/>stream<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;forpy::SamplingWithoutReplacement[&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/></highlight><highlight class="keyword">self</highlight><highlight class="normal">.min</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;<sp/>(inc):&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>(</highlight><highlight class="keyword">self</highlight><highlight class="normal">.min<sp/>+<sp/></highlight><highlight class="keyword">self</highlight><highlight class="normal">.indices.size()<sp/>-<sp/>1)<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;<sp/>(inc),<sp/>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&lt;&lt;<sp/>(</highlight><highlight class="keyword">self</highlight><highlight class="normal">.<ref refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" kindref="member">indices</ref>.size()<sp/>-<sp/></highlight><highlight class="keyword">self</highlight><highlight class="normal">.index)<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;<sp/>available]&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>stream;</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="106"><highlight class="normal"></highlight></codeline>
<codeline lineno="107" refid="classforpy_1_1_sampling_without_replacement_1a97aeb12f07020c32c2f434cfbb7b935d" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a97aeb12f07020c32c2f434cfbb7b935d" kindref="member">operator==</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_sampling_without_replacement" kindref="compound">SamplingWithoutReplacement&lt;T&gt;</ref><sp/>&amp;rhs)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(<ref refid="classforpy_1_1_sampling_without_replacement_1a0b40ff6ebdff42cabcb37e227f4bfdec" kindref="member">min</ref><sp/>==<sp/>rhs.<ref refid="classforpy_1_1_sampling_without_replacement_1a0b40ff6ebdff42cabcb37e227f4bfdec" kindref="member">min</ref><sp/>&amp;&amp;<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1ab8935c9a91d6974a9501bc51f9b44420" kindref="member">random_engine</ref><sp/>==<sp/>rhs.<ref refid="classforpy_1_1_sampling_without_replacement_1ab8935c9a91d6974a9501bc51f9b44420" kindref="member">random_engine</ref><sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a95b993aa84242d0e8182df2e85b820c1" kindref="member">dist</ref><sp/>==<sp/>rhs.<ref refid="classforpy_1_1_sampling_without_replacement_1a95b993aa84242d0e8182df2e85b820c1" kindref="member">dist</ref><sp/>&amp;&amp;<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" kindref="member">indices</ref><sp/>==<sp/>rhs.<ref refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" kindref="member">indices</ref><sp/>&amp;&amp;<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1afe7f9cc742a5148ee2f11cf5853d1e1f" kindref="member">index</ref><sp/>==<sp/>rhs.<ref refid="classforpy_1_1_sampling_without_replacement_1afe7f9cc742a5148ee2f11cf5853d1e1f" kindref="member">index</ref>);</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="111"><highlight class="normal"></highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="113" refid="classforpy_1_1_sampling_without_replacement_1a9e6936c4d78f4d34896f6adefc940078" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a9e6936c4d78f4d34896f6adefc940078" kindref="member">SamplingWithoutReplacement</ref>(){};</highlight></codeline>
<codeline lineno="114"><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">friend</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal">cereal::access;</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><sp/>&lt;</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Archive&gt;</highlight></codeline>
<codeline lineno="117" refid="classforpy_1_1_sampling_without_replacement_1a48bc9a6f27cac4f8aee1b68cd7924aac" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a48bc9a6f27cac4f8aee1b68cd7924aac" kindref="member">serialize</ref>(Archive<sp/>&amp;ar,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>&amp;)<sp/>{</highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/>ar(CEREAL_NVP(<ref refid="classforpy_1_1_sampling_without_replacement_1a0b40ff6ebdff42cabcb37e227f4bfdec" kindref="member">min</ref>),<sp/>CEREAL_NVP(<ref refid="classforpy_1_1_sampling_without_replacement_1ab8935c9a91d6974a9501bc51f9b44420" kindref="member">random_engine</ref>),<sp/>CEREAL_NVP(<ref refid="classforpy_1_1_sampling_without_replacement_1a95b993aa84242d0e8182df2e85b820c1" kindref="member">dist</ref>),</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CEREAL_NVP(<ref refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" kindref="member">indices</ref>),<sp/>CEREAL_NVP(<ref refid="classforpy_1_1_sampling_without_replacement_1afe7f9cc742a5148ee2f11cf5853d1e1f" kindref="member">index</ref>));</highlight></codeline>
<codeline lineno="120" refid="classforpy_1_1_sampling_without_replacement_1a0b40ff6ebdff42cabcb37e227f4bfdec" refkind="member"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="121"><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/>T<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a0b40ff6ebdff42cabcb37e227f4bfdec" kindref="member">min</ref>;</highlight></codeline>
<codeline lineno="123" refid="classforpy_1_1_sampling_without_replacement_1ab8935c9a91d6974a9501bc51f9b44420" refkind="member"><highlight class="normal"><sp/><sp/>std::shared_ptr&lt;std::mt19937&gt;<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1ab8935c9a91d6974a9501bc51f9b44420" kindref="member">random_engine</ref>;</highlight></codeline>
<codeline lineno="124" refid="classforpy_1_1_sampling_without_replacement_1a95b993aa84242d0e8182df2e85b820c1" refkind="member"><highlight class="normal"><sp/><sp/>std::uniform_int_distribution&lt;T&gt;<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a95b993aa84242d0e8182df2e85b820c1" kindref="member">dist</ref>;</highlight></codeline>
<codeline lineno="125" refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" refkind="member"><highlight class="normal"><sp/><sp/>std::vector&lt;T&gt;<sp/><ref refid="classforpy_1_1_sampling_without_replacement_1a5b2ec251b2eb5702c337d44af1f33f6a" kindref="member">indices</ref>;</highlight></codeline>
<codeline lineno="126" refid="classforpy_1_1_sampling_without_replacement_1afe7f9cc742a5148ee2f11cf5853d1e1f" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_sampling_without_replacement_1afe7f9cc742a5148ee2f11cf5853d1e1f" kindref="member">index</ref>;</highlight></codeline>
<codeline lineno="127"><highlight class="normal">};</highlight></codeline>
<codeline lineno="128"><highlight class="normal"></highlight></codeline>
<codeline lineno="155"><highlight class="keyword">template</highlight><highlight class="normal"><sp/>&lt;</highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>T&gt;</highlight></codeline>
<codeline lineno="156" refid="namespaceforpy_1a28e01d740749ef6f6405a72332fb19fa" refkind="member"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>std::vector&lt;T&gt;<sp/><ref refid="namespaceforpy_1a28e01d740749ef6f6405a72332fb19fa" kindref="member">unique_indices</ref>(T<sp/>num,<sp/>T<sp/>min,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>T<sp/>&amp;max,</highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::mt19937<sp/>*random_engine,</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>return_sorted<sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/>static_assert(std::is_integral&lt;T&gt;::value,<sp/></highlight><highlight class="stringliteral">&quot;T<sp/>must<sp/>be<sp/>integral!&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(max<sp/>&lt;<sp/>min)<sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forpy_exception" kindref="compound">ForpyException</ref>(</highlight><highlight class="stringliteral">&quot;Invalid<sp/>sample<sp/>range.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(num<sp/>&gt;<sp/>max<sp/>-<sp/>min<sp/>+<sp/>1)</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_forpy_exception" kindref="compound">ForpyException</ref>(</highlight><highlight class="stringliteral">&quot;Sample<sp/>size<sp/>larger<sp/>than<sp/>range.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/>std::vector&lt;T&gt;<sp/>result(num);</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(num<sp/>==<sp/>max<sp/>-<sp/>min<sp/>+<sp/>1)<sp/>{</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>The<sp/>full<sp/>range<sp/>of<sp/>numbers<sp/>is<sp/>required.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/>std::iota(result.begin(),<sp/>result.end(),<sp/>min);</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/>std::geometric_distribution&lt;T&gt;<sp/>dist;</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(num<sp/>+<sp/>1<sp/>&lt;<sp/>max<sp/>-<sp/>min<sp/>+<sp/>1)<sp/>{</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Draw<sp/>unique<sp/>samples<sp/>by<sp/>iterating<sp/>once<sp/>over<sp/>the<sp/>numbers.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>There<sp/>are<sp/>only<sp/>as<sp/>many<sp/>&apos;steps&apos;<sp/>as<sp/>there<sp/>should<sp/>be<sp/>numbers<sp/>drawn.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>The<sp/>difference<sp/>between<sp/>two<sp/>numbers<sp/>uniquely<sp/>drawn<sp/>from<sp/>the<sp/>set<sp/>is</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>distributed<sp/>with<sp/>a<sp/>geometric<sp/>distribution.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>The<sp/>mean<sp/>difference<sp/>between<sp/>two<sp/>numbers<sp/>is<sp/>(max-min+1)/(num+1).</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>dist<sp/>=<sp/>std::geometric_distribution&lt;T&gt;(</highlight><highlight class="keyword">static_cast&lt;</highlight><highlight class="keywordtype">float</highlight><highlight class="keyword">&gt;</highlight><highlight class="normal">(num<sp/>+<sp/>1)<sp/>/</highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>static_cast&lt;float&gt;(max<sp/>-<sp/>min<sp/>+<sp/>1));</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>A<sp/>truncated<sp/>geometric<sp/>distribution<sp/>must<sp/>be<sp/>used<sp/>to<sp/>guarantee<sp/>that</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>all<sp/>numbers<sp/>can<sp/>be<sp/>drawn<sp/>from<sp/>the<sp/>range.<sp/>r<sp/>is<sp/>the<sp/>truncation<sp/>level.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>i<sp/>is<sp/>the<sp/>remaining<sp/>number<sp/>of<sp/>elements<sp/>to<sp/>be<sp/>drawn.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/>T<sp/>r,<sp/>i<sp/>=<sp/>num;</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(i--)<sp/>{</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>r<sp/>=<sp/>(max<sp/>-<sp/>min<sp/>+<sp/>1<sp/>-<sp/>i);</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(r<sp/>&lt;=<sp/>1)<sp/>{</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>The<sp/>next<sp/>value<sp/>must<sp/>be<sp/>used,<sp/>since<sp/>there<sp/>is<sp/>no<sp/>more<sp/>&apos;space&apos;<sp/>for</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>additional<sp/>numbers.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>result[num<sp/>-<sp/>i<sp/>-<sp/>1]<sp/>=<sp/>min;</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Do<sp/>the<sp/>next<sp/>step<sp/>and<sp/>handle<sp/>truncation.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>result[num<sp/>-<sp/>i<sp/>-<sp/>1]<sp/>=<sp/>min<sp/>+=</highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::min&lt;T&gt;(dist(*random_engine)<sp/>+<sp/>1,<sp/>r<sp/>-<sp/>1);</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>The<sp/>numbers<sp/>are<sp/>now<sp/>ready,<sp/>sorted<sp/>in<sp/>the<sp/>appropriate<sp/>interval.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!return_sorted)<sp/>{</highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/>std::shuffle(result.begin(),<sp/>result.end(),<sp/>*random_engine);</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="200"><highlight class="normal">};</highlight></codeline>
<codeline lineno="201"><highlight class="normal">};<sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>namespace<sp/>forpy</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="202"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/><sp/>//<sp/>FORPY_UTIL_SAMPLING_H_</highlight></codeline>
    </programlisting>
    <location file="/Users/classner/git/forpy/include/forpy/util/sampling.h"/>
  </compounddef>
</doxygen>
