Erosion and dilation algorithme successfully tested.
[Faustine.git] / documentation / Value.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <link rel="stylesheet" href="style.css" type="text/css">
5 <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
6 <link rel="Start" href="index.html">
7 <link rel="previous" href="Lexer.html">
8 <link rel="next" href="Signal.html">
9 <link rel="Up" href="index.html">
10 <link title="Index of types" rel=Appendix href="index_types.html">
11 <link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
12 <link title="Index of values" rel=Appendix href="index_values.html">
13 <link title="Index of modules" rel=Appendix href="index_modules.html">
14 <link title="Types" rel="Chapter" href="Types.html">
15 <link title="Parser" rel="Chapter" href="Parser.html">
16 <link title="Lexer" rel="Chapter" href="Lexer.html">
17 <link title="Value" rel="Chapter" href="Value.html">
18 <link title="Signal" rel="Chapter" href="Signal.html">
19 <link title="Faustexp" rel="Chapter" href="Faustexp.html">
20 <link title="Interpreter" rel="Chapter" href="Interpreter.html">
21 <link title="Preprocess" rel="Chapter" href="Preprocess.html">
22 <link title="Main" rel="Chapter" href="Main.html"><title>Value</title>
23 </head>
24 <body>
25 <div class="navbar"><a href="Lexer.html">Previous</a>
26 &nbsp;<a href="index.html">Up</a>
27 &nbsp;<a href="Signal.html">Next</a>
28 </div>
29 <center><h1>Module <a href="type_Value.html">Value</a></h1></center>
30 <br>
31 <pre><span class="keyword">module</span> Value: <code class="code">sig</code> <a href="Value.html">..</a> <code class="code">end</code></pre>Module: Value
32 Description: basic data type in the vectorial faust interpreter.<br>
33 <b>Author(s):</b> WANG Haisheng
34 Created: 31/05/2013 Modified: 03/06/2013<br>
35 <hr width="100%">
36 <pre><span id="EXCEPTIONConvert_Error"><span class="keyword">exception</span> Convert_Error</span> <span class="keyword">of</span> <code class="type">string</code></pre>
37 <div class="info">
38 Exception raised in convertions between float/int and type 'Value'.<br>
39 </div>
40 <pre><span id="EXCEPTIONValue_operation"><span class="keyword">exception</span> Value_operation</span> <span class="keyword">of</span> <code class="type">string</code></pre>
41 <div class="info">
42 Exception raised in type 'Value' operations.<br>
43 </div>
44 <br><code><span id="TYPEvalue_macro"><span class="keyword">type</span> <code class="type"></code>value_macro</span> = </code><table class="typetable">
45 <tr>
46 <td align="left" valign="top" >
47 <code><span class="keyword">|</span></code></td>
48 <td align="left" valign="top" >
49 <code><span class="constructor">Faust_Max_int</span></code></td>
50
51 </tr>
52 <tr>
53 <td align="left" valign="top" >
54 <code><span class="keyword">|</span></code></td>
55 <td align="left" valign="top" >
56 <code><span class="constructor">Faust_Min_int</span></code></td>
57
58 </tr>
59 <tr>
60 <td align="left" valign="top" >
61 <code><span class="keyword">|</span></code></td>
62 <td align="left" valign="top" >
63 <code><span class="constructor">Faust_Bits_int</span></code></td>
64
65 </tr></table>
66
67 <div class="info">
68 Macro constants of the file.<br>
69 </div>
70
71 <pre><span id="VALvalue_macro_to_int"><span class="keyword">val</span> <a href="code_VALValue.value_macro_to_int.html">value_macro_to_int</a></span> : <code class="type"><a href="Value.html#TYPEvalue_macro">value_macro</a> -> int</code></pre><div class="info">
72 val value_macro_to_value : value_macro -&gt; int.<br>
73 </div>
74 <pre><span id="VALreturn_N"><span class="keyword">val</span> <a href="code_VALValue.return_N.html">return_N</a></span> : <code class="type">int -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
75 val return_N : int -&gt; value, convert from int to value N.<br>
76 </div>
77 <pre><span id="VALreturn_R"><span class="keyword">val</span> <a href="code_VALValue.return_R.html">return_R</a></span> : <code class="type">float -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
78 val return_R : float -&gt; value, convert from float to value R.<br>
79 </div>
80 <pre><span id="VALreturn_Vec"><span class="keyword">val</span> <a href="code_VALValue.return_Vec.html">return_Vec</a></span> : <code class="type">int * (int -> <a href="Types.html#TYPEvalue">Types.value</a>) -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
81 val return_Vec : int * (int -&gt; value) -&gt; value, convert (size, vec) to value Vec.<br>
82 </div>
83 <pre><span id="VALfail"><span class="keyword">val</span> <a href="code_VALValue.fail.html">fail</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
84 val fail, return value W.<br>
85 </div>
86 <pre><span id="VALtake_off_N"><span class="keyword">val</span> <a href="code_VALValue.take_off_N.html">take_off_N</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> int</code></pre><div class="info">
87 val take_off_N : value -&gt; int, convert from value N to int.
88 Attention: Zero and W are converted to 0.<br>
89 </div>
90 <pre><span id="VALtake_off_R"><span class="keyword">val</span> <a href="code_VALValue.take_off_R.html">take_off_R</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> float</code></pre><div class="info">
91 val take_off_R : value -&gt; float, convert from value R to float.
92 Attention: Zero and W are converted to 0.0, int converted to float.<br>
93 </div>
94 <pre><span id="VALconvert_back_R"><span class="keyword">val</span> <a href="code_VALValue.convert_back_R.html">convert_back_R</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> float array</code></pre><div class="info">
95 val convert_back_r : value -&gt; float array,
96 return a float array of size 1 if v is N|R|Zero|W, a float array of size n if v is Vec.<br>
97 </div>
98 <pre><span id="VALstring_of_value"><span class="keyword">val</span> <a href="code_VALValue.string_of_value.html">string_of_value</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> string</code></pre><div class="info">
99 val string_of_value : value -&gt; string, converts value to following
100 strings "N i" | "R f" | "Vec" | "Zero" | "W".<br>
101 </div>
102 <pre><span id="VALprint_value_list"><span class="keyword">val</span> <a href="code_VALValue.print_value_list.html">print_value_list</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> list -> unit</code></pre><div class="info">
103 val print_value_list: value list -&gt; unit, prints to console the value list.<br>
104 </div>
105 <pre><span id="VALfactory_add_memory"><span class="keyword">val</span> <a href="code_VALValue.factory_add_memory.html">factory_add_memory</a></span> : <code class="type">(int -> 'a) -> int -> int -> 'a</code></pre><div class="info">
106 val factory_add_memory : (int -&gt; 'b) -&gt; int -&gt; (int -&gt; 'b),
107 <code class="code">factory_add_memory f n</code> adds a memory of size n to fun f.<br>
108 </div>
109 <pre><span id="VALv_memory"><span class="keyword">val</span> <a href="code_VALValue.v_memory.html">v_memory</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
110 val v_memory : value -&gt; value, returns value Vec with memory.<br>
111 </div>
112 <pre><span id="VALv_list_memory"><span class="keyword">val</span> <a href="code_VALValue.v_list_memory.html">v_list_memory</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> list -> <a href="Types.html#TYPEvalue">Types.value</a> list</code></pre><div class="info">
113 val v_list_memory : value list -&gt; value list, returns value list with memory.<br>
114 </div>
115 <pre><span id="VALmake_vector"><span class="keyword">val</span> <a href="code_VALValue.make_vector.html">make_vector</a></span> : <code class="type">int -> (int -> <a href="Types.html#TYPEvalue">Types.value</a>) -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
116 val make_vector : int -&gt; (int -&gt; value) -&gt; value,
117 <code class="code">make_vector size vec</code>, return a value Vec of (size, vec).<br>
118 </div>
119 <pre><span id="VALnormalize"><span class="keyword">val</span> <a href="code_VALValue.normalize.html">normalize</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
120 val normalize: value -&gt; value, normalize value to bounded <code class="code">-2147483648,2147483647</code>.<br>
121 </div>
122 <pre><span id="VALv_add"><span class="keyword">val</span> <a href="code_VALValue.v_add.html">v_add</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
123 val v_add : value -&gt; value -&gt; value, value addition, recursive for value.Vec.<br>
124 </div>
125 <pre><span id="VAL(+~)"><span class="keyword">val</span> <a href="code_VALValue.(_plus__tilde_).html">(+~)</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
126 val (+~) : value -&gt; value -&gt; value, operator of v_add.<br>
127 </div>
128 <pre><span id="VALv_neg"><span class="keyword">val</span> <a href="code_VALValue.v_neg.html">v_neg</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
129 val v_neg : value -&gt; value, v_neg v = -v.<br>
130 </div>
131 <pre><span id="VALv_sub"><span class="keyword">val</span> <a href="code_VALValue.v_sub.html">v_sub</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
132 val v_sub : value -&gt; value -&gt; value, returns (v1 - v2).<br>
133 </div>
134 <pre><span id="VAL(-~)"><span class="keyword">val</span> <a href="code_VALValue.(_minus__tilde_).html">(-~)</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
135 val (-~) : value -&gt; value -&gt; value, operator of v_sub.<br>
136 </div>
137 <pre><span id="VALv_mul"><span class="keyword">val</span> <a href="code_VALValue.v_mul.html">v_mul</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
138 val v_mul : value -&gt; value -&gt; value, returns (v1 * v2), recursive for value.Vec.<br>
139 </div>
140 <pre><span id="VAL( *~ )"><span class="keyword">val</span> <a href="code_VALValue.( _star__tilde_ ).html">( *~ )</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
141 val ( *~ ) : value -&gt; value -&gt; value, operator of v_mul.<br>
142 </div>
143 <pre><span id="VALv_recip"><span class="keyword">val</span> <a href="code_VALValue.v_recip.html">v_recip</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
144 val v_recip : value -&gt; value, v_recip v = 1./.v.<br>
145 </div>
146 <pre><span id="VALv_div"><span class="keyword">val</span> <a href="code_VALValue.v_div.html">v_div</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
147 val v_div : value -&gt; value -&gt; value, value division, returns (v1/.v2).<br>
148 </div>
149 <pre><span id="VAL(/~)"><span class="keyword">val</span> <a href="code_VALValue.(_slash__tilde_).html">(/~)</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
150 val (/~) : value -&gt; value -&gt; value, operator of v_div.<br>
151 </div>
152 <pre><span id="VALv_zero"><span class="keyword">val</span> <a href="code_VALValue.v_zero.html">v_zero</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
153 val v_zero : value -&gt; value, Attention: N i -&gt; N 0 | R f -&gt; R 0. | Zero -&gt; Zero | W -&gt; R 0.,
154 and recursive for value.Vec.<br>
155 </div>
156 <pre><span id="VALv_floor"><span class="keyword">val</span> <a href="code_VALValue.v_floor.html">v_floor</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
157 val v_floor : value -&gt; value, returns floor of float, converts int to float, Zero to 0.,
158 error to error, recursive for value.Vec.<br>
159 </div>
160 <pre><span id="VALv_int"><span class="keyword">val</span> <a href="code_VALValue.v_int.html">v_int</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
161 val v_int : value -&gt; value, converts value to value.N, error to error, recursive for value.Vec.<br>
162 </div>
163 <pre><span id="VALv_sin"><span class="keyword">val</span> <a href="code_VALValue.v_sin.html">v_sin</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
164 val v_sin : value -&gt; value, returns sin(v), recursive for value.Vec.<br>
165 </div>
166 <pre><span id="VALv_cos"><span class="keyword">val</span> <a href="code_VALValue.v_cos.html">v_cos</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
167 val v_cos : value -&gt; value, returns cos(v), recursive for value.Vec.<br>
168 </div>
169 <pre><span id="VALv_atan"><span class="keyword">val</span> <a href="code_VALValue.v_atan.html">v_atan</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
170 val v_atan : value -&gt; value, returns atan(v), recursive for value.Vec.<br>
171 </div>
172 <pre><span id="VALv_atantwo"><span class="keyword">val</span> <a href="code_VALValue.v_atantwo.html">v_atantwo</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
173 val v_atantwo : value -&gt; value, returns atantwo(v), recursive for value.Vec.<br>
174 </div>
175 <pre><span id="VALv_sqrt"><span class="keyword">val</span> <a href="code_VALValue.v_sqrt.html">v_sqrt</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
176 val v_sqrt : value -&gt; value, returns sqrt(v), recursive for value.Vec.<br>
177 </div>
178 <pre><span id="VALv_mod"><span class="keyword">val</span> <a href="code_VALValue.v_mod.html">v_mod</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
179 val v_mod : value -&gt; value -&gt; value, returns (v1 % v2), recursive for value.Vec.<br>
180 </div>
181 <pre><span id="VALv_larger_than_zero"><span class="keyword">val</span> <a href="code_VALValue.v_larger_than_zero.html">v_larger_than_zero</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
182 val v_larger_than_zero : value -&gt; value, primitive comparison between value and zero,
183 returns value.N 1 if true, value.N 0 if false.<br>
184 </div>
185 <pre><span id="VALv_sup"><span class="keyword">val</span> <a href="code_VALValue.v_sup.html">v_sup</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
186 val v_sup : value -&gt; value -&gt; value, comparison of two values, returns value.N 1 if (v1 &gt; v2),
187 value.N 0 else.<br>
188 </div>
189 <pre><span id="VALv_inf"><span class="keyword">val</span> <a href="code_VALValue.v_inf.html">v_inf</a></span> : <code class="type"><a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a> -> <a href="Types.html#TYPEvalue">Types.value</a></code></pre><div class="info">
190 val v_inf : value -&gt; value -&gt; value, comparison of two values, returns value.N 1 if (v1 &lt; v2),
191 value.N 0 else.<br>
192 </div>
193 </body></html>