<?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="inducedentropy_8h" kind="file" language="C++">
    <compoundname>inducedentropy.h</compoundname>
    <includes local="yes">../util/serialization/basics.h</includes>
    <includes local="no">limits</includes>
    <includes local="no">vector</includes>
    <includes refid="global_8h" local="yes">../global.h</includes>
    <includes refid="checks_8h" local="yes">../util/checks.h</includes>
    <includes refid="exponentials_8h" local="yes">../util/exponentials.h</includes>
    <includes refid="ientropyfunction_8h" local="yes">./ientropyfunction.h</includes>
    <includedby refid="classification__opt_8h" local="yes">/Users/classner/git/forpy/include/forpy/threshold_optimizers/classification_opt.h</includedby>
    <includedby refid="impurities_8h" local="yes">/Users/classner/git/forpy/include/forpy/impurities/impurities.h</includedby>
    <includedby refid="renyientropy_8h" local="yes">/Users/classner/git/forpy/include/forpy/impurities/renyientropy.h</includedby>
    <includedby refid="tsallisentropy_8h" local="yes">/Users/classner/git/forpy/include/forpy/impurities/tsallisentropy.h</includedby>
    <incdepgraph>
      <node id="633">
        <label>functional</label>
      </node>
      <node id="625">
        <label>iomanip</label>
      </node>
      <node id="631">
        <label>../util/checks.h</label>
        <link refid="checks_8h"/>
        <childnode refid="632" relation="include">
        </childnode>
        <childnode refid="633" relation="include">
        </childnode>
        <childnode refid="621" relation="include">
        </childnode>
        <childnode refid="634" relation="include">
        </childnode>
        <childnode refid="622" relation="include">
        </childnode>
        <childnode refid="623" relation="include">
        </childnode>
      </node>
      <node id="621">
        <label>limits</label>
      </node>
      <node id="647">
        <label>mapbox/variant_cast.hpp</label>
      </node>
      <node id="624">
        <label>glog/logging.h</label>
      </node>
      <node id="636">
        <label>cmath</label>
      </node>
      <node id="642">
        <label>numeric</label>
      </node>
      <node id="629">
        <label>string</label>
      </node>
      <node id="628">
        <label>./version.h</label>
        <link refid="version_8h"/>
      </node>
      <node id="640">
        <label>map</label>
      </node>
      <node id="644">
        <label>./util/hash.h</label>
        <link refid="hash_8h"/>
        <childnode refid="645" relation="include">
        </childnode>
        <childnode refid="622" relation="include">
        </childnode>
      </node>
      <node id="639">
        <label>Eigen/Dense</label>
      </node>
      <node id="637">
        <label>./ientropyfunction.h</label>
        <link refid="ientropyfunction_8h"/>
        <childnode refid="623" relation="include">
        </childnode>
        <childnode refid="620" relation="include">
        </childnode>
        <childnode refid="622" relation="include">
        </childnode>
        <childnode refid="638" relation="include">
        </childnode>
      </node>
      <node id="646">
        <label>./util/storage.h</label>
        <link refid="storage_8h"/>
        <childnode refid="647" relation="include">
        </childnode>
        <childnode refid="648" relation="include">
        </childnode>
      </node>
      <node id="622">
        <label>vector</label>
      </node>
      <node id="643">
        <label>utility</label>
      </node>
      <node id="620">
        <label>../util/serialization/basics.h</label>
      </node>
      <node id="635">
        <label>../util/exponentials.h</label>
        <link refid="exponentials_8h"/>
        <childnode refid="636" relation="include">
        </childnode>
        <childnode refid="623" relation="include">
        </childnode>
      </node>
      <node id="619">
        <label>/Users/classner/git/forpy/include/forpy/impurities/inducedentropy.h</label>
        <link refid="inducedentropy_8h"/>
        <childnode refid="620" relation="include">
        </childnode>
        <childnode refid="621" relation="include">
        </childnode>
        <childnode refid="622" relation="include">
        </childnode>
        <childnode refid="623" relation="include">
        </childnode>
        <childnode refid="631" relation="include">
        </childnode>
        <childnode refid="635" relation="include">
        </childnode>
        <childnode refid="637" relation="include">
        </childnode>
      </node>
      <node id="626">
        <label>iostream</label>
      </node>
      <node id="623">
        <label>../global.h</label>
        <link refid="global_8h"/>
        <childnode refid="624" relation="include">
        </childnode>
        <childnode refid="625" relation="include">
        </childnode>
        <childnode refid="626" relation="include">
        </childnode>
        <childnode refid="627" relation="include">
        </childnode>
        <childnode refid="628" relation="include">
        </childnode>
        <childnode refid="629" relation="include">
        </childnode>
        <childnode refid="630" relation="include">
        </childnode>
      </node>
      <node id="645">
        <label>cstddef</label>
      </node>
      <node id="630">
        <label>csignal</label>
      </node>
      <node id="627">
        <label>thread</label>
      </node>
      <node id="634">
        <label>type_traits</label>
      </node>
      <node id="638">
        <label>../types.h</label>
        <link refid="types_8h"/>
        <childnode refid="639" relation="include">
        </childnode>
        <childnode refid="640" relation="include">
        </childnode>
        <childnode refid="641" relation="include">
        </childnode>
        <childnode refid="642" relation="include">
        </childnode>
        <childnode refid="643" relation="include">
        </childnode>
        <childnode refid="622" relation="include">
        </childnode>
        <childnode refid="644" relation="include">
        </childnode>
        <childnode refid="646" relation="include">
        </childnode>
      </node>
      <node id="648">
        <label>./serialization/variant.h</label>
      </node>
      <node id="632">
        <label>algorithm</label>
      </node>
      <node id="641">
        <label>memory</label>
      </node>
    </incdepgraph>
    <invincdepgraph>
      <node id="658">
        <label>/Users/classner/git/forpy/include/forpy/impurities/renyientropy.h</label>
        <link refid="renyientropy_8h"/>
        <childnode refid="655" relation="include">
        </childnode>
      </node>
      <node id="656">
        <label>/Users/classner/git/forpy/include/forpy/gains/entropygain.h</label>
        <link refid="entropygain_8h"/>
        <childnode refid="657" relation="include">
        </childnode>
      </node>
      <node id="650">
        <label>/Users/classner/git/forpy/include/forpy/threshold_optimizers/classification_opt.h</label>
        <link refid="classification__opt_8h"/>
        <childnode refid="651" relation="include">
        </childnode>
        <childnode refid="654" relation="include">
        </childnode>
      </node>
      <node id="653">
        <label>/Users/classner/git/forpy/include/forpy/forpy.h</label>
        <link refid="forpy_8h"/>
      </node>
      <node id="657">
        <label>/Users/classner/git/forpy/include/forpy/gains/gains.h</label>
        <link refid="gains_8h"/>
        <childnode refid="653" relation="include">
        </childnode>
      </node>
      <node id="651">
        <label>/Users/classner/git/forpy/include/forpy/threshold_optimizers/fastclassopt.h</label>
        <link refid="fastclassopt_8h"/>
        <childnode refid="652" relation="include">
        </childnode>
        <childnode refid="654" relation="include">
        </childnode>
      </node>
      <node id="654">
        <label>/Users/classner/git/forpy/include/forpy/threshold_optimizers/threshold_optimizers.h</label>
        <link refid="threshold__optimizers_8h"/>
        <childnode refid="653" relation="include">
        </childnode>
      </node>
      <node id="659">
        <label>/Users/classner/git/forpy/include/forpy/impurities/tsallisentropy.h</label>
        <link refid="tsallisentropy_8h"/>
        <childnode refid="655" relation="include">
        </childnode>
      </node>
      <node id="655">
        <label>/Users/classner/git/forpy/include/forpy/impurities/impurities.h</label>
        <link refid="impurities_8h"/>
        <childnode refid="656" relation="include">
        </childnode>
        <childnode refid="653" relation="include">
        </childnode>
      </node>
      <node id="652">
        <label>/Users/classner/git/forpy/include/forpy/forest.h</label>
        <link refid="forest_8h"/>
        <childnode refid="653" relation="include">
        </childnode>
      </node>
      <node id="649">
        <label>/Users/classner/git/forpy/include/forpy/impurities/inducedentropy.h</label>
        <link refid="inducedentropy_8h"/>
        <childnode refid="650" relation="include">
        </childnode>
        <childnode refid="655" relation="include">
        </childnode>
        <childnode refid="658" relation="include">
        </childnode>
        <childnode refid="659" relation="include">
        </childnode>
      </node>
    </invincdepgraph>
    <innerclass refid="classforpy_1_1_induced_entropy" prot="public">forpy::InducedEntropy</innerclass>
    <innernamespace refid="namespaceforpy">forpy</innernamespace>
      <sectiondef kind="define">
      <memberdef kind="define" id="inducedentropy_8h_1a0a26e71e44aa7b33d8ceb2247f5aa187" prot="public" static="no">
        <name>FORPY_IMPURITIES_INDUCEDENTROPY_H_</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/classner/git/forpy/include/forpy/impurities/inducedentropy.h" line="4" column="9" bodyfile="/Users/classner/git/forpy/include/forpy/impurities/inducedentropy.h" bodystart="4" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="inducedentropy_8h_1a2c98f9173b18ca7b638db85569ba6a8b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>CEREAL_REGISTER_TYPE</definition>
        <argsstring>(forpy::InducedEntropy)</argsstring>
        <name>CEREAL_REGISTER_TYPE</name>
        <param>
          <type><ref refid="classforpy_1_1_induced_entropy" kindref="compound">forpy::InducedEntropy</ref></type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/classner/git/forpy/include/forpy/impurities/inducedentropy.h" line="119" column="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_IMPURITIES_INDUCEDENTROPY_H_</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4" refid="inducedentropy_8h_1a0a26e71e44aa7b33d8ceb2247f5aa187" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>FORPY_IMPURITIES_INDUCEDENTROPY_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/>&quot;../util/serialization/basics.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;limits&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;vector&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight></codeline>
<codeline lineno="11"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;../global.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;../util/checks.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;../util/exponentials.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ientropyfunction_8h" kindref="compound">./ientropyfunction.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal"></highlight></codeline>
<codeline lineno="16"><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="17"><highlight class="normal"></highlight></codeline>
<codeline lineno="42" refid="classforpy_1_1_induced_entropy" refkind="compound"><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classforpy_1_1_induced_entropy" kindref="compound">InducedEntropy</ref><sp/>:<sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_i_entropy_function" kindref="compound">IEntropyFunction</ref><sp/>{</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="44" refid="classforpy_1_1_induced_entropy_1aeb85808d4b380da93605eab3c3ede441" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">explicit</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_induced_entropy_1aeb85808d4b380da93605eab3c3ede441" kindref="member">InducedEntropy</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>&amp;<ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref>)<sp/>:<sp/><ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref>(<ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref>)<sp/>{</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref><sp/>&lt;=<sp/>0.f)<sp/>{</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><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><highlight class="stringliteral">&quot;p<sp/>must<sp/>be<sp/>&gt;<sp/>0.f.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="49" refid="classforpy_1_1_induced_entropy_1af39b89a870d8aba17a5cbefdd293e88f" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_induced_entropy_1af39b89a870d8aba17a5cbefdd293e88f" kindref="member">~InducedEntropy</ref>(){};</highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight></codeline>
<codeline lineno="51" refid="classforpy_1_1_induced_entropy_1a8706f92dca8bd8c210e20902e5a1a29f" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">virtual</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_induced_entropy_1a8706f92dca8bd8c210e20902e5a1a29f" kindref="member">operator()</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>*class_members_numbers,</highlight></codeline>
<codeline lineno="52"><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/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>&amp;n,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>&amp;fsum)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="global_8h_1a7fbe72e39fae18e8a67a0cb688afd4be" kindref="member">FASSERT</ref>(static_cast&lt;float&gt;(std::accumulate(class_members_numbers,</highlight></codeline>
<codeline lineno="54"><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/><sp/><sp/><sp/>class_members_numbers<sp/>+<sp/>n,</highlight></codeline>
<codeline lineno="55"><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/><sp/><sp/><sp/>static_cast&lt;float&gt;(0)))<sp/>==<sp/>fsum);</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(fsum<sp/>==<sp/>0.f)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0.f;</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref><sp/>==<sp/>2.f)<sp/>{</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>sq_left<sp/>=<sp/>0.f;</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>n;<sp/>++i,<sp/>++class_members_numbers)</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sq_left<sp/>+=<sp/>*class_members_numbers<sp/>*<sp/>*class_members_numbers;</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1.f<sp/>-<sp/>sq_left<sp/>/<sp/>(fsum<sp/>*<sp/>fsum);</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>n_classes_f<sp/>=<sp/></highlight><highlight class="keyword">static_cast&lt;</highlight><highlight class="keywordtype">float</highlight><highlight class="keyword">&gt;</highlight><highlight class="normal">(n);</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>max_unorder_val<sp/>=<sp/>1.f<sp/>/<sp/>n_classes_f;</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>entropy_sum;</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ceilf(<ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref>)<sp/>==<sp/><ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref><sp/>||<sp/>floorf(<ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref>)<sp/>==<sp/><ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref>)<sp/>{</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref><sp/>whole_p<sp/>=<sp/></highlight><highlight class="keyword">static_cast&lt;</highlight><highlight class="normal"><ref refid="namespaceforpy_1ad05e34c62859518b61b76b5085e913d8" kindref="member">uint</ref></highlight><highlight class="keyword">&gt;</highlight><highlight class="normal">(<ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref>);</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>entropy_sum<sp/>=<sp/><ref refid="namespaceforpy_1a1c0789b7bdd25c7469c20b29a84a77eb" kindref="member">fpowi</ref>(1.f<sp/>-<sp/>max_unorder_val,<sp/>whole_p)<sp/>+</highlight></codeline>
<codeline lineno="69"><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/>(n_classes_f<sp/>-<sp/>1.f)<sp/>*<sp/><ref refid="namespaceforpy_1a1c0789b7bdd25c7469c20b29a84a77eb" kindref="member">fpowi</ref>(max_unorder_val,<sp/>whole_p);</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>n;<sp/>++i)<sp/>{</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>quot<sp/>=<sp/>*(class_members_numbers++)<sp/>/<sp/>fsum;</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>entropy_sum<sp/>-=<sp/><ref refid="namespaceforpy_1a1c0789b7bdd25c7469c20b29a84a77eb" kindref="member">fpowi</ref>(fabs(quot<sp/>-<sp/>max_unorder_val),<sp/>whole_p);</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>entropy_sum<sp/>=<sp/>powf(1.f<sp/>-<sp/>max_unorder_val,<sp/><ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref>)<sp/>+</highlight></codeline>
<codeline lineno="76"><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/>(n_classes_f<sp/>-<sp/>1.f)<sp/>*<sp/>powf(max_unorder_val,<sp/><ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref>);</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>n;<sp/>++i)<sp/>{</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>quot<sp/>=<sp/>*(class_members_numbers++)<sp/>/<sp/>fsum;</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>entropy_sum<sp/>-=<sp/>powf(fabs(quot<sp/>-<sp/>max_unorder_val),<sp/><ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref>);</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>entropy_sum;</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="85"><highlight class="normal"></highlight></codeline>
<codeline lineno="86" refid="classforpy_1_1_induced_entropy_1a0f66737687c9cf6e80a343f74726689d" 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_induced_entropy_1a0f66737687c9cf6e80a343f74726689d" kindref="member">operator&lt;&lt;</ref>(std::ostream<sp/>&amp;stream,</highlight></codeline>
<codeline lineno="87"><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/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_induced_entropy" kindref="compound">InducedEntropy</ref><sp/>&amp;</highlight><highlight class="keyword">self</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/>stream<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;forpy::InducedEntropy[p=&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/></highlight><highlight class="keyword">self</highlight><highlight class="normal">.get_p()<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;]&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>stream;</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="91"><highlight class="normal"></highlight></codeline>
<codeline lineno="92" refid="classforpy_1_1_induced_entropy_1a4930fd1c89013462ed0cfb56a5aff842" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_induced_entropy_1a4930fd1c89013462ed0cfb56a5aff842" kindref="member">operator==</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_i_entropy_function" kindref="compound">IEntropyFunction</ref><sp/>&amp;rhs)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">auto</highlight><highlight class="normal"><sp/>*rhs_c<sp/>=<sp/></highlight><highlight class="keyword">dynamic_cast&lt;</highlight><highlight class="normal"><ref refid="classforpy_1_1_induced_entropy" kindref="compound">InducedEntropy</ref><sp/></highlight><highlight class="keyword">const<sp/></highlight><highlight class="normal">*</highlight><highlight class="keyword">&gt;</highlight><highlight class="normal">(&amp;rhs);</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rhs_c<sp/>==<sp/></highlight><highlight class="keyword">nullptr</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>eq_p<sp/>=<sp/><ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref><sp/>==<sp/>rhs_c-&gt;p;</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>eq_p;</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="101"><highlight class="normal"></highlight></codeline>
<codeline lineno="102" refid="classforpy_1_1_induced_entropy_1a0a40462d1b6feca9f2a481d1b436d682" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_induced_entropy_1a0a40462d1b6feca9f2a481d1b436d682" kindref="member">get_p</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_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref>;<sp/>};</highlight></codeline>
<codeline lineno="103"><highlight class="normal"></highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="105" refid="classforpy_1_1_induced_entropy_1aa97abfc9579d8fd9d8898e4587cc4143" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_induced_entropy_1aa97abfc9579d8fd9d8898e4587cc4143" kindref="member">InducedEntropy</ref>(){};</highlight></codeline>
<codeline lineno="106"><highlight class="normal"></highlight></codeline>
<codeline lineno="107"><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="108"><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="109" refid="classforpy_1_1_induced_entropy_1a7f99b0fd672511e46ccbac1946a2373f" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_induced_entropy_1a7f99b0fd672511e46ccbac1946a2373f" 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="110"><highlight class="normal"><sp/><sp/><sp/><sp/>ar(cereal::make_nvp(</highlight><highlight class="stringliteral">&quot;base&quot;</highlight><highlight class="normal">,<sp/>cereal::base_class&lt;IEntropyFunction&gt;(</highlight><highlight class="keyword">this</highlight><highlight class="normal">)),</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CEREAL_NVP(<ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref>));</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="113"><highlight class="normal"></highlight></codeline>
<codeline lineno="114" refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="classforpy_1_1_induced_entropy_1ad1ffbdfb0add2105ddc95b129904297e" kindref="member">p</ref>;</highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/><ref refid="classforpy_1_1_induced_entropy_1a0f5ad80166b571f08345d253753c5b8a" kindref="member">DISALLOW_COPY_AND_ASSIGN</ref>(<ref refid="classforpy_1_1_induced_entropy" kindref="compound">InducedEntropy</ref>);</highlight></codeline>
<codeline lineno="116"><highlight class="normal">};</highlight></codeline>
<codeline lineno="117"><highlight class="normal">}<sp/><sp/></highlight><highlight class="comment">//<sp/>namespace<sp/>forpy</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="118"><highlight class="normal"></highlight></codeline>
<codeline lineno="119"><highlight class="normal"><ref refid="inducedentropy_8h_1a2c98f9173b18ca7b638db85569ba6a8b" kindref="member">CEREAL_REGISTER_TYPE</ref>(<ref refid="classforpy_1_1_induced_entropy" kindref="compound">forpy::InducedEntropy</ref>);</highlight></codeline>
<codeline lineno="120"><highlight class="normal"></highlight><highlight class="comment">/*CEREAL_REGISTER_DYNAMIC_INIT(forpy::InducedEntropy);</highlight></codeline>
<codeline lineno="121"><highlight class="comment"><sp/><sp/>CEREAL_FORCE_DYNAMIC_INIT(forpy::InducedEntropy);*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/><sp/>//<sp/>FORPY_IMPURITIES_INDUCEDENTROPY_H_</highlight></codeline>
    </programlisting>
    <location file="/Users/classner/git/forpy/include/forpy/impurities/inducedentropy.h"/>
  </compounddef>
</doxygen>
