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: itpp::I_Uniform_RNG Class Reference</title> |
---|
4 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
6 | </head><body> |
---|
7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
8 | <script type="text/javascript"> |
---|
9 | <!-- |
---|
10 | function changeDisplayState (e){ |
---|
11 | var num=this.id.replace(/[^[0-9]/g,''); |
---|
12 | var button=this.firstChild; |
---|
13 | var sectionDiv=document.getElementById('dynsection'+num); |
---|
14 | if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ |
---|
15 | sectionDiv.style.display='block'; |
---|
16 | button.src='open.gif'; |
---|
17 | }else{ |
---|
18 | sectionDiv.style.display='none'; |
---|
19 | button.src='closed.gif'; |
---|
20 | } |
---|
21 | } |
---|
22 | function initDynSections(){ |
---|
23 | var divs=document.getElementsByTagName('div'); |
---|
24 | var sectionCounter=1; |
---|
25 | for(var i=0;i<divs.length-1;i++){ |
---|
26 | if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ |
---|
27 | var header=divs[i]; |
---|
28 | var section=divs[i+1]; |
---|
29 | var button=header.firstChild; |
---|
30 | if (button!='IMG'){ |
---|
31 | divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); |
---|
32 | button=document.createElement('img'); |
---|
33 | divs[i].insertBefore(button,divs[i].firstChild); |
---|
34 | } |
---|
35 | header.style.cursor='pointer'; |
---|
36 | header.onclick=changeDisplayState; |
---|
37 | header.id='dynheader'+sectionCounter; |
---|
38 | button.src='closed.gif'; |
---|
39 | section.id='dynsection'+sectionCounter; |
---|
40 | section.style.display='none'; |
---|
41 | section.style.marginLeft='14px'; |
---|
42 | sectionCounter++; |
---|
43 | } |
---|
44 | } |
---|
45 | } |
---|
46 | window.onload = initDynSections; |
---|
47 | --> |
---|
48 | </script> |
---|
49 | <div class="navigation" id="top"> |
---|
50 | <div class="tabs"> |
---|
51 | <ul> |
---|
52 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
53 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
54 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
55 | <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
---|
56 | <li><a href="files.html"><span>Files</span></a></li> |
---|
57 | </ul> |
---|
58 | </div> |
---|
59 | <div class="tabs"> |
---|
60 | <ul> |
---|
61 | <li><a href="annotated.html"><span>Class List</span></a></li> |
---|
62 | <li><a href="classes.html"><span>Class Index</span></a></li> |
---|
63 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
64 | <li><a href="functions.html"><span>Class Members</span></a></li> |
---|
65 | </ul> |
---|
66 | </div> |
---|
67 | <div class="navpath"><b>itpp</b>::<a class="el" href="classitpp_1_1I__Uniform__RNG.html">I_Uniform_RNG</a> |
---|
68 | </div> |
---|
69 | </div> |
---|
70 | <div class="contents"> |
---|
71 | <h1>itpp::I_Uniform_RNG Class Reference<br> |
---|
72 | <small> |
---|
73 | [<a class="el" href="group__randgen.html">Random Number Generation</a>]</small> |
---|
74 | </h1><!-- doxytag: class="itpp::I_Uniform_RNG" -->Integer uniform distribution<p> |
---|
75 | Example: Generation of random uniformly distributed integers in the interval [0,10]. |
---|
76 | <a href="#_details">More...</a> |
---|
77 | <p> |
---|
78 | <code>#include <<a class="el" href="random_8h-source.html">random.h</a>></code> |
---|
79 | <p> |
---|
80 | |
---|
81 | <p> |
---|
82 | <a href="classitpp_1_1I__Uniform__RNG-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
---|
83 | <tr><td></td></tr> |
---|
84 | <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
---|
85 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9e27914cf212a099adf42ba2c4878e04"></a><!-- doxytag: member="itpp::I_Uniform_RNG::I_Uniform_RNG" ref="9e27914cf212a099adf42ba2c4878e04" args="(int min=0, int max=1)" --> |
---|
86 | </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1I__Uniform__RNG.html#9e27914cf212a099adf42ba2c4878e04">I_Uniform_RNG</a> (int min=0, int max=1)</td></tr> |
---|
87 | |
---|
88 | <tr><td class="mdescLeft"> </td><td class="mdescRight">constructor. Sets min and max values. <br></td></tr> |
---|
89 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="319282f08bbeb7e254565455e256b6aa"></a><!-- doxytag: member="itpp::I_Uniform_RNG::setup" ref="319282f08bbeb7e254565455e256b6aa" args="(int min, int max)" --> |
---|
90 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1I__Uniform__RNG.html#319282f08bbeb7e254565455e256b6aa">setup</a> (int min, int max)</td></tr> |
---|
91 | |
---|
92 | <tr><td class="mdescLeft"> </td><td class="mdescRight">set min and max values <br></td></tr> |
---|
93 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="394af0535af0c407e3d9b98d2bbce87b"></a><!-- doxytag: member="itpp::I_Uniform_RNG::get_setup" ref="394af0535af0c407e3d9b98d2bbce87b" args="(int &min, int &max) const " --> |
---|
94 | void </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1I__Uniform__RNG.html#394af0535af0c407e3d9b98d2bbce87b">get_setup</a> (int &min, int &max) const </td></tr> |
---|
95 | |
---|
96 | <tr><td class="mdescLeft"> </td><td class="mdescRight">get the parameters <br></td></tr> |
---|
97 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eb2a8e24ae009fcad5a41d5855589649"></a><!-- doxytag: member="itpp::I_Uniform_RNG::operator()" ref="eb2a8e24ae009fcad5a41d5855589649" args="()" --> |
---|
98 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1I__Uniform__RNG.html#eb2a8e24ae009fcad5a41d5855589649">operator()</a> ()</td></tr> |
---|
99 | |
---|
100 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get one sample. <br></td></tr> |
---|
101 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="80f62d9c942b9e4fceba196b9e7f1aed"></a><!-- doxytag: member="itpp::I_Uniform_RNG::operator()" ref="80f62d9c942b9e4fceba196b9e7f1aed" args="(int n)" --> |
---|
102 | ivec </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1I__Uniform__RNG.html#80f62d9c942b9e4fceba196b9e7f1aed">operator()</a> (int n)</td></tr> |
---|
103 | |
---|
104 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get a sample vector. <br></td></tr> |
---|
105 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0d68d510a4d4492cc885c0dcad2be95"></a><!-- doxytag: member="itpp::I_Uniform_RNG::operator()" ref="a0d68d510a4d4492cc885c0dcad2be95" args="(int h, int w)" --> |
---|
106 | imat </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1I__Uniform__RNG.html#a0d68d510a4d4492cc885c0dcad2be95">operator()</a> (int h, int w)</td></tr> |
---|
107 | |
---|
108 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get a sample matrix. <br></td></tr> |
---|
109 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d75b0138f1e18d45575754f8e9b74b2d"></a><!-- doxytag: member="itpp::I_Uniform_RNG::sample" ref="d75b0138f1e18d45575754f8e9b74b2d" args="()" --> |
---|
110 | int </td><td class="memItemRight" valign="bottom"><a class="el" href="classitpp_1_1I__Uniform__RNG.html#d75b0138f1e18d45575754f8e9b74b2d">sample</a> ()</td></tr> |
---|
111 | |
---|
112 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Return a single value from this random generator. <br></td></tr> |
---|
113 | </table> |
---|
114 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
115 | Integer uniform distribution<p> |
---|
116 | Example: Generation of random uniformly distributed integers in the interval [0,10]. |
---|
117 | <p> |
---|
118 | <div class="fragment"><pre class="fragment"><span class="preprocessor"> #include "itpp/sigproc.h"</span> |
---|
119 | |
---|
120 | <span class="keywordtype">int</span> main() { |
---|
121 | |
---|
122 | <a class="code" href="classitpp_1_1I__Uniform__RNG.html#9e27914cf212a099adf42ba2c4878e04" title="constructor. Sets min and max values.">I_Uniform_RNG</a> gen(0, 10); |
---|
123 | |
---|
124 | cout << gen() << endl; <span class="comment">// prints a random integer</span> |
---|
125 | cout << gen(10) << endl; <span class="comment">// prints 10 random integers</span> |
---|
126 | } |
---|
127 | </pre></div> <hr>The documentation for this class was generated from the following files:<ul> |
---|
128 | <li><a class="el" href="random_8h-source.html">random.h</a><li><a class="el" href="random_8cpp.html">random.cpp</a></ul> |
---|
129 | </div> |
---|
130 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:19 2009 for mixpp by |
---|
131 | <a href="http://www.doxygen.org/index.html"> |
---|
132 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
133 | </body> |
---|
134 | </html> |
---|