Changeset 5

Show
Ignore:
Timestamp:
01/18/08 18:43:51 (17 years ago)
Author:
smidl
Message:

RV

Files:
17 modified

Legend:

Unmodified
Added
Removed
  • Makefile

    r3 r5  
    1010        rm *.o test0 
    1111 
    12 test0: test0.cpp libBM.o libDC.o 
     12test0: test0.cpp libBM.o libDC.o itpp_ext.o 
    1313 
  • doc/html/annotated.html

    r4 r5  
    2626  <tr><td class="indexkey"><a class="el" href="classRV.html">RV</a></td><td class="indexvalue">Class representing variables, most often random variables </td></tr> 
    2727</table> 
    28 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 17 18:00:29 2008 for mixpp by&nbsp; 
     28<hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 18 09:57:40 2008 for mixpp by&nbsp; 
    2929<a href="http://www.doxygen.org/index.html"> 
    3030<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> 
  • doc/html/classfnc-members.html

    r4 r5  
    2020</div> 
    2121<h1>fnc Member List</h1>This is the complete list of members for <a class="el" href="classfnc.html">fnc</a>, including all inherited members.<p><table> 
    22 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 17 18:00:29 2008 for mixpp by&nbsp; 
     22</table><hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 18 09:57:40 2008 for mixpp by&nbsp; 
    2323<a href="http://www.doxygen.org/index.html"> 
    2424<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> 
  • doc/html/classfnc.html

    r4 r5  
    3232Class representing function of variables. <hr>The documentation for this class was generated from the following file:<ul> 
    3333<li>work/mixpp/<a class="el" href="libBM_8h-source.html">libBM.h</a></ul> 
    34 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 17 18:00:29 2008 for mixpp by&nbsp; 
     34<hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 18 09:57:40 2008 for mixpp by&nbsp; 
    3535<a href="http://www.doxygen.org/index.html"> 
    3636<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> 
  • doc/html/files.html

    r4 r5  
    1717  <tr><td class="indexkey">work/mixpp/<a class="el" href="libDC_8cpp.html">libDC.cpp</a></td><td class="indexvalue">Matrices in decomposed forms (LDL', LU, UDU', etc) </td></tr> 
    1818</table> 
    19 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 17 18:00:29 2008 for mixpp by&nbsp; 
     19<hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 18 09:57:40 2008 for mixpp by&nbsp; 
    2020<a href="http://www.doxygen.org/index.html"> 
    2121<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> 
  • doc/html/index.html

    r4 r5  
    1515<h1>mixpp Documentation</h1> 
    1616<p> 
    17 <h3 align="center">1 </h3><hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 17 18:00:29 2008 for mixpp by&nbsp; 
     17<h3 align="center">1 </h3><hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 18 09:57:40 2008 for mixpp by&nbsp; 
    1818<a href="http://www.doxygen.org/index.html"> 
    1919<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> 
  • doc/html/libBM_8h-source.html

    r4 r5  
    2222<a name="l00019"></a>00019 <span class="keyword">using namespace </span>itpp; 
    2323<a name="l00020"></a>00020  
    24 <a name="l00022"></a><a class="code" href="classRV.html">00022</a> <span class="keyword">class </span><a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> { 
    25 <a name="l00023"></a>00023 <span class="keywordtype">int</span> len; 
    26 <a name="l00024"></a>00024 ivec ids; 
    27 <a name="l00025"></a>00025 ivec sizes; 
    28 <a name="l00026"></a>00026 ivec times; 
    29 <a name="l00027"></a>00027 ivec obs; 
    30 <a name="l00028"></a>00028 Array&lt;std::string&gt; names; 
    31 <a name="l00029"></a>00029  
    32 <a name="l00030"></a>00030 <span class="keyword">public</span>: 
    33 <a name="l00032"></a>00032  <a class="code" href="classRV.html#e46882dec2c30b12be282d34b03417b2" title="Full constructor which is called by the others.">RV</a>(ivec in_ids, Array&lt;std::string&gt; in_names, ivec in_sizes, ivec in_times, ivec in_obs); 
    34 <a name="l00034"></a>00034  <a class="code" href="classRV.html#e46882dec2c30b12be282d34b03417b2" title="Full constructor which is called by the others.">RV</a>(ivec ids); 
    35 <a name="l00035"></a>00035  <span class="keyword">friend</span> std::ostream &amp;operator&lt;&lt;(std::ostream &amp;os, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv); 
    36 <a name="l00036"></a>00036 }; 
    37 <a name="l00037"></a>00037  
    38 <a name="l00038"></a>00038  
    39 <a name="l00039"></a>00039  
    40 <a name="l00040"></a>00040  
    41 <a name="l00042"></a><a class="code" href="classfnc.html">00042</a> <span class="keyword">class </span><a class="code" href="classfnc.html" title="Class representing function of variables.">fnc</a> { 
    42 <a name="l00043"></a>00043 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv; 
    43 <a name="l00044"></a>00044 }; 
     24<a name="l00026"></a><a class="code" href="classRV.html">00026</a> <span class="keyword">class </span><a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> 
     25<a name="l00027"></a>00027 { 
     26<a name="l00028"></a>00028                 <span class="keywordtype">int</span> len; 
     27<a name="l00029"></a>00029                 ivec ids; 
     28<a name="l00030"></a>00030                 ivec sizes; 
     29<a name="l00031"></a>00031                 ivec times; 
     30<a name="l00032"></a>00032                 ivec obs; 
     31<a name="l00033"></a>00033                 Array&lt;std::string&gt; names; 
     32<a name="l00034"></a>00034  
     33<a name="l00035"></a>00035         <span class="keyword">public</span>: 
     34<a name="l00037"></a>00037                 <a class="code" href="classRV.html#e46882dec2c30b12be282d34b03417b2" title="Full constructor which is called by the others.">RV</a> ( ivec in_ids, Array&lt;std::string&gt; in_names, ivec in_sizes, ivec in_times, ivec in_obs ); 
     35<a name="l00039"></a>00039                 <a class="code" href="classRV.html#e46882dec2c30b12be282d34b03417b2" title="Full constructor which is called by the others.">RV</a> ( ivec ids ); 
     36<a name="l00040"></a>00040                 <span class="keyword">friend</span> std::ostream &amp;operator&lt;&lt; ( std::ostream &amp;os, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rv ); 
     37<a name="l00041"></a>00041 }; 
     38<a name="l00042"></a>00042  
     39<a name="l00043"></a>00043  
     40<a name="l00044"></a>00044  
    4441<a name="l00045"></a>00045  
    45 <a name="l00047"></a><a class="code" href="classBM.html">00047</a> <span class="keyword">class </span><a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> { 
    46 <a name="l00048"></a>00048 <span class="keyword">public</span>: 
    47 <a name="l00050"></a>00050 <span class="keywordtype">void</span> <a class="code" href="classBM.html#c1b46da4abb4302ed57858558c90d641" title="Incremental Bayes rule.">bayes</a>(vec dt); 
    48 <a name="l00052"></a>00052 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBM.html#c1b46da4abb4302ed57858558c90d641" title="Incremental Bayes rule.">bayes</a>(mat Dt); 
    49 <a name="l00053"></a>00053 }; 
    50 <a name="l00054"></a>00054  
    51 <a name="l00056"></a><a class="code" href="classepdf.html">00056</a> <span class="keyword">class </span><a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> { 
    52 <a name="l00057"></a>00057 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv; 
    53 <a name="l00058"></a>00058 <span class="keyword">public</span>: 
    54 <a name="l00060"></a>00060 <span class="keyword">virtual</span> vec <a class="code" href="classepdf.html#545555f9d561555603911f7d3989611f" title="Returns the required moment of the epdf.">moment</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> order = 1); 
    55 <a name="l00061"></a>00061 }; 
    56 <a name="l00062"></a>00062  
    57 <a name="l00064"></a><a class="code" href="classmpdf.html">00064</a> <span class="keyword">class </span><a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> { 
    58 <a name="l00066"></a>00066 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv; 
    59 <a name="l00068"></a>00068 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvc; 
    60 <a name="l00069"></a>00069 <span class="keyword">public</span>: 
     42<a name="l00047"></a><a class="code" href="classfnc.html">00047</a> <span class="keyword">class </span><a class="code" href="classfnc.html" title="Class representing function of variables.">fnc</a> 
     43<a name="l00048"></a>00048 { 
     44<a name="l00049"></a>00049                 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv; 
     45<a name="l00050"></a>00050 }; 
     46<a name="l00051"></a>00051  
     47<a name="l00053"></a><a class="code" href="classBM.html">00053</a> <span class="keyword">class </span><a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> 
     48<a name="l00054"></a>00054 { 
     49<a name="l00055"></a>00055         <span class="keyword">public</span>: 
     50<a name="l00057"></a>00057                 <span class="keywordtype">void</span> <a class="code" href="classBM.html#c1b46da4abb4302ed57858558c90d641" title="Incremental Bayes rule.">bayes</a> ( vec dt ); 
     51<a name="l00059"></a>00059                 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBM.html#c1b46da4abb4302ed57858558c90d641" title="Incremental Bayes rule.">bayes</a> ( mat Dt ); 
     52<a name="l00060"></a>00060 }; 
     53<a name="l00061"></a>00061  
     54<a name="l00063"></a><a class="code" href="classepdf.html">00063</a> <span class="keyword">class </span><a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> 
     55<a name="l00064"></a>00064 { 
     56<a name="l00065"></a>00065                 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv; 
     57<a name="l00066"></a>00066         <span class="keyword">public</span>: 
     58<a name="l00068"></a>00068                 <span class="keyword">virtual</span> vec <a class="code" href="classepdf.html#545555f9d561555603911f7d3989611f" title="Returns the required moment of the epdf.">moment</a> ( <span class="keyword">const</span> <span class="keywordtype">int</span> order = 1 ); 
     59<a name="l00069"></a>00069 }; 
    6160<a name="l00070"></a>00070  
    62 <a name="l00072"></a>00072 <span class="keyword">virtual</span> <a class="code" href="classfnc.html" title="Class representing function of variables.">fnc</a> <a class="code" href="classmpdf.html#0863640c439869e8fbbbeb2bd8ea1fc0" title="Returns the required moment of the epdf.">moment</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> order = 1); 
    63 <a name="l00073"></a>00073 }; 
    64 <a name="l00074"></a>00074  
    65 <a name="l00075"></a>00075 <span class="preprocessor">#endif // BM_H</span> 
    66 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 17 18:00:29 2008 for mixpp by&nbsp; 
     61<a name="l00072"></a><a class="code" href="classmpdf.html">00072</a> <span class="keyword">class </span><a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> 
     62<a name="l00073"></a>00073 { 
     63<a name="l00075"></a>00075                 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv; 
     64<a name="l00077"></a>00077                 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvc; 
     65<a name="l00078"></a>00078         <span class="keyword">public</span>: 
     66<a name="l00079"></a>00079  
     67<a name="l00081"></a>00081                 <span class="keyword">virtual</span> <a class="code" href="classfnc.html" title="Class representing function of variables.">fnc</a> <a class="code" href="classmpdf.html#0863640c439869e8fbbbeb2bd8ea1fc0" title="Returns the required moment of the epdf.">moment</a> ( <span class="keyword">const</span> <span class="keywordtype">int</span> order = 1 ); 
     68<a name="l00082"></a>00082 }; 
     69<a name="l00083"></a>00083  
     70<a name="l00084"></a>00084 <span class="preprocessor">#endif // BM_H</span> 
     71</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 18 09:57:40 2008 for mixpp by&nbsp; 
    6772<a href="http://www.doxygen.org/index.html"> 
    6873<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> 
  • doc/html/libBM_8h.html

    r4 r5  
    4242<dl class="author" compact><dt><b>Author:</b></dt><dd>Vaclav Smidl.</dd></dl> 
    4343----------------------------------- BDM++ - C++ library for Bayesian Decision Making under Uncertainty<p> 
    44 Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 17 18:00:29 2008 for mixpp by&nbsp; 
     44Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 18 09:57:40 2008 for mixpp by&nbsp; 
    4545<a href="http://www.doxygen.org/index.html"> 
    4646<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> 
  • doc/html/libDC_8cpp.html

    r4 r5  
    2727<dl class="author" compact><dt><b>Author:</b></dt><dd>Vaclav Smidl.</dd></dl> 
    2828----------------------------------- BDM++ - C++ library for Bayesian Decision Making under Uncertainty<p> 
    29 Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 17 18:00:29 2008 for mixpp by&nbsp; 
     29Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Fri Jan 18 09:57:40 2008 for mixpp by&nbsp; 
    3030<a href="http://www.doxygen.org/index.html"> 
    3131<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> 
  • doc/latex/doxygen.sty

    r4 r5  
    1111\rhead[\fancyplain{}{\bfseries\leftmark}] 
    1212        {\fancyplain{}{\bfseries\thepage}} 
    13 \rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Thu Jan 17 18:00:29 2008 for mixpp by Doxygen }]{} 
    14 \lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Thu Jan 17 18:00:29 2008 for mixpp by Doxygen }} 
     13\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Fri Jan 18 09:57:40 2008 for mixpp by Doxygen }]{} 
     14\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Fri Jan 18 09:57:40 2008 for mixpp by Doxygen }} 
    1515\cfoot{} 
    1616\newenvironment{Code} 
  • doc/latex/refman.tex

    r4 r5  
    2121{\large Generated by Doxygen 1.5.3}\\ 
    2222\vspace*{0.5cm} 
    23 {\small Thu Jan 17 18:00:29 2008}\\ 
     23{\small Fri Jan 18 09:57:40 2008}\\ 
    2424\end{center} 
    2525\end{titlepage} 
  • libBM.cpp

    r2 r5  
    11#include <itpp/itbase.h> 
    22#include "libBM.h" 
     3#include "itpp_ext.h" 
    34 
    45using namespace itpp; 
    56 
     7using std::cout; 
    68 
    7 RV::RV(ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs) { 
    8 //TODO: check consistency! 
    9 // All vetors should be of same length 
    10 ids = in_ids; 
    11 names = in_names; 
    12 sizes = in_sizes; 
    13 times = in_times; 
    14 obs = in_obs; 
     9void RV::init( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs ) { 
     10        // 
     11        len = in_ids.length(); 
     12        //PRUDENT_MODE 
     13        // All vetors should be of same length 
     14        if (     ( len != in_ids.length() ) || \ 
     15                ( len != in_names.length() ) || \ 
     16                ( len != in_sizes.length() ) || \ 
     17                ( len != in_times.length() ) || \ 
     18                ( len != in_obs.length() ) ) { 
     19                it_error( "RV::RV inconsistent length of input vectors." ); 
     20        } 
     21 
     22        ids = in_ids; 
     23        names = in_names; 
     24        sizes = in_sizes; 
     25        times = in_times; 
     26        obs = in_obs; 
    1527}; 
    1628 
    17 std::ostream &operator<<(std::ostream &os, const RV &rv) { 
     29RV::RV ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs ) { 
     30        init ( in_ids, in_names, in_sizes, in_times, in_obs ); 
     31} 
    1832 
    19 os << rv.names(0) << rv.names(1) << "(" << rv.ids(0) << ")"; 
     33RV::RV ( ivec in_ids ) { 
     34         
     35        len = in_ids.length(); 
     36        Array<std::string> A( len ); 
     37        std::string rvstr = "rv"; 
    2038 
    21 return os; 
     39        for ( int i = 0; i < len;i++ ) { 
     40                A( i ) = rvstr + to_str(i); 
     41        } 
     42 
     43        init ( in_ids, A, ones_i( len ), zeros_i( len ), zeros_i( len ) ); 
    2244} 
     45 
     46RV RV::rvsubselect(ivec ind){ 
     47        return RV(ids(ind), names(to_Arr(ind)), sizes(ind), times(ind), obs(ind)); 
     48} 
     49 
     50RV RV::operator()(ivec ind){ 
     51        return RV(ids(ind), names(to_Arr(ind)), sizes(ind), times(ind), obs(ind)); 
     52} 
     53 
     54std::ostream &operator<<( std::ostream &os, const RV &rv ) { 
     55 
     56        for ( int i = 0; i < rv.len ;i++ ) { 
     57                os << rv.ids( i ) << "(" << rv.sizes( i ) << ")" <<  // id(size)= 
     58                "=" << rv.names( i )  << "_{"  << rv.times( i ) << "}; "; //name_{time} 
     59        } 
     60        return os; 
     61} 
     62 
  • libBM.h

    r4 r5  
    11/*! 
    2  * \file 
    3  * \brief Bayesian Models (bm) that use Bayes rule to learn from observations 
    4  * \author Vaclav Smidl. 
    5  * 
    6  * ----------------------------------- 
    7  * BDM++ - C++ library for Bayesian Decision Making under Uncertainty 
    8  * 
    9  * Using IT++ for numerical operations 
    10  * ----------------------------------- 
    11  */ 
     2  \file 
     3  \brief Bayesian Models (bm) that use Bayes rule to learn from observations 
     4  \author Vaclav Smidl. 
     5 
     6  ----------------------------------- 
     7  BDM++ - C++ library for Bayesian Decision Making under Uncertainty 
     8 
     9  Using IT++ for numerical operations 
     10  ----------------------------------- 
     11*/ 
    1212 
    1313#ifndef BM_H 
     
    1919using namespace itpp; 
    2020 
    21 //! Class representing variables, most often random variables 
     21/*! 
     22* \brief Class representing variables, most often random variables 
     23 
     24* More?... 
     25*/ 
    2226class RV { 
    23 int len; 
    24 ivec ids; 
    25 ivec sizes; 
    26 ivec times; 
    27 ivec obs; 
    28 Array<std::string> names; 
     27        int len; 
     28        ivec ids; 
     29        ivec sizes; 
     30        ivec times; 
     31        ivec obs; 
     32        Array<std::string> names; 
    2933 
     34private: 
     35        void init ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs ); 
    3036public: 
    31  //! Full constructor which is called by the others 
    32  RV(ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs); 
    33  //! default constructor  
    34  RV(ivec ids); 
    35  friend std::ostream &operator<<(std::ostream &os, const RV &rv); 
     37        //! Full constructor which is called by the others 
     38        RV ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs ); 
     39        //! default constructor 
     40        RV ( ivec ids ); 
     41        //! Printing output e.g. for debugging. 
     42        friend std::ostream &operator<< ( std::ostream &os, const RV &rv ); 
     43 
     44        //! Find indexes of another rv in self 
     45        ivec rvfind(RV rv2); 
     46        //! Add (concat) another variable to the current one 
     47        RV rvadd(RV rv2); 
     48        //! Subtract  another variable from the current one 
     49        RV rvsubt(RV rv2); 
     50        //! Select only variables at indeces ind 
     51        RV rvsubselect(ivec ind); 
     52        //! Select only variables at indeces ind 
     53        RV operator()(ivec ind); 
    3654}; 
    3755 
     
    4159//! Class representing function of variables 
    4260class fnc { 
    43 RV rv; 
     61        RV rv; 
    4462}; 
    4563 
     
    4765class BM { 
    4866public: 
    49 //! Incremental Bayes rule 
    50 void bayes(vec dt); 
    51 //! Batch Bayes rule (columns of Dt are observations) 
    52 virtual void bayes(mat Dt); 
     67        //! Incremental Bayes rule 
     68        void bayes ( vec dt ); 
     69        //! Batch Bayes rule (columns of Dt are observations) 
     70        virtual void bayes ( mat Dt ); 
    5371}; 
    5472 
    5573//! Probability density function with numerical statistics, e.g. posterior density. 
    5674class epdf { 
    57 RV rv; 
     75        RV rv; 
    5876public: 
    59 //! Returns the required moment of the epdf 
    60 virtual vec moment(const int order = 1); 
     77        //! Returns the required moment of the epdf 
     78        virtual vec moment ( const int order = 1 ); 
    6179}; 
    6280 
    63 //! Conditional probability density, e.g. modeling some dependencies.  
     81//! Conditional probability density, e.g. modeling some dependencies. 
    6482class mpdf { 
    65 //! modeled random variable 
    66 RV rv; 
    67 //! random variable in condition 
    68 RV rvc; 
     83        //! modeled random variable 
     84        RV rv; 
     85        //! random variable in condition 
     86        RV rvc; 
    6987public: 
    7088 
    71 //! Returns the required moment of the epdf 
    72 virtual fnc moment(const int order = 1); 
     89        //! Returns the required moment of the epdf 
     90        virtual fnc moment ( const int order = 1 ); 
    7391}; 
    7492 
  • libDC.cpp

    r2 r5  
    1717class LD 
    1818{ 
    19 public: 
     19        public: 
    2020 
    21   /** 
    22   * Perfroms a dyadic update $V = V + w v v'$ 
    23   * @param  v Vector forming the dyad to be added 
    24   * @param  w weight of the updating dysad 
    25   */ 
    26   void ldupdt (vec v, double w = 1.0 ); 
     21                /** 
     22                * Perfroms a dyadic update $V = V + w v v'$ 
     23                * @param  v Vector forming the dyad to be added 
     24                * @param  w weight of the updating dysad 
     25                */ 
     26                void ldupdt ( vec v, double w = 1.0 ); 
    2727 
    28    //! Construct by copy of L and D. 
    29    LD(mat L, vec D); 
    30    //! Construct by decomposition of full matrix V. 
    31    LD(mat V); 
     28                //! Construct by copy of L and D. 
     29                LD ( mat L, vec D ); 
     30                //! Construct by decomposition of full matrix V. 
     31                LD ( mat V ); 
    3232 
    33 protected: 
    34   vec D; 
    35   mat L; 
     33        protected: 
     34                vec D; 
     35                mat L; 
    3636 
    3737}; 
    3838 
    39 LD::LD(const mat exL, const vec exD) { 
    40  D = exD; 
    41  L = exL; 
     39LD::LD ( const mat exL, const vec exD ) 
     40{ 
     41        D = exD; 
     42        L = exL; 
    4243} 
    4344 
    44 LD::LD(const mat V) { 
    45  ; //not implemneted yet 
     45LD::LD ( const mat V ) 
     46{ 
     47        ; //not implemneted yet 
    4648} 
    4749 
    48 void LD::ldupdt(vec v, double w ) { 
    49 printf("not implemented"); //TODO: VS 
     50void LD::ldupdt ( vec v, double w ) 
     51{ 
     52        printf ( "not implemented" ); //TODO: VS 
    5053} 
  • mixpp.kdevelop

    r3 r5  
    195195      <orientation>Vertical</orientation> 
    196196    </splitheadersource> 
     197    <references/> 
    197198  </kdevcppsupport> 
    198199  <cppsupportpart> 
     
    204205  <kdevdocumentation> 
    205206    <projectdoc> 
    206       <docsystem></docsystem> 
    207       <docurl></docurl> 
    208       <usermanualurl></usermanualurl> 
     207      <docsystem/> 
     208      <docurl/> 
     209      <usermanualurl/> 
    209210    </projectdoc> 
    210211  </kdevdocumentation> 
     212  <kdevfileview> 
     213    <groups> 
     214      <hidenonprojectfiles>false</hidenonprojectfiles> 
     215      <hidenonlocation>false</hidenonlocation> 
     216    </groups> 
     217    <tree> 
     218      <hidepatterns>*.o,*.lo,CVS</hidepatterns> 
     219      <hidenonprojectfiles>false</hidenonprojectfiles> 
     220    </tree> 
     221  </kdevfileview> 
    211222</kdevelop> 
  • mixpp.kdevelop.filelist

    r4 r5  
    44doc/latex 
    55doc/latex/Makefile 
     6itpp_ext.cpp 
     7itpp_ext.h 
    68libBM.cpp 
    79libBM.h 
  • test0.cpp

    r2 r5  
    1111{ 
    1212 
    13   RV th = RV("1 2","{a b }","1 1","0 0","0 0"); 
     13        RV th = RV ( "1 2","{a b }","1 1","0 0","0 0" ); 
     14        RV r = RV("3 4"); 
     15        int i =0; 
    1416 
    15   cout << th << th << endl; 
     17        cout << th << r << th(ivec(&1,1)) << endl; 
    1618 
    17   //Exit program: 
    18   return 0; 
     19        //Exit program: 
     20        return 0; 
    1921 
    2022}