<?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="exponentials_8h" kind="file" language="C++">
    <compoundname>exponentials.h</compoundname>
    <includes local="no">cmath</includes>
    <includes refid="global_8h" local="yes">../global.h</includes>
    <includedby refid="shannonentropy_8h" local="yes">/Users/classner/git/forpy/include/forpy/impurities/shannonentropy.h</includedby>
    <includedby refid="inducedentropy_8h" local="yes">/Users/classner/git/forpy/include/forpy/impurities/inducedentropy.h</includedby>
    <includedby refid="classificationerror_8h" local="yes">/Users/classner/git/forpy/include/forpy/impurities/classificationerror.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="1274">
        <label>iomanip</label>
      </node>
      <node id="1273">
        <label>glog/logging.h</label>
      </node>
      <node id="1271">
        <label>cmath</label>
      </node>
      <node id="1278">
        <label>string</label>
      </node>
      <node id="1277">
        <label>./version.h</label>
        <link refid="version_8h"/>
      </node>
      <node id="1270">
        <label>/Users/classner/git/forpy/include/forpy/util/exponentials.h</label>
        <link refid="exponentials_8h"/>
        <childnode refid="1271" relation="include">
        </childnode>
        <childnode refid="1272" relation="include">
        </childnode>
      </node>
      <node id="1275">
        <label>iostream</label>
      </node>
      <node id="1272">
        <label>../global.h</label>
        <link refid="global_8h"/>
        <childnode refid="1273" relation="include">
        </childnode>
        <childnode refid="1274" relation="include">
        </childnode>
        <childnode refid="1275" relation="include">
        </childnode>
        <childnode refid="1276" relation="include">
        </childnode>
        <childnode refid="1277" relation="include">
        </childnode>
        <childnode refid="1278" relation="include">
        </childnode>
        <childnode refid="1279" relation="include">
        </childnode>
      </node>
      <node id="1279">
        <label>csignal</label>
      </node>
      <node id="1276">
        <label>thread</label>
      </node>
    </incdepgraph>
    <invincdepgraph>
      <node id="1286">
        <label>/Users/classner/git/forpy/include/forpy/impurities/renyientropy.h</label>
        <link refid="renyientropy_8h"/>
        <childnode refid="1287" relation="include">
        </childnode>
      </node>
      <node id="1288">
        <label>/Users/classner/git/forpy/include/forpy/gains/entropygain.h</label>
        <link refid="entropygain_8h"/>
        <childnode refid="1289" relation="include">
        </childnode>
      </node>
      <node id="1292">
        <label>/Users/classner/git/forpy/include/forpy/threshold_optimizers/classification_opt.h</label>
        <link refid="classification__opt_8h"/>
        <childnode refid="1282" relation="include">
        </childnode>
        <childnode refid="1285" relation="include">
        </childnode>
      </node>
      <node id="1293">
        <label>/Users/classner/git/forpy/include/forpy/impurities/classificationerror.h</label>
        <link refid="classificationerror_8h"/>
        <childnode refid="1287" relation="include">
        </childnode>
        <childnode refid="1286" relation="include">
        </childnode>
      </node>
      <node id="1284">
        <label>/Users/classner/git/forpy/include/forpy/forpy.h</label>
        <link refid="forpy_8h"/>
      </node>
      <node id="1289">
        <label>/Users/classner/git/forpy/include/forpy/gains/gains.h</label>
        <link refid="gains_8h"/>
        <childnode refid="1284" relation="include">
        </childnode>
      </node>
      <node id="1282">
        <label>/Users/classner/git/forpy/include/forpy/threshold_optimizers/fastclassopt.h</label>
        <link refid="fastclassopt_8h"/>
        <childnode refid="1283" relation="include">
        </childnode>
        <childnode refid="1285" relation="include">
        </childnode>
      </node>
      <node id="1285">
        <label>/Users/classner/git/forpy/include/forpy/threshold_optimizers/threshold_optimizers.h</label>
        <link refid="threshold__optimizers_8h"/>
        <childnode refid="1284" relation="include">
        </childnode>
      </node>
      <node id="1290">
        <label>/Users/classner/git/forpy/include/forpy/impurities/tsallisentropy.h</label>
        <link refid="tsallisentropy_8h"/>
        <childnode refid="1287" relation="include">
        </childnode>
      </node>
      <node id="1281">
        <label>/Users/classner/git/forpy/include/forpy/impurities/shannonentropy.h</label>
        <link refid="shannonentropy_8h"/>
        <childnode refid="1282" relation="include">
        </childnode>
        <childnode refid="1286" relation="include">
        </childnode>
        <childnode refid="1287" relation="include">
        </childnode>
        <childnode refid="1290" relation="include">
        </childnode>
      </node>
      <node id="1287">
        <label>/Users/classner/git/forpy/include/forpy/impurities/impurities.h</label>
        <link refid="impurities_8h"/>
        <childnode refid="1288" relation="include">
        </childnode>
        <childnode refid="1284" relation="include">
        </childnode>
      </node>
      <node id="1283">
        <label>/Users/classner/git/forpy/include/forpy/forest.h</label>
        <link refid="forest_8h"/>
        <childnode refid="1284" relation="include">
        </childnode>
      </node>
      <node id="1280">
        <label>/Users/classner/git/forpy/include/forpy/util/exponentials.h</label>
        <link refid="exponentials_8h"/>
        <childnode refid="1281" relation="include">
        </childnode>
        <childnode refid="1291" relation="include">
        </childnode>
        <childnode refid="1293" relation="include">
        </childnode>
        <childnode refid="1286" relation="include">
        </childnode>
        <childnode refid="1290" relation="include">
        </childnode>
      </node>
      <node id="1291">
        <label>/Users/classner/git/forpy/include/forpy/impurities/inducedentropy.h</label>
        <link refid="inducedentropy_8h"/>
        <childnode refid="1292" relation="include">
        </childnode>
        <childnode refid="1287" relation="include">
        </childnode>
        <childnode refid="1286" relation="include">
        </childnode>
        <childnode refid="1290" relation="include">
        </childnode>
      </node>
    </invincdepgraph>
    <innernamespace refid="namespaceforpy">forpy</innernamespace>
      <sectiondef kind="define">
      <memberdef kind="define" id="exponentials_8h_1ad2048e74530a7f48aef7079ff37251b9" prot="public" static="no">
        <name>FORPY_UTIL_EXPONENTIALS_H_</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/Users/classner/git/forpy/include/forpy/util/exponentials.h" line="4" column="9" bodyfile="/Users/classner/git/forpy/include/forpy/util/exponentials.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_EXPONENTIALS_H_</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4" refid="exponentials_8h_1ad2048e74530a7f48aef7079ff37251b9" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>FORPY_UTIL_EXPONENTIALS_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;cmath&gt;</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/>&quot;../global.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight></codeline>
<codeline lineno="10"><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="12" refid="namespaceforpy_1ade0b884e853c50a495b5aa0521ab5742" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1ade0b884e853c50a495b5aa0521ab5742" kindref="member">D_PI</ref><sp/>=<sp/>4.<sp/>*<sp/>atan(1.);</highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight></codeline>
<codeline lineno="16" refid="namespaceforpy_1aaaa8da20e2b1e58e4498723fa10faccb" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1aaaa8da20e2b1e58e4498723fa10faccb" kindref="member">TWO_PI</ref><sp/>=<sp/></highlight><highlight class="keyword">static_cast&lt;</highlight><highlight class="keywordtype">float</highlight><highlight class="keyword">&gt;</highlight><highlight class="normal">(2.<sp/>*<sp/><ref refid="namespaceforpy_1ade0b884e853c50a495b5aa0521ab5742" kindref="member">D_PI</ref>);</highlight></codeline>
<codeline lineno="17"><highlight class="normal"></highlight></codeline>
<codeline lineno="18"><highlight class="normal"></highlight><highlight class="preprocessor">#pragma<sp/>clang<sp/>diagnostic<sp/>push</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight><highlight class="preprocessor">#pragma<sp/>clang<sp/>diagnostic<sp/>ignored<sp/>&quot;-Wunused-variable&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"></highlight></codeline>
<codeline lineno="22" refid="namespaceforpy_1a1c4873cb7eda13dd992e0e6cbe14f9de" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1a1c4873cb7eda13dd992e0e6cbe14f9de" kindref="member">TWO_PI_E</ref><sp/>=<sp/><ref refid="namespaceforpy_1aaaa8da20e2b1e58e4498723fa10faccb" kindref="member">TWO_PI</ref><sp/>*<sp/>expf(1.f);</highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight><highlight class="preprocessor">#pragma<sp/>clang<sp/>diagnostic<sp/>pop</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight></codeline>
<codeline lineno="35" refid="namespaceforpy_1a6919e4bf37b76e4380db6cdede210fc8" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="namespaceforpy_1a6919e4bf37b76e4380db6cdede210fc8" kindref="member">ipow</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>base,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>exp)<sp/>{</highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>result<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(exp)<sp/>{</highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(exp<sp/>&amp;<sp/>1)</highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>result<sp/>*=<sp/>base;</highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>exp<sp/>&gt;&gt;=<sp/>1;</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>base<sp/>*=<sp/>base;</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight></codeline>
<codeline lineno="56" refid="namespaceforpy_1a1c0789b7bdd25c7469c20b29a84a77eb" 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="namespaceforpy_1a1c0789b7bdd25c7469c20b29a84a77eb" kindref="member">fpowi</ref>(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>base,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>exp)<sp/>{</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(exp)<sp/>{</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>0:</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1.f;</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>1:</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>base;</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>2:</highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>base<sp/>*<sp/>base;</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>3:</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>base<sp/>*<sp/>base<sp/>*<sp/>base;</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>4:</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>base<sp/>*<sp/>base<sp/>*<sp/>base<sp/>*<sp/>base;</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>5:</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>base<sp/>*<sp/>base<sp/>*<sp/>base<sp/>*<sp/>base<sp/>*<sp/>base;</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>This<sp/>version<sp/>is<sp/>already<sp/>a<sp/>lot<sp/>faster<sp/>than<sp/>fpow.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>result<sp/>=<sp/>1.f;</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(exp)<sp/>{</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(exp<sp/>&amp;<sp/>1)</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>result<sp/>*=<sp/>base;</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>exp<sp/>&gt;&gt;=<sp/>1;</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>base<sp/>*=<sp/>base;</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="82"><highlight class="normal">};<sp/><sp/></highlight><highlight class="comment">//<sp/>namespace<sp/>forpy</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/><sp/>//<sp/>FORPY_UTIL_EXPONENTIALS_H_</highlight></codeline>
    </programlisting>
    <location file="/Users/classner/git/forpy/include/forpy/util/exponentials.h"/>
  </compounddef>
</doxygen>
