<?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="sumitpp_8cpp" kind="file">
    <compoundname>sumitpp.cpp</compoundname>
    <includes local="no">itpp/itcomm.h</includes>
    <includes local="no">itpp/itmex.h</includes>
    <includes local="no">../../bdm/estim/arx.h</includes>
    <incdepgraph>
      <node id="535">
        <label>work/git/mixpp/matlab/mex/sumitpp.cpp</label>
        <link refid="sumitpp.cpp"/>
        <childnode refid="536" relation="include">
        </childnode>
        <childnode refid="537" relation="include">
        </childnode>
        <childnode refid="538" relation="include">
        </childnode>
      </node>
      <node id="537">
        <label>itpp/itmex.h</label>
      </node>
      <node id="536">
        <label>itpp/itcomm.h</label>
      </node>
      <node id="538">
        <label>../../bdm/estim/arx.h</label>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="sumitpp_8cpp_182033299688d607730e08333ff7471f8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void mexFunction</definition>
        <argsstring>(int n_output, mxArray *output[], int n_input, const mxArray *input[])</argsstring>
        <name>mexFunction</name>
        <param>
          <type>int</type>
          <declname>n_output</declname>
        </param>
        <param>
          <type>mxArray *</type>
          <declname>output</declname>
          <array>[]</array>
        </param>
        <param>
          <type>int</type>
          <declname>n_input</declname>
        </param>
        <param>
          <type>const mxArray *</type>
          <declname>input</declname>
          <array>[]</array>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/matlab/mex/sumitpp.cpp" line="8" bodyfile="/home/smidl/work/git/mixpp/matlab/mex/sumitpp.cpp" bodystart="8" bodyend="28"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&lt;itpp/itcomm.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;itpp/itmex.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;../../bdm/estim/arx.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="keyword">using<sp/>namespace<sp/></highlight><highlight class="normal">itpp;</highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mexFunction<sp/>(<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>n_output,<sp/>mxArray<sp/>*output[],<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>n_input,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>mxArray<sp/>*input[]<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="9"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Check<sp/>the<sp/>number<sp/>of<sp/>inputs<sp/>and<sp/>output<sp/>arguments</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="10"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>n_output!=1<sp/>)<sp/>mexErrMsgTxt<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;Wrong<sp/>number<sp/>of<sp/>output<sp/>variables!&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="11"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>n_input!=1<sp/>)<sp/>mexErrMsgTxt<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;Wrong<sp/>number<sp/>of<sp/>input<sp/>variables!&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Convert<sp/>input<sp/>variables<sp/>to<sp/>IT++<sp/>format</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>Data<sp/>=<sp/>mxArray2mat<sp/>(<sp/>input[0]<sp/>);</highlight></codeline>
<codeline lineno="15"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>mn;</highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>------------------<sp/>Start<sp/>of<sp/>routine<sp/>---------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mn<sp/>=<sp/>sum(Data);</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>------------------<sp/>End<sp/>of<sp/>routine<sp/>-----------------------------</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="22"><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Create<sp/>output<sp/>vectors</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>output[0]<sp/>=<sp/>mxCreateDoubleMatrix<sp/>(<sp/>1,mn.length(),<sp/>mxREAL<sp/>);</highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Convert<sp/>the<sp/>IT++<sp/>format<sp/>to<sp/>Matlab<sp/>format<sp/>for<sp/>output</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec2mxArray<sp/>(<sp/>mn,<sp/>output[0]<sp/>);</highlight></codeline>
<codeline lineno="28"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="/home/smidl/work/git/mixpp/matlab/mex/sumitpp.cpp"/>
  </compounddef>
</doxygen>
