p10lppt13 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. data/.gitignore +0 -2
  2. data/.travis.yml +0 -1
  3. data/Gemfile.lock +1 -1
  4. data/lib/doc/Densa.html +451 -0
  5. data/lib/doc/Dispersa.html +462 -0
  6. data/lib/doc/Fraccion.html +1023 -0
  7. data/lib/doc/Matriz.html +985 -0
  8. data/lib/doc/Object.html +349 -0
  9. data/lib/doc/P10lppt13.html +303 -0
  10. data/lib/doc/VectorDisperso.html +444 -0
  11. data/lib/doc/created.rid +89 -0
  12. data/lib/doc/doc/Densa_html.html +659 -0
  13. data/lib/doc/doc/Dispersa_html.html +669 -0
  14. data/lib/doc/doc/Fraccion_html.html +1193 -0
  15. data/lib/doc/doc/Matriz_html.html +1159 -0
  16. data/lib/doc/doc/Object_html.html +557 -0
  17. data/lib/doc/doc/P10lppt13_html.html +509 -0
  18. data/lib/doc/doc/VectorDisperso_html.html +646 -0
  19. data/lib/doc/doc/created_rid.html +336 -0
  20. data/lib/doc/doc/doc/Densa_html_html.html +908 -0
  21. data/lib/doc/doc/doc/Dispersa_html_html.html +949 -0
  22. data/lib/doc/doc/doc/Fraccion_html_html.html +1713 -0
  23. data/lib/doc/doc/doc/Matriz_html_html.html +1684 -0
  24. data/lib/doc/doc/doc/Object_html_html.html +816 -0
  25. data/lib/doc/doc/doc/P10lppt13_html_html.html +754 -0
  26. data/lib/doc/doc/doc/VectorDisperso_html_html.html +887 -0
  27. data/lib/doc/doc/doc/created_rid_html.html +536 -0
  28. data/lib/doc/doc/doc/doc/Densa_html_html_html.html +1191 -0
  29. data/lib/doc/doc/doc/doc/Dispersa_html_html_html.html +1260 -0
  30. data/lib/doc/doc/doc/doc/Fraccion_html_html_html.html +2174 -0
  31. data/lib/doc/doc/doc/doc/Matriz_html_html_html.html +2235 -0
  32. data/lib/doc/doc/doc/doc/Object_html_html_html.html +1099 -0
  33. data/lib/doc/doc/doc/doc/P10lppt13_html_html_html.html +1028 -0
  34. data/lib/doc/doc/doc/doc/VectorDisperso_html_html_html.html +1168 -0
  35. data/lib/doc/doc/doc/doc/created_rid_html_html.html +722 -0
  36. data/lib/doc/doc/doc/doc/doc/Densa_html_html_html_html.html +1424 -0
  37. data/lib/doc/doc/doc/doc/doc/Dispersa_html_html_html_html.html +1502 -0
  38. data/lib/doc/doc/doc/doc/doc/Fraccion_html_html_html_html.html +2619 -0
  39. data/lib/doc/doc/doc/doc/doc/Matriz_html_html_html_html.html +2764 -0
  40. data/lib/doc/doc/doc/doc/doc/Object_html_html_html_html.html +1315 -0
  41. data/lib/doc/doc/doc/doc/doc/P10lppt13_html_html_html_html.html +1227 -0
  42. data/lib/doc/doc/doc/doc/doc/VectorDisperso_html_html_html_html.html +1403 -0
  43. data/lib/doc/doc/doc/doc/doc/created_rid_html_html_html.html +920 -0
  44. data/lib/doc/doc/doc/doc/doc/doc/created_rid_html_html_html_html.html +1089 -0
  45. data/lib/doc/doc/doc/doc/doc/fraccion_rb~_html_html_html_html.html +1754 -0
  46. data/lib/doc/doc/doc/doc/doc/index_html_html_html_html.html +1086 -0
  47. data/lib/doc/doc/doc/doc/doc/js/darkfish_js_html_html_html.html +1207 -0
  48. data/lib/doc/doc/doc/doc/doc/js/jquery_js_html_html_html.html +3210 -0
  49. data/lib/doc/doc/doc/doc/doc/js/navigation_js_html_html_html.html +1122 -0
  50. data/lib/doc/doc/doc/doc/doc/js/search_index_js_html_html_html.html +1031 -0
  51. data/lib/doc/doc/doc/doc/doc/js/search_js_html_html_html.html +1058 -0
  52. data/lib/doc/doc/doc/doc/doc/js/searcher_js_html_html_html.html +1295 -0
  53. data/lib/doc/doc/doc/doc/doc/rdoc_css_html_html_html.html +1827 -0
  54. data/lib/doc/doc/doc/doc/doc/table_of_contents_html_html_html_html.html +1727 -0
  55. data/lib/doc/doc/doc/doc/fraccion_rb~_html_html_html.html +1509 -0
  56. data/lib/doc/doc/doc/doc/index_html_html_html.html +911 -0
  57. data/lib/doc/doc/doc/doc/js/darkfish_js_html_html.html +920 -0
  58. data/lib/doc/doc/doc/doc/js/jquery_js_html_html.html +2908 -0
  59. data/lib/doc/doc/doc/doc/js/navigation_js_html_html.html +852 -0
  60. data/lib/doc/doc/doc/doc/js/search_index_js_html_html.html +889 -0
  61. data/lib/doc/doc/doc/doc/js/search_js_html_html.html +802 -0
  62. data/lib/doc/doc/doc/doc/js/searcher_js_html_html.html +975 -0
  63. data/lib/doc/doc/doc/doc/p10lppt13_rb~_html_html_html.html +1996 -0
  64. data/lib/doc/doc/doc/doc/rdoc_css_html_html.html +1443 -0
  65. data/lib/doc/doc/doc/doc/table_of_contents_html_html_html.html +1503 -0
  66. data/lib/doc/doc/doc/fraccion_rb~_html_html.html +1052 -0
  67. data/lib/doc/doc/doc/index_html_html.html +669 -0
  68. data/lib/doc/doc/doc/js/darkfish_js_html.html +667 -0
  69. data/lib/doc/doc/doc/js/jquery_js_html.html +213 -0
  70. data/lib/doc/doc/doc/js/navigation_js_html.html +557 -0
  71. data/lib/doc/doc/doc/js/search_index_js_html.html +589 -0
  72. data/lib/doc/doc/doc/js/search_js_html.html +499 -0
  73. data/lib/doc/doc/doc/js/searcher_js_html.html +655 -0
  74. data/lib/doc/doc/doc/p10lppt13_rb~_html_html.html +1361 -0
  75. data/lib/doc/doc/doc/rdoc_css_html.html +1039 -0
  76. data/lib/doc/doc/doc/table_of_contents_html_html.html +1134 -0
  77. data/lib/doc/doc/fraccion_rb~_html.html +582 -0
  78. data/lib/doc/doc/index_html.html +389 -0
  79. data/lib/doc/doc/js/darkfish_js.html +386 -0
  80. data/lib/doc/doc/js/jquery_js.html +1611 -0
  81. data/lib/doc/doc/js/navigation_js.html +354 -0
  82. data/lib/doc/doc/js/search_index_js.html +427 -0
  83. data/lib/doc/doc/js/search_js.html +308 -0
  84. data/lib/doc/doc/js/searcher_js.html +441 -0
  85. data/lib/doc/doc/p10lppt13_rb~_html.html +810 -0
  86. data/lib/doc/doc/rdoc_css.html +939 -0
  87. data/lib/doc/doc/table_of_contents_html.html +489 -0
  88. data/lib/doc/fraccion_rb~.html +356 -0
  89. data/lib/doc/images/add.png +0 -0
  90. data/lib/doc/images/arrow_up.png +0 -0
  91. data/lib/doc/images/brick.png +0 -0
  92. data/lib/doc/images/brick_link.png +0 -0
  93. data/lib/doc/images/bug.png +0 -0
  94. data/lib/doc/images/bullet_black.png +0 -0
  95. data/lib/doc/images/bullet_toggle_minus.png +0 -0
  96. data/lib/doc/images/bullet_toggle_plus.png +0 -0
  97. data/lib/doc/images/date.png +0 -0
  98. data/lib/doc/images/delete.png +0 -0
  99. data/lib/doc/images/find.png +0 -0
  100. data/lib/doc/images/loadingAnimation.gif +0 -0
  101. data/lib/doc/images/macFFBgHack.png +0 -0
  102. data/lib/doc/images/package.png +0 -0
  103. data/lib/doc/images/page_green.png +0 -0
  104. data/lib/doc/images/page_white_text.png +0 -0
  105. data/lib/doc/images/page_white_width.png +0 -0
  106. data/lib/doc/images/plugin.png +0 -0
  107. data/lib/doc/images/ruby.png +0 -0
  108. data/lib/doc/images/tag_blue.png +0 -0
  109. data/lib/doc/images/tag_green.png +0 -0
  110. data/lib/doc/images/transparent.png +0 -0
  111. data/lib/doc/images/wrench.png +0 -0
  112. data/lib/doc/images/wrench_orange.png +0 -0
  113. data/lib/doc/images/zoom.png +0 -0
  114. data/lib/doc/index.html +248 -0
  115. data/lib/doc/js/darkfish.js +155 -0
  116. data/lib/doc/js/jquery.js +18 -0
  117. data/lib/doc/js/navigation.js +142 -0
  118. data/lib/doc/js/search.js +94 -0
  119. data/lib/doc/js/search_index.js +1 -0
  120. data/lib/doc/js/searcher.js +228 -0
  121. data/lib/doc/p10lppt13_rb~.html +522 -0
  122. data/lib/doc/rdoc.css +595 -0
  123. data/lib/doc/table_of_contents.html +360 -0
  124. data/lib/fraccion.rb +18 -3
  125. data/lib/p10lppt13.rb +71 -41
  126. data/lib/p10lppt13/version.rb +3 -1
  127. data/spec/p10lppt13_spec.rb +16 -6
  128. data/test/tc_p10lppt13.rb +2 -0
  129. metadata +166 -26
  130. checksums.yaml +0 -7
  131. data/lib/gcd.rb +0 -7
@@ -0,0 +1,308 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>search.js - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
21
+
22
+
23
+ <body class="file">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../../index.html">Home</a>
28
+ <a href="../../table_of_contents.html#classes">Classes</a>
29
+ <a href="../../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+
47
+
48
+ <div id="project-metadata">
49
+ <nav id="fileindex-section" class="section project-section">
50
+ <h3 class="section-header">Pages</h3>
51
+
52
+ <ul>
53
+
54
+ <li class="file"><a href="../../doc/Densa_html.html">Densa.html</a>
55
+
56
+ <li class="file"><a href="../../doc/Dispersa_html.html">Dispersa.html</a>
57
+
58
+ <li class="file"><a href="../../doc/Fraccion_html.html">Fraccion.html</a>
59
+
60
+ <li class="file"><a href="../../doc/Matriz_html.html">Matriz.html</a>
61
+
62
+ <li class="file"><a href="../../doc/Object_html.html">Object.html</a>
63
+
64
+ <li class="file"><a href="../../doc/P10lppt13_html.html">P10lppt13.html</a>
65
+
66
+ <li class="file"><a href="../../doc/VectorDisperso_html.html">VectorDisperso.html</a>
67
+
68
+ <li class="file"><a href="../../doc/created_rid.html">created.rid</a>
69
+
70
+ <li class="file"><a href="../../doc/doc/Densa_html_html.html">Densa_html.html</a>
71
+
72
+ <li class="file"><a href="../../doc/doc/Dispersa_html_html.html">Dispersa_html.html</a>
73
+
74
+ <li class="file"><a href="../../doc/doc/Fraccion_html_html.html">Fraccion_html.html</a>
75
+
76
+ <li class="file"><a href="../../doc/doc/Matriz_html_html.html">Matriz_html.html</a>
77
+
78
+ <li class="file"><a href="../../doc/doc/Object_html_html.html">Object_html.html</a>
79
+
80
+ <li class="file"><a href="../../doc/doc/P10lppt13_html_html.html">P10lppt13_html.html</a>
81
+
82
+ <li class="file"><a href="../../doc/doc/VectorDisperso_html_html.html">VectorDisperso_html.html</a>
83
+
84
+ <li class="file"><a href="../../doc/doc/created_rid_html.html">created_rid.html</a>
85
+
86
+ <li class="file"><a href="../../doc/doc/doc/Densa_html_html_html.html">Densa_html_html.html</a>
87
+
88
+ <li class="file"><a href="../../doc/doc/doc/Dispersa_html_html_html.html">Dispersa_html_html.html</a>
89
+
90
+ <li class="file"><a href="../../doc/doc/doc/Fraccion_html_html_html.html">Fraccion_html_html.html</a>
91
+
92
+ <li class="file"><a href="../../doc/doc/doc/Matriz_html_html_html.html">Matriz_html_html.html</a>
93
+
94
+ <li class="file"><a href="../../doc/doc/doc/Object_html_html_html.html">Object_html_html.html</a>
95
+
96
+ <li class="file"><a href="../../doc/doc/doc/P10lppt13_html_html_html.html">P10lppt13_html_html.html</a>
97
+
98
+ <li class="file"><a href="../../doc/doc/doc/VectorDisperso_html_html_html.html">VectorDisperso_html_html.html</a>
99
+
100
+ <li class="file"><a href="../../doc/doc/doc/created_rid_html_html.html">created_rid_html.html</a>
101
+
102
+ <li class="file"><a href="../../doc/doc/doc/doc/created_rid_html_html_html.html">created_rid_html_html.html</a>
103
+
104
+ <li class="file"><a href="../../doc/doc/doc/fraccion_rb~_html_html_html.html">fraccion_rb~_html_html.html</a>
105
+
106
+ <li class="file"><a href="../../doc/doc/doc/index_html_html_html.html">index_html_html.html</a>
107
+
108
+ <li class="file"><a href="../../doc/doc/doc/js/darkfish_js_html_html.html">darkfish_js_html.html</a>
109
+
110
+ <li class="file"><a href="../../doc/doc/doc/js/jquery_js_html_html.html">jquery_js_html.html</a>
111
+
112
+ <li class="file"><a href="../../doc/doc/doc/js/navigation_js_html_html.html">navigation_js_html.html</a>
113
+
114
+ <li class="file"><a href="../../doc/doc/doc/js/search_index_js_html_html.html">search_index_js_html.html</a>
115
+
116
+ <li class="file"><a href="../../doc/doc/doc/js/search_js_html_html.html">search_js_html.html</a>
117
+
118
+ <li class="file"><a href="../../doc/doc/doc/js/searcher_js_html_html.html">searcher_js_html.html</a>
119
+
120
+ <li class="file"><a href="../../doc/doc/doc/rdoc_css_html_html.html">rdoc_css_html.html</a>
121
+
122
+ <li class="file"><a href="../../doc/doc/doc/table_of_contents_html_html_html.html">table_of_contents_html_html.html</a>
123
+
124
+ <li class="file"><a href="../../doc/doc/fraccion_rb~_html_html.html">fraccion_rb~_html.html</a>
125
+
126
+ <li class="file"><a href="../../doc/doc/index_html_html.html">index_html.html</a>
127
+
128
+ <li class="file"><a href="../../doc/doc/js/darkfish_js_html.html">darkfish_js.html</a>
129
+
130
+ <li class="file"><a href="../../doc/doc/js/jquery_js_html.html">jquery_js.html</a>
131
+
132
+ <li class="file"><a href="../../doc/doc/js/navigation_js_html.html">navigation_js.html</a>
133
+
134
+ <li class="file"><a href="../../doc/doc/js/search_index_js_html.html">search_index_js.html</a>
135
+
136
+ <li class="file"><a href="../../doc/doc/js/search_js_html.html">search_js.html</a>
137
+
138
+ <li class="file"><a href="../../doc/doc/js/searcher_js_html.html">searcher_js.html</a>
139
+
140
+ <li class="file"><a href="../../doc/doc/p10lppt13_rb~_html_html.html">p10lppt13_rb~_html.html</a>
141
+
142
+ <li class="file"><a href="../../doc/doc/rdoc_css_html.html">rdoc_css.html</a>
143
+
144
+ <li class="file"><a href="../../doc/doc/table_of_contents_html_html.html">table_of_contents_html.html</a>
145
+
146
+ <li class="file"><a href="../../doc/fraccion_rb~_html.html">fraccion_rb~.html</a>
147
+
148
+ <li class="file"><a href="../../doc/index_html.html">index.html</a>
149
+
150
+ <li class="file"><a href="../../doc/js/darkfish_js.html">darkfish.js</a>
151
+
152
+ <li class="file"><a href="../../doc/js/jquery_js.html">jquery.js</a>
153
+
154
+ <li class="file"><a href="../../doc/js/navigation_js.html">navigation.js</a>
155
+
156
+ <li class="file"><a href="../../doc/js/search_js.html">search.js</a>
157
+
158
+ <li class="file"><a href="../../doc/js/search_index_js.html">search_index.js</a>
159
+
160
+ <li class="file"><a href="../../doc/js/searcher_js.html">searcher.js</a>
161
+
162
+ <li class="file"><a href="../../doc/p10lppt13_rb~_html.html">p10lppt13_rb~.html</a>
163
+
164
+ <li class="file"><a href="../../doc/rdoc_css.html">rdoc.css</a>
165
+
166
+ <li class="file"><a href="../../doc/table_of_contents_html.html">table_of_contents.html</a>
167
+
168
+ <li class="file"><a href="../../fraccion_rb~.html">fraccion.rb~</a>
169
+
170
+ <li class="file"><a href="../../p10lppt13_rb~.html">p10lppt13.rb~</a>
171
+
172
+ </ul>
173
+ </nav>
174
+
175
+ <nav id="classindex-section" class="section project-section">
176
+ <h3 class="section-header">Class and Module Index</h3>
177
+
178
+ <ul class="link-list">
179
+
180
+ <li><a href="../../Densa.html">Densa</a>
181
+
182
+ <li><a href="../../Dispersa.html">Dispersa</a>
183
+
184
+ <li><a href="../../Fraccion.html">Fraccion</a>
185
+
186
+ <li><a href="../../Matriz.html">Matriz</a>
187
+
188
+ <li><a href="../../Object.html">Object</a>
189
+
190
+ <li><a href="../../P10lppt13.html">P10lppt13</a>
191
+
192
+ <li><a href="../../VectorDisperso.html">VectorDisperso</a>
193
+
194
+ </ul>
195
+ </nav>
196
+
197
+ </div>
198
+ </nav>
199
+
200
+ <div id="documentation" class="description">
201
+
202
+ <p>Search = function(data, input, result) {</p>
203
+
204
+ <pre>this.data = data;
205
+ this.$input = $(input);
206
+ this.$result = $(result);
207
+
208
+ this.$current = null;
209
+ this.$view = this.$result.parent();
210
+ this.searcher = new Searcher(data.index);
211
+ this.init();</pre>
212
+
213
+ <p>}</p>
214
+
215
+ <p>Search.prototype = $.extend({}, Navigation, new function() {</p>
216
+
217
+ <pre>var suid = 1;
218
+
219
+ this.init = function() {
220
+ var _this = this;
221
+ var observer = function() {
222
+ _this.search(_this.$input[0].value);
223
+ };
224
+ this.$input.keyup(observer);
225
+ this.$input.click(observer); // mac&#39;s clear field
226
+
227
+ this.searcher.ready(function(results, isLast) {
228
+ _this.addResults(results, isLast);
229
+ })
230
+
231
+ this.initNavigation();
232
+ this.setNavigationActive(false);
233
+ }
234
+
235
+ this.search = function(value, selectFirstMatch) {
236
+ value = jQuery.trim(value).toLowerCase();
237
+ if (value) {
238
+ this.setNavigationActive(true);
239
+ } else {
240
+ this.setNavigationActive(false);
241
+ }
242
+
243
+ if (value == &#39;&#39;) {
244
+ this.lastQuery = value;
245
+ this.$result.empty();
246
+ this.setNavigationActive(false);
247
+ } else if (value != this.lastQuery) {
248
+ this.lastQuery = value;
249
+ this.firstRun = true;
250
+ this.searcher.find(value);
251
+ }
252
+ }
253
+
254
+ this.addResults = function(results, isLast) {
255
+ var target = this.$result.get(0);
256
+ if (this.firstRun &amp;&amp; (results.length &gt; 0 || isLast)) {
257
+ this.$current = null;
258
+ this.$result.empty();
259
+ }
260
+
261
+ for (var i=0, l = results.length; i &lt; l; i++) {
262
+ target.appendChild(this.renderItem.call(this, results[i]));
263
+ };
264
+
265
+ if (this.firstRun &amp;&amp; results.length &gt; 0) {
266
+ this.firstRun = false;
267
+ this.$current = $(target.firstChild);
268
+ this.$current.addClass(&#39;current&#39;);
269
+ }
270
+ if (jQuery.browser.msie) this.$element[0].className += &#39;&#39;;
271
+ }
272
+
273
+ this.move = function(isDown) {
274
+ if (!this.$current) return;
275
+ var $next = this.$current[isDown ? &#39;next&#39; : &#39;prev&#39;]();
276
+ if ($next.length) {
277
+ this.$current.removeClass(&#39;current&#39;);
278
+ $next.addClass(&#39;current&#39;);
279
+ this.scrollIntoView($next[0], this.$view[0]);
280
+ this.$current = $next;
281
+ }
282
+ return true;
283
+ }
284
+
285
+ this.hlt = function(html) {
286
+ return this.escapeHTML(html).
287
+ replace(/\u0001/g, &#39;&lt;em&gt;&#39;).
288
+ replace(/\u0002/g, &#39;&lt;/em&gt;&#39;);
289
+ }
290
+
291
+ this.escapeHTML = function(html) {
292
+ return html.replace(/[&amp;&lt;&gt;]/g, function(c) {
293
+ return &#39;&amp;#&#39; + c.charCodeAt(0) + &#39;;&#39;;
294
+ });
295
+ }</pre>
296
+
297
+ <p>});</p>
298
+
299
+ </div>
300
+
301
+
302
+
303
+ <footer id="validator-badges">
304
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
305
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
306
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
307
+ </footer>
308
+
@@ -0,0 +1,441 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>searcher.js - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
21
+
22
+
23
+ <body class="file">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../../index.html">Home</a>
28
+ <a href="../../table_of_contents.html#classes">Classes</a>
29
+ <a href="../../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+
47
+
48
+ <div id="project-metadata">
49
+ <nav id="fileindex-section" class="section project-section">
50
+ <h3 class="section-header">Pages</h3>
51
+
52
+ <ul>
53
+
54
+ <li class="file"><a href="../../doc/Densa_html.html">Densa.html</a>
55
+
56
+ <li class="file"><a href="../../doc/Dispersa_html.html">Dispersa.html</a>
57
+
58
+ <li class="file"><a href="../../doc/Fraccion_html.html">Fraccion.html</a>
59
+
60
+ <li class="file"><a href="../../doc/Matriz_html.html">Matriz.html</a>
61
+
62
+ <li class="file"><a href="../../doc/Object_html.html">Object.html</a>
63
+
64
+ <li class="file"><a href="../../doc/P10lppt13_html.html">P10lppt13.html</a>
65
+
66
+ <li class="file"><a href="../../doc/VectorDisperso_html.html">VectorDisperso.html</a>
67
+
68
+ <li class="file"><a href="../../doc/created_rid.html">created.rid</a>
69
+
70
+ <li class="file"><a href="../../doc/doc/Densa_html_html.html">Densa_html.html</a>
71
+
72
+ <li class="file"><a href="../../doc/doc/Dispersa_html_html.html">Dispersa_html.html</a>
73
+
74
+ <li class="file"><a href="../../doc/doc/Fraccion_html_html.html">Fraccion_html.html</a>
75
+
76
+ <li class="file"><a href="../../doc/doc/Matriz_html_html.html">Matriz_html.html</a>
77
+
78
+ <li class="file"><a href="../../doc/doc/Object_html_html.html">Object_html.html</a>
79
+
80
+ <li class="file"><a href="../../doc/doc/P10lppt13_html_html.html">P10lppt13_html.html</a>
81
+
82
+ <li class="file"><a href="../../doc/doc/VectorDisperso_html_html.html">VectorDisperso_html.html</a>
83
+
84
+ <li class="file"><a href="../../doc/doc/created_rid_html.html">created_rid.html</a>
85
+
86
+ <li class="file"><a href="../../doc/doc/doc/Densa_html_html_html.html">Densa_html_html.html</a>
87
+
88
+ <li class="file"><a href="../../doc/doc/doc/Dispersa_html_html_html.html">Dispersa_html_html.html</a>
89
+
90
+ <li class="file"><a href="../../doc/doc/doc/Fraccion_html_html_html.html">Fraccion_html_html.html</a>
91
+
92
+ <li class="file"><a href="../../doc/doc/doc/Matriz_html_html_html.html">Matriz_html_html.html</a>
93
+
94
+ <li class="file"><a href="../../doc/doc/doc/Object_html_html_html.html">Object_html_html.html</a>
95
+
96
+ <li class="file"><a href="../../doc/doc/doc/P10lppt13_html_html_html.html">P10lppt13_html_html.html</a>
97
+
98
+ <li class="file"><a href="../../doc/doc/doc/VectorDisperso_html_html_html.html">VectorDisperso_html_html.html</a>
99
+
100
+ <li class="file"><a href="../../doc/doc/doc/created_rid_html_html.html">created_rid_html.html</a>
101
+
102
+ <li class="file"><a href="../../doc/doc/doc/doc/created_rid_html_html_html.html">created_rid_html_html.html</a>
103
+
104
+ <li class="file"><a href="../../doc/doc/doc/fraccion_rb~_html_html_html.html">fraccion_rb~_html_html.html</a>
105
+
106
+ <li class="file"><a href="../../doc/doc/doc/index_html_html_html.html">index_html_html.html</a>
107
+
108
+ <li class="file"><a href="../../doc/doc/doc/js/darkfish_js_html_html.html">darkfish_js_html.html</a>
109
+
110
+ <li class="file"><a href="../../doc/doc/doc/js/jquery_js_html_html.html">jquery_js_html.html</a>
111
+
112
+ <li class="file"><a href="../../doc/doc/doc/js/navigation_js_html_html.html">navigation_js_html.html</a>
113
+
114
+ <li class="file"><a href="../../doc/doc/doc/js/search_index_js_html_html.html">search_index_js_html.html</a>
115
+
116
+ <li class="file"><a href="../../doc/doc/doc/js/search_js_html_html.html">search_js_html.html</a>
117
+
118
+ <li class="file"><a href="../../doc/doc/doc/js/searcher_js_html_html.html">searcher_js_html.html</a>
119
+
120
+ <li class="file"><a href="../../doc/doc/doc/rdoc_css_html_html.html">rdoc_css_html.html</a>
121
+
122
+ <li class="file"><a href="../../doc/doc/doc/table_of_contents_html_html_html.html">table_of_contents_html_html.html</a>
123
+
124
+ <li class="file"><a href="../../doc/doc/fraccion_rb~_html_html.html">fraccion_rb~_html.html</a>
125
+
126
+ <li class="file"><a href="../../doc/doc/index_html_html.html">index_html.html</a>
127
+
128
+ <li class="file"><a href="../../doc/doc/js/darkfish_js_html.html">darkfish_js.html</a>
129
+
130
+ <li class="file"><a href="../../doc/doc/js/jquery_js_html.html">jquery_js.html</a>
131
+
132
+ <li class="file"><a href="../../doc/doc/js/navigation_js_html.html">navigation_js.html</a>
133
+
134
+ <li class="file"><a href="../../doc/doc/js/search_index_js_html.html">search_index_js.html</a>
135
+
136
+ <li class="file"><a href="../../doc/doc/js/search_js_html.html">search_js.html</a>
137
+
138
+ <li class="file"><a href="../../doc/doc/js/searcher_js_html.html">searcher_js.html</a>
139
+
140
+ <li class="file"><a href="../../doc/doc/p10lppt13_rb~_html_html.html">p10lppt13_rb~_html.html</a>
141
+
142
+ <li class="file"><a href="../../doc/doc/rdoc_css_html.html">rdoc_css.html</a>
143
+
144
+ <li class="file"><a href="../../doc/doc/table_of_contents_html_html.html">table_of_contents_html.html</a>
145
+
146
+ <li class="file"><a href="../../doc/fraccion_rb~_html.html">fraccion_rb~.html</a>
147
+
148
+ <li class="file"><a href="../../doc/index_html.html">index.html</a>
149
+
150
+ <li class="file"><a href="../../doc/js/darkfish_js.html">darkfish.js</a>
151
+
152
+ <li class="file"><a href="../../doc/js/jquery_js.html">jquery.js</a>
153
+
154
+ <li class="file"><a href="../../doc/js/navigation_js.html">navigation.js</a>
155
+
156
+ <li class="file"><a href="../../doc/js/search_js.html">search.js</a>
157
+
158
+ <li class="file"><a href="../../doc/js/search_index_js.html">search_index.js</a>
159
+
160
+ <li class="file"><a href="../../doc/js/searcher_js.html">searcher.js</a>
161
+
162
+ <li class="file"><a href="../../doc/p10lppt13_rb~_html.html">p10lppt13_rb~.html</a>
163
+
164
+ <li class="file"><a href="../../doc/rdoc_css.html">rdoc.css</a>
165
+
166
+ <li class="file"><a href="../../doc/table_of_contents_html.html">table_of_contents.html</a>
167
+
168
+ <li class="file"><a href="../../fraccion_rb~.html">fraccion.rb~</a>
169
+
170
+ <li class="file"><a href="../../p10lppt13_rb~.html">p10lppt13.rb~</a>
171
+
172
+ </ul>
173
+ </nav>
174
+
175
+ <nav id="classindex-section" class="section project-section">
176
+ <h3 class="section-header">Class and Module Index</h3>
177
+
178
+ <ul class="link-list">
179
+
180
+ <li><a href="../../Densa.html">Densa</a>
181
+
182
+ <li><a href="../../Dispersa.html">Dispersa</a>
183
+
184
+ <li><a href="../../Fraccion.html">Fraccion</a>
185
+
186
+ <li><a href="../../Matriz.html">Matriz</a>
187
+
188
+ <li><a href="../../Object.html">Object</a>
189
+
190
+ <li><a href="../../P10lppt13.html">P10lppt13</a>
191
+
192
+ <li><a href="../../VectorDisperso.html">VectorDisperso</a>
193
+
194
+ </ul>
195
+ </nav>
196
+
197
+ </div>
198
+ </nav>
199
+
200
+ <div id="documentation" class="description">
201
+
202
+ <p>Searcher = function(data) {</p>
203
+
204
+ <pre>this.data = data;
205
+ this.handlers = [];</pre>
206
+
207
+ <p>}</p>
208
+
209
+ <p>Searcher.prototype = new function() {</p>
210
+
211
+ <pre>// search is performed in chunks of 1000 for non-blocking user input
212
+ var CHUNK_SIZE = 1000;
213
+ // do not try to find more than 100 results
214
+ var MAX_RESULTS = 100;
215
+ var huid = 1;
216
+ var suid = 1;
217
+ var runs = 0;
218
+
219
+ this.find = function(query) {
220
+ var queries = splitQuery(query);
221
+ var regexps = buildRegexps(queries);
222
+ var highlighters = buildHilighters(queries);
223
+ var state = { from: 0, pass: 0, limit: MAX_RESULTS, n: suid++};
224
+ var _this = this;
225
+
226
+ this.currentSuid = state.n;
227
+
228
+ if (!query) return;
229
+
230
+ var run = function() {
231
+ // stop current search thread if new search started
232
+ if (state.n != _this.currentSuid) return;
233
+
234
+ var results =
235
+ performSearch(_this.data, regexps, queries, highlighters, state);
236
+ var hasMore = (state.limit &gt; 0 &amp;&amp; state.pass &lt; 4);
237
+
238
+ triggerResults.call(_this, results, !hasMore);
239
+ if (hasMore) {
240
+ setTimeout(run, 2);
241
+ }
242
+ runs++;
243
+ };
244
+ runs = 0;
245
+
246
+ // start search thread
247
+ run();
248
+ }
249
+
250
+ ----- Events ------
251
+ this.ready = function(fn) {
252
+ fn.huid = huid;
253
+ this.handlers.push(fn);
254
+ }
255
+
256
+ ----- Utilities ------
257
+ function splitQuery(query) {
258
+ return jQuery.grep(query.split(/(\s+|::?|\(\)?)/), function(string) {
259
+ return string.match(/\S/)
260
+ });
261
+ }
262
+
263
+ function buildRegexps(queries) {
264
+ return jQuery.map(queries, function(query) {
265
+ return new RegExp(query.replace(/(.)/g, &#39;([$1])([^$1]*?)&#39;), &#39;i&#39;)
266
+ });
267
+ }
268
+
269
+ function buildHilighters(queries) {
270
+ return jQuery.map(queries, function(query) {
271
+ return jQuery.map(query.split(&#39;&#39;), function(l, i) {
272
+ return &#39;\u0001$&#39; + (i*2+1) + &#39;\u0002$&#39; + (i*2+2);
273
+ }).join(&#39;&#39;);
274
+ });
275
+ }
276
+
277
+ // function longMatchRegexp(index, longIndex, regexps) {
278
+ // for (var i = regexps.length - 1; i &gt;= 0; i--){
279
+ // if (!index.match(regexps[i]) &amp;&amp; !longIndex.match(regexps[i])) return false;
280
+ // };
281
+ // return true;
282
+ // }
283
+
284
+ /* ----- Mathchers ------ */
285
+
286
+ /*
287
+ This record matches if the index starts with queries[0] and the record
288
+ matches all of the regexps
289
+ /
290
+ function matchPassBeginning(index, longIndex, queries, regexps) {
291
+ if (index.indexOf(queries[0]) != 0) return false;
292
+ for (var i=1, l = regexps.length; i &lt; l; i++) {
293
+ if (!index.match(regexps[i]) &amp;&amp; !longIndex.match(regexps[i]))
294
+ return false;
295
+ };
296
+ return true;
297
+ }
298
+
299
+ /*
300
+ This record matches if the longIndex starts with queries[0] and the
301
+ longIndex matches all of the regexps
302
+ /
303
+ function matchPassLongIndex(index, longIndex, queries, regexps) {
304
+ if (longIndex.indexOf(queries[0]) != 0) return false;
305
+ for (var i=1, l = regexps.length; i &lt; l; i++) {
306
+ if (!longIndex.match(regexps[i]))
307
+ return false;
308
+ };
309
+ return true;
310
+ }
311
+
312
+ /*
313
+ This record matches if the index contains queries[0] and the record
314
+ matches all of the regexps
315
+ /
316
+ function matchPassContains(index, longIndex, queries, regexps) {
317
+ if (index.indexOf(queries[0]) == -1) return false;
318
+ for (var i=1, l = regexps.length; i &lt; l; i++) {
319
+ if (!index.match(regexps[i]) &amp;&amp; !longIndex.match(regexps[i]))
320
+ return false;
321
+ };
322
+ return true;
323
+ }
324
+
325
+ /*
326
+ This record matches if regexps[0] matches the index and the record
327
+ matches all of the regexps
328
+ /
329
+ function matchPassRegexp(index, longIndex, queries, regexps) {
330
+ if (!index.match(regexps[0])) return false;
331
+ for (var i=1, l = regexps.length; i &lt; l; i++) {
332
+ if (!index.match(regexps[i]) &amp;&amp; !longIndex.match(regexps[i]))
333
+ return false;
334
+ };
335
+ return true;
336
+ }
337
+
338
+ /* ----- Highlighters ------ */
339
+ function highlightRegexp(info, queries, regexps, highlighters) {
340
+ var result = createResult(info);
341
+ for (var i=0, l = regexps.length; i &lt; l; i++) {
342
+ result.title = result.title.replace(regexps[i], highlighters[i]);
343
+ result.namespace = result.namespace.replace(regexps[i], highlighters[i]);
344
+ };
345
+ return result;
346
+ }
347
+
348
+ function hltSubstring(string, pos, length) {
349
+ return string.substring(0, pos) + &#39;\u0001&#39; + string.substring(pos, pos + length) + &#39;\u0002&#39; + string.substring(pos + length);
350
+ }
351
+
352
+ function highlightQuery(info, queries, regexps, highlighters) {
353
+ var result = createResult(info);
354
+ var pos = 0;
355
+ var lcTitle = result.title.toLowerCase();
356
+
357
+ pos = lcTitle.indexOf(queries[0]);
358
+ if (pos != -1) {
359
+ result.title = hltSubstring(result.title, pos, queries[0].length);
360
+ }
361
+
362
+ result.namespace = result.namespace.replace(regexps[0], highlighters[0]);
363
+ for (var i=1, l = regexps.length; i &lt; l; i++) {
364
+ result.title = result.title.replace(regexps[i], highlighters[i]);
365
+ result.namespace = result.namespace.replace(regexps[i], highlighters[i]);
366
+ };
367
+ return result;
368
+ }
369
+
370
+ function createResult(info) {
371
+ var result = {};
372
+ result.title = info[0];
373
+ result.namespace = info[1];
374
+ result.path = info[2];
375
+ result.params = info[3];
376
+ result.snippet = info[4];
377
+ return result;
378
+ }
379
+
380
+ /* ----- Searching ------ */
381
+ function performSearch(data, regexps, queries, highlighters, state) {
382
+ var searchIndex = data.searchIndex;
383
+ var longSearchIndex = data.longSearchIndex;
384
+ var info = data.info;
385
+ var result = [];
386
+ var i = state.from;
387
+ var l = searchIndex.length;
388
+ var togo = CHUNK_SIZE;
389
+ var matchFunc, hltFunc;
390
+
391
+ while (state.pass &lt; 4 &amp;&amp; state.limit &gt; 0 &amp;&amp; togo &gt; 0) {
392
+ if (state.pass == 0) {
393
+ matchFunc = matchPassBeginning;
394
+ hltFunc = highlightQuery;
395
+ } else if (state.pass == 1) {
396
+ matchFunc = matchPassLongIndex;
397
+ hltFunc = highlightQuery;
398
+ } else if (state.pass == 2) {
399
+ matchFunc = matchPassContains;
400
+ hltFunc = highlightQuery;
401
+ } else if (state.pass == 3) {
402
+ matchFunc = matchPassRegexp;
403
+ hltFunc = highlightRegexp;
404
+ }
405
+
406
+ for (; togo &gt; 0 &amp;&amp; i &lt; l &amp;&amp; state.limit &gt; 0; i++, togo--) {
407
+ if (info[i].n == state.n) continue;
408
+ if (matchFunc(searchIndex[i], longSearchIndex[i], queries, regexps)) {
409
+ info[i].n = state.n;
410
+ result.push(hltFunc(info[i], queries, regexps, highlighters));
411
+ state.limit--;
412
+ }
413
+ };
414
+ if (searchIndex.length &lt;= i) {
415
+ state.pass++;
416
+ i = state.from = 0;
417
+ } else {
418
+ state.from = i;
419
+ }
420
+ }
421
+ return result;
422
+ }
423
+
424
+ function triggerResults(results, isLast) {
425
+ jQuery.each(this.handlers, function(i, fn) {
426
+ fn.call(this, results, isLast)
427
+ })
428
+ }</pre>
429
+
430
+ <p>}</p>
431
+
432
+ </div>
433
+
434
+
435
+
436
+ <footer id="validator-badges">
437
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
438
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
439
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
440
+ </footer>
441
+