1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
3 | <title>mixpp: work/mixpp/bdm/itpp_ext.h Source File</title> |
---|
4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
5 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
6 | </head><body> |
---|
7 | <!-- Generated by Doxygen 1.5.3 --> |
---|
8 | <div class="tabs"> |
---|
9 | <ul> |
---|
10 | <li><a href="index.html"><span>Main Page</span></a></li> |
---|
11 | <li><a href="annotated.html"><span>Classes</span></a></li> |
---|
12 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
---|
13 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
14 | </ul> |
---|
15 | </div> |
---|
16 | <h1>work/mixpp/bdm/itpp_ext.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//</span> |
---|
17 | <a name="l00002"></a>00002 <span class="comment">// C++ Interface: itpp_ext</span> |
---|
18 | <a name="l00003"></a>00003 <span class="comment">//</span> |
---|
19 | <a name="l00004"></a>00004 <span class="comment">// Description: </span> |
---|
20 | <a name="l00005"></a>00005 <span class="comment">//</span> |
---|
21 | <a name="l00006"></a>00006 <span class="comment">//</span> |
---|
22 | <a name="l00007"></a>00007 <span class="comment">// Author: smidl <smidl@utia.cas.cz>, (C) 2008</span> |
---|
23 | <a name="l00008"></a>00008 <span class="comment">//</span> |
---|
24 | <a name="l00009"></a>00009 <span class="comment">// Copyright: See COPYING file that comes with this distribution</span> |
---|
25 | <a name="l00010"></a>00010 <span class="comment">//</span> |
---|
26 | <a name="l00011"></a>00011 <span class="comment">//</span> |
---|
27 | <a name="l00012"></a>00012 <span class="preprocessor">#include <itpp/itbase.h></span> |
---|
28 | <a name="l00013"></a>00013 |
---|
29 | <a name="l00014"></a>00014 <span class="keyword">using</span> std::cout; |
---|
30 | <a name="l00015"></a>00015 <span class="keyword">using</span> std::endl; |
---|
31 | <a name="l00016"></a>00016 |
---|
32 | <a name="l00017"></a>00017 <span class="keyword">namespace </span>itpp { |
---|
33 | <a name="l00018"></a>00018 Array<int> to_Arr(<span class="keyword">const</span> ivec &indices); |
---|
34 | <a name="l00019"></a>00019 |
---|
35 | <a name="l00024"></a><a class="code" href="classitpp_1_1Gamma__RNG.html">00024</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Gamma__RNG.html" title="Gamma distribution.">Gamma_RNG</a> { |
---|
36 | <a name="l00025"></a>00025 <span class="keyword">public</span>: |
---|
37 | <a name="l00027"></a>00027 <a class="code" href="classitpp_1_1Gamma__RNG.html#e132860f825f427d63652edd02c25b54" title="constructor. Set lambda.">Gamma_RNG</a>(<span class="keywordtype">double</span> a=1.0, <span class="keywordtype">double</span> b=1.0); |
---|
38 | <a name="l00029"></a><a class="code" href="classitpp_1_1Gamma__RNG.html#dfaae19411e39aa87e1f72e409b6babe">00029</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Gamma__RNG.html#dfaae19411e39aa87e1f72e409b6babe" title="Set lambda.">setup</a>(<span class="keywordtype">double</span> a0, <span class="keywordtype">double</span> b0) { alpha=a0; beta=b0;} |
---|
39 | <a name="l00031"></a>00031 <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1Gamma__RNG.html#8e666953249038f262cece2d3ed952d6" title="get lambda">get_setup</a>() <span class="keyword">const</span>; |
---|
40 | <a name="l00033"></a><a class="code" href="classitpp_1_1Gamma__RNG.html#98e2e65456bca33fca602b2bd607235e">00033</a> <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1Gamma__RNG.html#98e2e65456bca33fca602b2bd607235e" title="Get one sample.">operator()</a>() { <span class="keywordflow">return</span> sample(); } |
---|
41 | <a name="l00035"></a>00035 vec <a class="code" href="classitpp_1_1Gamma__RNG.html#98e2e65456bca33fca602b2bd607235e" title="Get one sample.">operator()</a>(<span class="keywordtype">int</span> n); |
---|
42 | <a name="l00037"></a>00037 mat <a class="code" href="classitpp_1_1Gamma__RNG.html#98e2e65456bca33fca602b2bd607235e" title="Get one sample.">operator()</a>(<span class="keywordtype">int</span> h, <span class="keywordtype">int</span> w); |
---|
43 | <a name="l00038"></a>00038 <span class="keyword">protected</span>: |
---|
44 | <a name="l00039"></a>00039 <span class="keyword">private</span>: |
---|
45 | <a name="l00041"></a>00041 <span class="keywordtype">double</span> sample(); |
---|
46 | <a name="l00043"></a>00043 <span class="keywordtype">double</span> alpha; |
---|
47 | <a name="l00045"></a>00045 <span class="keywordtype">double</span> beta; |
---|
48 | <a name="l00047"></a>00047 Random_Generator RNG; |
---|
49 | <a name="l00048"></a>00048 Normal_RNG NRNG; |
---|
50 | <a name="l00050"></a>00050 <span class="keyword">inline</span> <span class="keywordtype">double</span> exp_rand(){<span class="keywordflow">return</span> -std::log(RNG.random_01());} |
---|
51 | <a name="l00051"></a>00051 <span class="keyword">inline</span> <span class="keywordtype">double</span> unif_rand(){<span class="keywordflow">return</span> RNG.random_01();} |
---|
52 | <a name="l00052"></a>00052 <span class="keyword">inline</span> <span class="keywordtype">double</span> norm_rand(){<span class="keywordflow">return</span> NRNG.sample();} |
---|
53 | <a name="l00053"></a>00053 |
---|
54 | <a name="l00054"></a>00054 }; |
---|
55 | <a name="l00055"></a>00055 |
---|
56 | <a name="l00056"></a>00056 <span class="keywordtype">bool</span> qr(<span class="keyword">const</span> mat &A, mat &R); |
---|
57 | <a name="l00057"></a>00057 |
---|
58 | <a name="l00058"></a>00058 } |
---|
59 | </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Fri Apr 18 11:15:14 2008 for mixpp by |
---|
60 | <a href="http://www.doxygen.org/index.html"> |
---|
61 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> |
---|
62 | </body> |
---|
63 | </html> |
---|