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: source.h Source File</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><a href="annotated.html"><span>Classes</span></a></li> |
---|
56 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
---|
57 | </ul> |
---|
58 | </div> |
---|
59 | <div class="tabs"> |
---|
60 | <ul> |
---|
61 | <li><a href="files.html"><span>File List</span></a></li> |
---|
62 | <li><a href="globals.html"><span>File Members</span></a></li> |
---|
63 | </ul> |
---|
64 | </div> |
---|
65 | <h1>source.h</h1><a href="source_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 |
---|
66 | <a name="l00029"></a>00029 <span class="preprocessor">#ifndef SOURCE_H</span> |
---|
67 | <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define SOURCE_H</span> |
---|
68 | <a name="l00031"></a>00031 <span class="preprocessor"></span> |
---|
69 | <a name="l00032"></a>00032 <span class="preprocessor">#include <<a class="code" href="vec_8h.html" title="Templated Vector Class Definitions.">itpp/base/vec.h</a>></span> |
---|
70 | <a name="l00033"></a>00033 |
---|
71 | <a name="l00034"></a>00034 |
---|
72 | <a name="l00035"></a>00035 <span class="keyword">namespace </span>itpp |
---|
73 | <a name="l00036"></a>00036 { |
---|
74 | <a name="l00037"></a>00037 |
---|
75 | <a name="l00039"></a>00039 |
---|
76 | <a name="l00044"></a><a class="code" href="classitpp_1_1Sine__Source.html">00044</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Sine__Source.html" title="Sine-wave source.">Sine_Source</a> |
---|
77 | <a name="l00045"></a>00045 { |
---|
78 | <a name="l00046"></a>00046 <span class="keyword">public</span>: |
---|
79 | <a name="l00048"></a>00048 <a class="code" href="classitpp_1_1Sine__Source.html#9ee9f270b676d451c595b15fcd4c3c15" title="Constructor. Set frequency, mean, amplitude, and start phase.">Sine_Source</a>(<span class="keywordtype">double</span> freq, <span class="keywordtype">double</span> <a class="code" href="group__statistics.html#gc370b4cfdc6baa037b7442ae6e2c4b5c" title="The mean value.">mean</a> = 0.0, <span class="keywordtype">double</span> ampl = 1.0, <span class="keywordtype">double</span> inphase = 0.0); |
---|
80 | <a name="l00050"></a><a class="code" href="classitpp_1_1Sine__Source.html#b75c7a00e7185b92e985ed36291cbbd0">00050</a> <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1Sine__Source.html#b75c7a00e7185b92e985ed36291cbbd0" title="Return a single sample.">operator()</a>() { <span class="keywordflow">return</span> sample(); } |
---|
81 | <a name="l00052"></a>00052 vec <a class="code" href="classitpp_1_1Sine__Source.html#b75c7a00e7185b92e985ed36291cbbd0" title="Return a single sample.">operator()</a>(<span class="keywordtype">int</span> n); |
---|
82 | <a name="l00054"></a>00054 mat <a class="code" href="classitpp_1_1Sine__Source.html#b75c7a00e7185b92e985ed36291cbbd0" title="Return a single sample.">operator()</a>(<span class="keywordtype">int</span> h, <span class="keywordtype">int</span> w); |
---|
83 | <a name="l00055"></a>00055 <span class="keyword">protected</span>: |
---|
84 | <a name="l00056"></a>00056 <span class="keyword">private</span>: |
---|
85 | <a name="l00057"></a>00057 <span class="keywordtype">double</span> sample(); |
---|
86 | <a name="l00058"></a>00058 <span class="keywordtype">double</span> m, A, theta, dtheta; |
---|
87 | <a name="l00059"></a>00059 }; |
---|
88 | <a name="l00060"></a>00060 |
---|
89 | <a name="l00065"></a><a class="code" href="classitpp_1_1Square__Source.html">00065</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Square__Source.html" title="Square-wave source.">Square_Source</a> |
---|
90 | <a name="l00066"></a>00066 { |
---|
91 | <a name="l00067"></a>00067 <span class="keyword">public</span>: |
---|
92 | <a name="l00069"></a>00069 <a class="code" href="classitpp_1_1Square__Source.html#915b2d7fa1f3649bdc59a636fa403ce5" title="Constructor. Set frequency, mean, amplitude, and start phase.">Square_Source</a>(<span class="keywordtype">double</span> freq, <span class="keywordtype">double</span> <a class="code" href="group__statistics.html#gc370b4cfdc6baa037b7442ae6e2c4b5c" title="The mean value.">mean</a> = 0.0, <span class="keywordtype">double</span> ampl = 1.0, <span class="keywordtype">double</span> inphase = 0.0); |
---|
93 | <a name="l00071"></a><a class="code" href="classitpp_1_1Square__Source.html#d3240f0898b7f3682c8f75d6eb3c247a">00071</a> <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1Square__Source.html#d3240f0898b7f3682c8f75d6eb3c247a" title="Return a single sample.">operator()</a>() { <span class="keywordflow">return</span> sample(); } |
---|
94 | <a name="l00073"></a>00073 vec <a class="code" href="classitpp_1_1Square__Source.html#d3240f0898b7f3682c8f75d6eb3c247a" title="Return a single sample.">operator()</a>(<span class="keywordtype">int</span> n); |
---|
95 | <a name="l00075"></a>00075 mat <a class="code" href="classitpp_1_1Square__Source.html#d3240f0898b7f3682c8f75d6eb3c247a" title="Return a single sample.">operator()</a>(<span class="keywordtype">int</span> h, <span class="keywordtype">int</span> w); |
---|
96 | <a name="l00076"></a>00076 <span class="keyword">protected</span>: |
---|
97 | <a name="l00077"></a>00077 <span class="keyword">private</span>: |
---|
98 | <a name="l00078"></a>00078 <span class="keywordtype">double</span> sample(); |
---|
99 | <a name="l00079"></a>00079 <span class="keywordtype">double</span> m, A, theta, dtheta; |
---|
100 | <a name="l00080"></a>00080 }; |
---|
101 | <a name="l00081"></a>00081 |
---|
102 | <a name="l00086"></a><a class="code" href="classitpp_1_1Triangle__Source.html">00086</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Triangle__Source.html" title="Triangle-wave source.">Triangle_Source</a> |
---|
103 | <a name="l00087"></a>00087 { |
---|
104 | <a name="l00088"></a>00088 <span class="keyword">public</span>: |
---|
105 | <a name="l00090"></a>00090 <a class="code" href="classitpp_1_1Triangle__Source.html#37d3f93025e26cf2ecf954e3d35e0c05" title="Constructor. Set frequency, mean, amplitude and start phase.">Triangle_Source</a>(<span class="keywordtype">double</span> freq, <span class="keywordtype">double</span> <a class="code" href="group__statistics.html#gc370b4cfdc6baa037b7442ae6e2c4b5c" title="The mean value.">mean</a> = 0.0, <span class="keywordtype">double</span> ampl = 1.0, <span class="keywordtype">double</span> inphase = 0.0); |
---|
106 | <a name="l00092"></a><a class="code" href="classitpp_1_1Triangle__Source.html#0b0ebfd807df7d81e39d4b87db7fcfe8">00092</a> <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1Triangle__Source.html#0b0ebfd807df7d81e39d4b87db7fcfe8" title="Return a single sample.">operator()</a>() { <span class="keywordflow">return</span> sample(); } |
---|
107 | <a name="l00094"></a>00094 vec <a class="code" href="classitpp_1_1Triangle__Source.html#0b0ebfd807df7d81e39d4b87db7fcfe8" title="Return a single sample.">operator()</a>(<span class="keywordtype">int</span> n); |
---|
108 | <a name="l00096"></a>00096 mat <a class="code" href="classitpp_1_1Triangle__Source.html#0b0ebfd807df7d81e39d4b87db7fcfe8" title="Return a single sample.">operator()</a>(<span class="keywordtype">int</span> h, <span class="keywordtype">int</span> w); |
---|
109 | <a name="l00097"></a>00097 <span class="keyword">protected</span>: |
---|
110 | <a name="l00098"></a>00098 <span class="keyword">private</span>: |
---|
111 | <a name="l00099"></a>00099 <span class="keywordtype">double</span> sample(); |
---|
112 | <a name="l00100"></a>00100 <span class="keywordtype">double</span> m, A, theta, dtheta; |
---|
113 | <a name="l00101"></a>00101 }; |
---|
114 | <a name="l00102"></a>00102 |
---|
115 | <a name="l00107"></a><a class="code" href="classitpp_1_1Sawtooth__Source.html">00107</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Sawtooth__Source.html" title="Sawtooth-wave source.">Sawtooth_Source</a> |
---|
116 | <a name="l00108"></a>00108 { |
---|
117 | <a name="l00109"></a>00109 <span class="keyword">public</span>: |
---|
118 | <a name="l00111"></a>00111 <a class="code" href="classitpp_1_1Sawtooth__Source.html#695e8c078dcae915c946c34030f2b8b8" title="Constructor. Set frequency, mean, amplitude, and start phase.">Sawtooth_Source</a>(<span class="keywordtype">double</span> freq, <span class="keywordtype">double</span> <a class="code" href="group__statistics.html#gc370b4cfdc6baa037b7442ae6e2c4b5c" title="The mean value.">mean</a> = 0.0, <span class="keywordtype">double</span> ampl = 1.0, <span class="keywordtype">double</span> inphase = 0.0); |
---|
119 | <a name="l00113"></a><a class="code" href="classitpp_1_1Sawtooth__Source.html#06f428d1ac459e14152f7c50fef0efbb">00113</a> <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1Sawtooth__Source.html#06f428d1ac459e14152f7c50fef0efbb" title="Return a single sample.">operator()</a>() { <span class="keywordflow">return</span> sample(); } |
---|
120 | <a name="l00115"></a>00115 vec <a class="code" href="classitpp_1_1Sawtooth__Source.html#06f428d1ac459e14152f7c50fef0efbb" title="Return a single sample.">operator()</a>(<span class="keywordtype">int</span> n); |
---|
121 | <a name="l00117"></a>00117 mat <a class="code" href="classitpp_1_1Sawtooth__Source.html#06f428d1ac459e14152f7c50fef0efbb" title="Return a single sample.">operator()</a>(<span class="keywordtype">int</span> h, <span class="keywordtype">int</span> w); |
---|
122 | <a name="l00118"></a>00118 <span class="keyword">protected</span>: |
---|
123 | <a name="l00119"></a>00119 <span class="keyword">private</span>: |
---|
124 | <a name="l00120"></a>00120 <span class="keywordtype">double</span> sample(); |
---|
125 | <a name="l00121"></a>00121 <span class="keywordtype">double</span> m, A, theta, dtheta; |
---|
126 | <a name="l00122"></a>00122 }; |
---|
127 | <a name="l00123"></a>00123 |
---|
128 | <a name="l00128"></a><a class="code" href="classitpp_1_1Impulse__Source.html">00128</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Impulse__Source.html" title="Impulse source.">Impulse_Source</a> |
---|
129 | <a name="l00129"></a>00129 { |
---|
130 | <a name="l00130"></a>00130 <span class="keyword">public</span>: |
---|
131 | <a name="l00132"></a>00132 <a class="code" href="classitpp_1_1Impulse__Source.html#589488be3379f3fb601a6627184053e5" title="Constructor. Set frequency, amplitude and start phase.">Impulse_Source</a>(<span class="keywordtype">double</span> freq, <span class="keywordtype">double</span> ampl = 1.0, <span class="keywordtype">double</span> inphase = 0.0); |
---|
132 | <a name="l00134"></a><a class="code" href="classitpp_1_1Impulse__Source.html#3a76598c7bc823bad2c10413df044f3c">00134</a> <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1Impulse__Source.html#3a76598c7bc823bad2c10413df044f3c" title="Return a single sample.">operator()</a>() { <span class="keywordflow">return</span> sample(); } |
---|
133 | <a name="l00136"></a>00136 vec <a class="code" href="classitpp_1_1Impulse__Source.html#3a76598c7bc823bad2c10413df044f3c" title="Return a single sample.">operator()</a>(<span class="keywordtype">int</span> n); |
---|
134 | <a name="l00138"></a>00138 mat <a class="code" href="classitpp_1_1Impulse__Source.html#3a76598c7bc823bad2c10413df044f3c" title="Return a single sample.">operator()</a>(<span class="keywordtype">int</span> h, <span class="keywordtype">int</span> w); |
---|
135 | <a name="l00139"></a>00139 <span class="keyword">protected</span>: |
---|
136 | <a name="l00140"></a>00140 <span class="keyword">private</span>: |
---|
137 | <a name="l00141"></a>00141 <span class="keywordtype">double</span> sample(); |
---|
138 | <a name="l00142"></a>00142 <span class="keywordtype">double</span> A, pos, dtheta; |
---|
139 | <a name="l00143"></a>00143 }; |
---|
140 | <a name="l00144"></a>00144 |
---|
141 | <a name="l00149"></a><a class="code" href="classitpp_1_1Pattern__Source.html">00149</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Pattern__Source.html" title="Pattern source.">Pattern_Source</a> |
---|
142 | <a name="l00150"></a>00150 { |
---|
143 | <a name="l00151"></a>00151 <span class="keyword">public</span>: |
---|
144 | <a name="l00153"></a>00153 <a class="code" href="classitpp_1_1Pattern__Source.html#aca4e024517b1e35698a2636e8b15cbf" title="Constructor. Set pattern and start position.">Pattern_Source</a>(<span class="keyword">const</span> vec &pattern, <span class="keywordtype">int</span> start_pos = 0); |
---|
145 | <a name="l00155"></a><a class="code" href="classitpp_1_1Pattern__Source.html#ce7960f9f8b566b1ef5b6c694c93bb44">00155</a> <span class="keyword">virtual</span> <a class="code" href="classitpp_1_1Pattern__Source.html#ce7960f9f8b566b1ef5b6c694c93bb44" title="Destructor.">~Pattern_Source</a>() { } |
---|
146 | <a name="l00157"></a><a class="code" href="classitpp_1_1Pattern__Source.html#ae0df7c66f8449d90e18dd015ff92ab9">00157</a> <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1Pattern__Source.html#ae0df7c66f8449d90e18dd015ff92ab9" title="Return a single sample.">operator()</a>() { <span class="keywordflow">return</span> sample(); } |
---|
147 | <a name="l00159"></a>00159 vec <a class="code" href="classitpp_1_1Pattern__Source.html#ae0df7c66f8449d90e18dd015ff92ab9" title="Return a single sample.">operator()</a>(<span class="keywordtype">int</span> n); |
---|
148 | <a name="l00161"></a>00161 mat <a class="code" href="classitpp_1_1Pattern__Source.html#ae0df7c66f8449d90e18dd015ff92ab9" title="Return a single sample.">operator()</a>(<span class="keywordtype">int</span> h, <span class="keywordtype">int</span> w); |
---|
149 | <a name="l00162"></a>00162 <span class="keyword">protected</span>: |
---|
150 | <a name="l00163"></a>00163 <span class="keyword">private</span>: |
---|
151 | <a name="l00164"></a>00164 <span class="keywordtype">double</span> sample(); |
---|
152 | <a name="l00165"></a>00165 <span class="keywordtype">int</span> pos; |
---|
153 | <a name="l00166"></a>00166 vec pat; |
---|
154 | <a name="l00167"></a>00167 <span class="keywordtype">double</span> mean, var; |
---|
155 | <a name="l00168"></a>00168 }; |
---|
156 | <a name="l00169"></a>00169 |
---|
157 | <a name="l00170"></a>00170 } <span class="comment">//namespace itpp</span> |
---|
158 | <a name="l00171"></a>00171 |
---|
159 | <a name="l00172"></a>00172 <span class="preprocessor">#endif // #ifndef SOURCE_H</span> |
---|
160 | </pre></div></div> |
---|
161 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:13 2009 for mixpp by |
---|
162 | <a href="http://www.doxygen.org/index.html"> |
---|
163 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
164 | </body> |
---|
165 | </html> |
---|