<?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.5.6">
  <compounddef id="libDS_8cpp" kind="file">
    <compoundname>libDS.cpp</compoundname>
    <includes local="no">itpp/itbase.h</includes>
    <includes refid="libDS_8h" local="yes">libDS.h</includes>
    <incdepgraph>
      <node id="376">
        <label>libBM.h</label>
        <link refid="libBM_8h"/>
        <childnode refid="374" relation="include">
        </childnode>
      </node>
      <node id="373">
        <label>work/git/mixpp/bdm/stat/libDS.cpp</label>
        <link refid="libDS.cpp"/>
        <childnode refid="374" relation="include">
        </childnode>
        <childnode refid="375" relation="include">
        </childnode>
      </node>
      <node id="374">
        <label>itpp/itbase.h</label>
      </node>
      <node id="375">
        <label>libDS.h</label>
        <link refid="libDS_8h"/>
        <childnode refid="374" relation="include">
        </childnode>
        <childnode refid="376" relation="include">
        </childnode>
      </node>
    </incdepgraph>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&lt;itpp/itbase.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="libDS_8h" kindref="compound" tooltip="Common DataSources.">libDS.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight><highlight class="comment">//using<sp/>namespace<sp/>itpp;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight></codeline>
<codeline lineno="6" refid="classMemDS_123522b9e7dd0bb0c365cc9cde4c05449" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classMemDS_123522b9e7dd0bb0c365cc9cde4c05449" kindref="member" tooltip="Returns full vector of observed data.">MemDS::getdata</ref>(vec<sp/>&amp;dt){</highlight></codeline>
<codeline lineno="7"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="8"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="9"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug(dt.length()==rowid.length(),<sp/></highlight><highlight class="stringliteral">&quot;MemDS:getdata<sp/>incompatible<sp/>dt&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="10"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0;i&lt;rowid.length();i++){</highlight></codeline>
<codeline lineno="11"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dt(i)<sp/>=<sp/>Data(rowid(i),time-delays(i));</highlight></codeline>
<codeline lineno="12"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="13"><highlight class="normal">}</highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight></codeline>
<codeline lineno="15" refid="classMemDS_1900f1e1c9eb950f87e557c068628e60e" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classMemDS_123522b9e7dd0bb0c365cc9cde4c05449" kindref="member" tooltip="Returns full vector of observed data.">MemDS::getdata</ref>(vec<sp/>&amp;dt,ivec<sp/>&amp;indeces){</highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>j,i;</highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug(dt.length()==indeces.length(),<sp/></highlight><highlight class="stringliteral">&quot;MemDS:getdata<sp/>incompatible<sp/>dt&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0;i&lt;indeces.length();i++){</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>j<sp/>=<sp/>indeces<sp/>(i);</highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>dt(i)<sp/>=<sp/>Data(rowid(j),time-delays(j));</highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="22"><highlight class="normal">}</highlight></codeline>
<codeline lineno="23"><highlight class="normal"></highlight></codeline>
<codeline lineno="24" refid="classMemDS_121916feb3e5ff960855c09b06a0d279b" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classMemDS_121916feb3e5ff960855c09b06a0d279b" kindref="member" tooltip="Moves from  to , i.e. perfroms the actions and reads response of the system.">MemDS::step</ref>()<sp/>{</highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(time&lt;Data.cols())<sp/>{time++;}</highlight></codeline>
<codeline lineno="26"><highlight class="normal">}</highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight></codeline>
<codeline lineno="28" refid="classMemDS_15f72b555e0e4a61de1440c457cf57007" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="classMemDS_15f72b555e0e4a61de1440c457cf57007" kindref="member" tooltip="Method that assigns random variables to the datasource. Typically, the datasource...">MemDS::linkrvs</ref>(<ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>&amp;drv,<sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>&amp;urv)<sp/>{</highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug(drv.<ref refid="classRV_1f5c7b8bd589eef09ccdf3329a0addea0" kindref="member" tooltip="Return number of scalars in the RV.">count</ref>()==rowid.length(),</highlight><highlight class="stringliteral">&quot;MemDS::linkrvs<sp/>incompatible<sp/>drv&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug(urv.<ref refid="classRV_1f5c7b8bd589eef09ccdf3329a0addea0" kindref="member" tooltip="Return number of scalars in the RV.">count</ref>()==0,</highlight><highlight class="stringliteral">&quot;MemDS<sp/>does<sp/>not<sp/>support<sp/>urv.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classDS_11012025a1a3a1fdd24aa48698a3d3454" kindref="member" tooltip="Observed variables, returned by getdata().">Drv</ref><sp/>=<sp/>drv;</highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classDS_10a88ffaeb3c7c2cf30c69bc41a000629" kindref="member" tooltip="Action variables, accepted by write().">Urv</ref><sp/>=<sp/>urv;</highlight></codeline>
<codeline lineno="34"><highlight class="normal">}</highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight></codeline>
<codeline lineno="36" refid="classMemDS_184cfba80cb32d07be94690658175e9c4" refkind="member"><highlight class="normal"><ref refid="classMemDS_184cfba80cb32d07be94690658175e9c4" kindref="member" tooltip="Default constructor.">MemDS::MemDS</ref>(mat<sp/>&amp;Dat,<sp/>ivec<sp/>&amp;rowid,<sp/>ivec<sp/>&amp;delays){</highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug(max(rowid)&lt;=Dat.rows(),</highlight><highlight class="stringliteral">&quot;MemDS<sp/>rowid<sp/>is<sp/>too<sp/>high<sp/>for<sp/>given<sp/>Dat.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>it_assert_debug(max(delays)&lt;Dat.cols(),</highlight><highlight class="stringliteral">&quot;MemDS<sp/>delays<sp/>are<sp/>too<sp/>high.&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>time<sp/>=<sp/>max(delays);<sp/></highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Data<sp/>=<sp/>Dat;</highlight></codeline>
<codeline lineno="42"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="/home/smidl/work/git/mixpp/bdm/stat/libDS.cpp"/>
  </compounddef>
</doxygen>
