quantile_estimator 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/.ruby-gemset +1 -0
  3. data/.ruby-version +1 -0
  4. data/Gemfile +4 -0
  5. data/Gemfile.lock +17 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +85 -0
  8. data/Rakefile +9 -0
  9. data/benchmark.rb +21 -0
  10. data/doc/Cursor.html +422 -0
  11. data/doc/Estimator.html +779 -0
  12. data/doc/Invariant.html +115 -0
  13. data/doc/Invariant/Biased.html +268 -0
  14. data/doc/Invariant/Invariant.html +193 -0
  15. data/doc/Invariant/SingleTarget.html +278 -0
  16. data/doc/Invariant/Targeted.html +278 -0
  17. data/doc/Item.html +620 -0
  18. data/doc/Quantile.html +270 -0
  19. data/doc/QuantileEstimator.html +117 -0
  20. data/doc/_index.html +211 -0
  21. data/doc/class_list.html +54 -0
  22. data/doc/compression.png +0 -0
  23. data/doc/css/common.css +1 -0
  24. data/doc/css/full_list.css +57 -0
  25. data/doc/css/style.css +338 -0
  26. data/doc/file.README.html +186 -0
  27. data/doc/file_list.html +56 -0
  28. data/doc/frames.html +26 -0
  29. data/doc/index.html +186 -0
  30. data/doc/js/app.js +219 -0
  31. data/doc/js/full_list.js +178 -0
  32. data/doc/js/jquery.js +4 -0
  33. data/doc/method_list.html +221 -0
  34. data/doc/time.png +0 -0
  35. data/doc/top-level-namespace.html +114 -0
  36. data/lib/estimator.rb +120 -0
  37. data/lib/quantile_estimator/cursor.rb +24 -0
  38. data/lib/quantile_estimator/invariant.rb +47 -0
  39. data/lib/quantile_estimator/item.rb +21 -0
  40. data/lib/quantile_estimator/quantile.rb +3 -0
  41. data/lib/quantile_estimator/test.rb +37 -0
  42. data/lib/quantile_estimator/version.rb +3 -0
  43. data/pkg/quantile_estimator-0.0.1.gem +0 -0
  44. data/quantile_estimator.gemspec +29 -0
  45. data/test/test_quantile_estimator.rb +85 -0
  46. metadata +120 -0
@@ -0,0 +1,115 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Invariant
8
+
9
+ &mdash; Documentation by YARD 0.8.7.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index (I)</a> &raquo;
35
+
36
+
37
+ <span class="title">Invariant</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: Invariant
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/quantile_estimator/invariant.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Defined Under Namespace</h2>
88
+ <p class="children">
89
+
90
+
91
+
92
+
93
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Invariant/Biased.html" title="Invariant::Biased (class)">Biased</a></span>, <span class='object_link'><a href="Invariant/Invariant.html" title="Invariant::Invariant (class)">Invariant</a></span>, <span class='object_link'><a href="Invariant/SingleTarget.html" title="Invariant::SingleTarget (class)">SingleTarget</a></span>, <span class='object_link'><a href="Invariant/Targeted.html" title="Invariant::Targeted (class)">Targeted</a></span>
94
+
95
+
96
+ </p>
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+ </div>
107
+
108
+ <div id="footer">
109
+ Generated on Fri Nov 15 15:39:43 2013 by
110
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
111
+ 0.8.7.3 (ruby-2.0.0).
112
+ </div>
113
+
114
+ </body>
115
+ </html>
@@ -0,0 +1,268 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Invariant::Biased
8
+
9
+ &mdash; Documentation by YARD 0.8.7.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (B)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Invariant.html" title="Invariant (module)">Invariant</a></span></span>
36
+ &raquo;
37
+ <span class="title">Biased</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Invariant::Biased
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName"><span class='object_link'><a href="Invariant.html" title="Invariant::Invariant (class)">Invariant</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="Invariant.html" title="Invariant::Invariant (class)">Invariant</a></span></li>
82
+
83
+ <li class="next">Invariant::Biased</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/quantile_estimator/invariant.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ <h2>
113
+ Instance Method Summary
114
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
115
+ </h2>
116
+
117
+ <ul class="summary">
118
+
119
+ <li class="public ">
120
+ <span class="summary_signature">
121
+
122
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Biased) <strong>initialize</strong>(epsilon) </a>
123
+
124
+
125
+
126
+ </span>
127
+
128
+
129
+ <span class="note title constructor">constructor</span>
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+ <span class="summary_desc"><div class='inline'>
139
+ <p>A new instance of Biased.</p>
140
+ </div></span>
141
+
142
+ </li>
143
+
144
+
145
+ <li class="public ">
146
+ <span class="summary_signature">
147
+
148
+ <a href="#upper_bound-instance_method" title="#upper_bound (instance method)">- (Object) <strong>upper_bound</strong>(rank, n) </a>
149
+
150
+
151
+
152
+ </span>
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+ <span class="summary_desc"><div class='inline'></div></span>
163
+
164
+ </li>
165
+
166
+
167
+ </ul>
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+ <div id="constructor_details" class="method_details_list">
177
+ <h2>Constructor Details</h2>
178
+
179
+ <div class="method_details first">
180
+ <h3 class="signature first" id="initialize-instance_method">
181
+
182
+ - (<tt><span class='object_link'><a href="" title="Invariant::Biased (class)">Biased</a></span></tt>) <strong>initialize</strong>(epsilon)
183
+
184
+
185
+
186
+
187
+
188
+ </h3><div class="docstring">
189
+ <div class="discussion">
190
+
191
+ <p>Returns a new instance of Biased</p>
192
+
193
+
194
+ </div>
195
+ </div>
196
+ <div class="tags">
197
+
198
+
199
+ </div><table class="source_code">
200
+ <tr>
201
+ <td>
202
+ <pre class="lines">
203
+
204
+
205
+ 9
206
+ 10
207
+ 11</pre>
208
+ </td>
209
+ <td>
210
+ <pre class="code"><span class="info file"># File 'lib/quantile_estimator/invariant.rb', line 9</span>
211
+
212
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_epsilon'>epsilon</span><span class='rparen'>)</span>
213
+ <span class='ivar'>@epsilon</span> <span class='op'>=</span> <span class='id identifier rubyid_epsilon'>epsilon</span>
214
+ <span class='kw'>end</span></pre>
215
+ </td>
216
+ </tr>
217
+ </table>
218
+ </div>
219
+
220
+ </div>
221
+
222
+
223
+ <div id="instance_method_details" class="method_details_list">
224
+ <h2>Instance Method Details</h2>
225
+
226
+
227
+ <div class="method_details first">
228
+ <h3 class="signature first" id="upper_bound-instance_method">
229
+
230
+ - (<tt>Object</tt>) <strong>upper_bound</strong>(rank, n)
231
+
232
+
233
+
234
+
235
+
236
+ </h3><table class="source_code">
237
+ <tr>
238
+ <td>
239
+ <pre class="lines">
240
+
241
+
242
+ 13
243
+ 14
244
+ 15</pre>
245
+ </td>
246
+ <td>
247
+ <pre class="code"><span class="info file"># File 'lib/quantile_estimator/invariant.rb', line 13</span>
248
+
249
+ <span class='kw'>def</span> <span class='id identifier rubyid_upper_bound'>upper_bound</span><span class='lparen'>(</span><span class='id identifier rubyid_rank'>rank</span><span class='comma'>,</span> <span class='id identifier rubyid_n'>n</span><span class='rparen'>)</span>
250
+ <span class='int'>2</span> <span class='op'>*</span> <span class='ivar'>@epsilon</span> <span class='op'>*</span> <span class='id identifier rubyid_rank'>rank</span>
251
+ <span class='kw'>end</span></pre>
252
+ </td>
253
+ </tr>
254
+ </table>
255
+ </div>
256
+
257
+ </div>
258
+
259
+ </div>
260
+
261
+ <div id="footer">
262
+ Generated on Fri Nov 15 15:39:43 2013 by
263
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
264
+ 0.8.7.3 (ruby-2.0.0).
265
+ </div>
266
+
267
+ </body>
268
+ </html>
@@ -0,0 +1,193 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Invariant::Invariant
8
+
9
+ &mdash; Documentation by YARD 0.8.7.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (I)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Invariant.html" title="Invariant (module)">Invariant</a></span></span>
36
+ &raquo;
37
+ <span class="title">Invariant</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Invariant::Invariant
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Invariant::Invariant</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/quantile_estimator/invariant.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <div id="subclasses">
103
+ <h2>Direct Known Subclasses</h2>
104
+ <p class="children"><span class='object_link'><a href="Biased.html" title="Invariant::Biased (class)">Biased</a></span>, <span class='object_link'><a href="SingleTarget.html" title="Invariant::SingleTarget (class)">SingleTarget</a></span>, <span class='object_link'><a href="Targeted.html" title="Invariant::Targeted (class)">Targeted</a></span></p>
105
+ </div>
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ <h2>
115
+ Instance Method Summary
116
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
117
+ </h2>
118
+
119
+ <ul class="summary">
120
+
121
+ <li class="public ">
122
+ <span class="summary_signature">
123
+
124
+ <a href="#upper_bound-instance_method" title="#upper_bound (instance method)">- (Object) <strong>upper_bound</strong>(rank, n) </a>
125
+
126
+
127
+
128
+ </span>
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+ <span class="summary_desc"><div class='inline'></div></span>
139
+
140
+ </li>
141
+
142
+
143
+ </ul>
144
+
145
+
146
+
147
+
148
+ <div id="instance_method_details" class="method_details_list">
149
+ <h2>Instance Method Details</h2>
150
+
151
+
152
+ <div class="method_details first">
153
+ <h3 class="signature first" id="upper_bound-instance_method">
154
+
155
+ - (<tt>Object</tt>) <strong>upper_bound</strong>(rank, n)
156
+
157
+
158
+
159
+
160
+
161
+ </h3><table class="source_code">
162
+ <tr>
163
+ <td>
164
+ <pre class="lines">
165
+
166
+
167
+ 3
168
+ 4
169
+ 5</pre>
170
+ </td>
171
+ <td>
172
+ <pre class="code"><span class="info file"># File 'lib/quantile_estimator/invariant.rb', line 3</span>
173
+
174
+ <span class='kw'>def</span> <span class='id identifier rubyid_upper_bound'>upper_bound</span><span class='lparen'>(</span><span class='id identifier rubyid_rank'>rank</span><span class='comma'>,</span> <span class='id identifier rubyid_n'>n</span><span class='rparen'>)</span>
175
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Implement me</span><span class='tstring_end'>&quot;</span></span>
176
+ <span class='kw'>end</span></pre>
177
+ </td>
178
+ </tr>
179
+ </table>
180
+ </div>
181
+
182
+ </div>
183
+
184
+ </div>
185
+
186
+ <div id="footer">
187
+ Generated on Fri Nov 15 15:39:43 2013 by
188
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
189
+ 0.8.7.3 (ruby-2.0.0).
190
+ </div>
191
+
192
+ </body>
193
+ </html>