-
Notifications
You must be signed in to change notification settings - Fork 4
/
FEATURES.html
535 lines (510 loc) · 34.8 KB
/
FEATURES.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
<!--A table to show wtf I have completed, etc. For every function that I try to port, there are several tasks to check off. This is that.-->
<html>
<head>
<script type="text/javascript" src="http://extjs-public.googlecode.com/svn/tags/extjs-3.2.1/release/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="http://extjs-public.googlecode.com/svn/tags/extjs-3.2.1/release/ext-all.js"></script>
<link rel="stylesheet" href="http://extjs-public.googlecode.com/svn/tags/extjs-3.2.1/release/resources/css/ext-all.css"></script>
<style>
body {
padding: 32px;
}
.x-grid3-row-unimplemented {
background-color: #FAB;
}
#mpz-grid {
margin-bottom: 32px;
}
#mpzfm-grid {
margin-bottom: 32px;
}
#mpq-grid {
margin-bottom: 32px;
}
#mpf-grid {
margin-bottom: 32px;
}
</style>
<script>
/*!
* Ext JS Library 3.2.1
* Copyright(c) 2006-2010 Ext JS, Inc.
* http://www.extjs.com/license
*/
Ext.onReady(function(){
// NOTE: This is an example showing simple state management. During development,
// it is generally best to disable state management as dynamically-generated ids
// can change across page loads, leading to unpredictable results. The developer
// should ensure that stable state ids are set for stateful components in real apps.
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
var mpzData = [
/* method, function, manual, yard, testB, testO */
['GMP::Z.new', "mpz_init", "yes","yes","yes", "no"],
['GMP::Z#swap', "mpz_swap", "","yes","yes", "no"],
['GMP::Z#to_i', "mpz_get_si", "yes","yes","yes", "no"],
['GMP::Z#to_d', "mpz_get_d", "yes","yes","yes", "no"],
['', "mpz_get_d_2exp", "no", "no", "no", "no"],
['GMP::Z#to_s', "mpz_get_str", "yes","yes","yes", "no"],
['GMP::Z#+<br />GMP::Z#add!', "mpz_add<br />mpz_add_ui<br />mpz_sub_ui", "yes","yes","yes", "no"],
['GMP::Z#-<br />GMP::Z#sub!', "mpz_sub<br />mpz_sub_ui<br />mpz_add_ui", "yes","yes","yes", "no"],
['GMP::Z#*', "mpz_mul<br />mpz_mul_si", "yes","yes","yes", "no"],
['GMP::Z#addmul!', "mpz_addmul<br />mpz_addmul_ui", "yes","yes","yes", "no"],
['GMP::Z#submul!', "mpz_submul<br />mpz_submul_ui", "yes","yes","yes", "no"],
['GMP::Z#<<', "mpz_mul_2exp", "yes","yes", "", "no"],
['GMP::Z#-@<br />' +
'GMP::Z#neg<br />GMP::Z#neg!', "mpz_neg", "yes","yes", "", "no"],
['GMP::Z#abs<br />GMP::Z#abs!', "mpz_abs", "yes","yes", "", "no"],
['GMP::Z#/', "mpz_divexact<br />...", "no","yes","yes", "no"],
['GMP::Z#tdiv', "mpz_tdiv_q", "yes","yes","yes", "no"],
['GMP::Z#tmod', "mpz_tdiv_r", "yes","yes","yes", "no"],
['GMP::Z#tdivmod', "mpz_tdiv_qr", "no", "no", "no", "no"],
['GMP::Z#tshr', "mpz_tdiv_q_2exp", "","yes", "no", "no"],
['GMP::Z#tshrm', "mpz_tdiv_r_2exp", "", "no", "no", "no"],
['GMP::Z#fdiv', "mpz_fdiv_q", "yes","yes","yes", "no"],
['GMP::Z#fmod', "mpz_fdiv_r", "yes","yes","yes", "no"],
['GMP::Z#fdivmod', "mpz_fdiv_rq", "no", "no", "no", "no"],
['GMP::Z#fshr', "mpz_fdiv_q_2exp", "", "no", "no", "no"],
['GMP::Z#fshrm', "mpz_fdiv_r_2exp", "", "no", "no", "no"],
['GMP::Z#cdiv', "mpz_cdiv_q", "yes","yes","yes", "no"],
['GMP::Z#cmod', "mpz_cdiv_r", "yes","yes","yes", "no"],
['GMP::Z#cdivmod', "mpz_cdiv_qr", "no", "no", "no", "no"],
['', "mpz_cdiv_q_2exp", "no", "no", "no", "no"],
['', "mpz_cdiv_r_2exp", "no", "no", "no", "no"],
['GMP::Z#%', "mpz_mod<br />mpz_mod_ui", "yes","yes", "", "no"],
['GMP::Z#divisible?', "mpz_divisible_p<br />mpz_divisible_ui_p", "yes","yes","yes", "no"],
['', "mpz_divisible_2exp_p", "no", "no", "no", "no"],
['', "mpz_congruent_p<br />mpz_congruent_ui_p", "no", "no", "no", "no"],
['', "mpz_congruent_2exp_p", "no", "no", "no", "no"],
['GMP::Z#**<br />GMP::Z.pow', "mpz_pow_ui", "yes","yes", "", "no"],
['GMP::Z#powmod', "mpz_powm<br />mpz_powm_ui", "yes","yes", "", "no"],
['GMP::Z#root', "mpz_root", "yes","yes", "", "no"],
['', "mpz_rootrem", "no", "no", "no", "no"],
['GMP::Z#sqrt<br />GMP::Z#sqrt!', "mpz_sqrt", "yes","yes", "", "no"],
['GMP::Z#sqrtrem', "mpz_sqrtrem", "yes","yes", "", "no"],
['GMP::Z#power?', "mpz_perfect_power_p", "yes","yes", "", "no"],
['GMP::Z#square?', "mpz_perfect_square_p", "yes","yes", "", "no"],
['GMP::Z#probab_prime?', "mpz_probab_prime_p", "yes","yes", "", "no"],
['GMP::Z#next_prime<br />' +
'GMP::Z#next_prime!', "mpz_nextprime", "yes","yes", "", "no"],
['GMP::Z#gcd', "mpz_gcd<br />mpz_gcd_ui", "yes","yes", "", "no"],
['GMP::Z#gcdext', "mpz_gcdext", "yes","yes", "", "no"],
['', "mpz_lcm<br />mpz_lcm_ui", "no", "no", "no", "no"],
['GMP::Z#invert', "mpz_invert", "yes","yes", "", "no"],
['GMP::Z#jacobi<br />GMP::Z.jacobi',"mpz_jacobi", "yes","yes", "", "no"],
['GMP::Z#legendre', "mpz_legendre", "yes","yes", "", "no"],
['', "mpz_kronecker<br />mpz_kronecker_si<br />" +
"mpz_kronecker_ui<br />mpz_si_kronecker" +
"<br />mpz_ui_kronecker", "yes","yes", "", "no"],
['GMP::Z#remove', "mpz_remove", "yes","yes", "", "no"],
['GMP::Z.fac', "mpz_fac_ui", "yes","yes", "", "no"],
['', "mpz_bin_ui<br />mpz_bin_uiui", "no", "no", "no", "no"],
['GMP::Z.fib', "mpz_fib_ui", "yes","yes","yes", "no"],
['GMP::Z.fib2', "mpz_fib2_ui", "yes","yes","yes", "no"],
['', "mpz_lucnum_ui", "no", "no", "no", "no"],
['', "mpz_lucnum2_ui", "no", "no", "no", "no"],
['GMP::Z#==<br />GMP::Z#<=><br />' +
'GMP::Z#<<br />GMP::Z#<=<br />' +
'GMP::Z#><br />GMP::Z#>=', "mpz_cmp<br />mpz_cmp_si<br />mpz_cmp_ui", "yes","yes", "", "no"],
['GMP::Z#cmpabs', "mpz_cmpabs", "yes","yes", "", "no"],
['GMP::Z#sgn', "mpz_sgn", "yes","yes", "", "no"],
['GMP::Z#eql?', "mpz_get_str", "yes","yes", "","n/a"],
['GMP::Z#hash', "mpz_get_str", "yes","yes", "","n/a"],
['GMP::Z#&', "mpz_and", "yes","yes", "", "no"],
['GMP::Z#|', "mpz_ior", "yes","yes", "", "no"],
['GMP::Z#^', "mpz_xor", "yes","yes", "", "no"],
['GMP::Z#com<br />GMP::Z#com!', "mpz_com", "yes","yes", "", "no"],
['GMP::Z#popcount', "mpz_popcount", "yes","yes", "", "no"],
['', "mpz_hamdist", "no", "no", "no", "no"],
['GMP::Z#scan0', "mpz_scan0", "yes","yes", "", "no"],
['GMP::Z#scan1', "mpz_scan1", "yes","yes", "", "no"],
['GMP::Z#[]=', "mpz_setbit<br />mpz_clrbit", "yes","yes", "", "no"],
['', "mpz_combit", "no", "no", "no", "no"],
['GMP::Z#[]', "mpz_tstbit", "yes","yes", "", "no"],
['', "mpz_fits_ulong_p", "no", "no", "no", "no"],
['', "mpz_fits_slong_p", "no", "no", "no", "no"],
['', "mpz_fits_uint_p", "no", "no", "no", "no"],
['', "mpz_fits_sint_p", "no", "no", "no", "no"],
['', "mpz_fits_ushort_p", "no", "no", "no", "no"],
['', "mpz_fits_sshort_p", "no", "no", "no", "no"],
['GMP::Z#even?', "mpz_even_p", "yes","yes", "", "no"],
['GMP::Z#odd?', "mpz_odd_p", "yes","yes", "", "no"],
['GMP::Z#sizeinbase<br />' +
'GMP::Z#size_in_base', "mpz_sizeinbase", "yes","yes", "", "no"],
['GMP::Z#size_in_bin', "mpz_sizeinbase", "yes","yes", "", "no"],
['GMP::Z#size', "mpz_size", "yes","yes", "", "no"]
];
var mpzFmData = [
/* method, function, manual, yard, testB, testO */
//['GMP::Z#swap', "mpz_swap", "","yes","yes", "no"],
//['GMP::Z#to_i', "mpz_get_si", "yes","yes","yes", "no"],
//['GMP::Z#to_d', "mpz_get_d", "yes","yes","yes", "no"],
//['', "mpz_get_d_2exp", "no", "no", "no", "no"],
//['GMP::Z#to_s', "mpz_get_str", "yes","yes","yes", "no"],
['GMP::Z.add', "mpz_add<br />mpz_add_ui", "no", "no", "no", "no"],
['GMP::Z.sub', "mpz_sub<br />mpz_sub_ui<br />mpz_ui_sub", "no", "no", "no", "no"],
['GMP::Z.mul', "mpz_mul<br />mpz_mul_si<br />mpz_mul_ui", "no", "no", "no", "no"],
['GMP::Z.addmul', "mpz_addmul<br />mpz_addmul_ui", "no", "no", "no", "no"],
['GMP::Z.submul', "mpz_submul<br />mpz_submul_ui", "no", "no", "no", "no"],
['GMP::Z.mul_2exp', "mpz_mul_2exp", "no", "no", "no", "no"],
['GMP::Z.neg', "mpz_neg", "no", "no", "no", "no"],
['GMP::Z.abs', "mpz_abs", "no", "no", "no", "no"],
['GMP::Z.divexact', "mpz_divexact<br />mpz_divexact_ui", "no", "no", "no", "no"],
['', "mpz_tdiv_q", "no", "no", "no", "no"],
['', "mpz_tdiv_r", "no", "no", "no", "no"],
['', "mpz_tdiv_qr", "no", "no", "no", "no"],
['GMP::Z.tdiv_q_2exp', "mpz_tdiv_q_2exp", "no", "no", "no", "no"],
['GMP::Z.tdiv_r_2exp', "mpz_tdiv_r_2exp", "no", "no", "no", "no"],
['', "mpz_fdiv_q", "no", "no", "no", "no"],
['', "mpz_fdiv_r", "no", "no", "no", "no"],
['', "mpz_fdiv_rq", "no", "no", "no", "no"],
['GMP::Z.fdiv_q_2exp', "mpz_fdiv_q_2exp", "no", "no", "no", "no"],
['GMP::Z.fdiv_r_2exp', "mpz_fdiv_r_2exp", "no", "no", "no", "no"],
/*['GMP::Z#cdiv', "mpz_cdiv_q", "yes","yes","yes", "no"],
['GMP::Z#cmod', "mpz_cdiv_r", "yes","yes","yes", "no"],
['GMP::Z#cdivmod', "mpz_cdiv_qr", "no", "no", "no", "no"],*/
['GMP::Z.cdiv_q_2exp', "mpz_cdiv_q_2exp", "no", "no", "no", "no"],
['GMP::Z.fdiv_r_2exp', "mpz_cdiv_r_2exp", "no", "no", "no", "no"],
/*['GMP::Z#%', "mpz_mod<br />mpz_mod_ui", "yes","yes", "", "no"],*/
['GMP::Z.divisible?', "mpz_divisible_p<br />mpz_divisible_ui_p", "no", "no", "no", "no"],
/*['', "mpz_divisible_2exp_p", "no", "no", "no", "no"],*/
['GMP::Z.congruent?', "mpz_congruent_p<br />mpz_congruent_ui_p", "no", "no", "no", "no"],
/*['', "mpz_congruent_2exp_p", "no", "no", "no", "no"],
['GMP::Z#**<br />GMP::Z.pow', "mpz_pow_ui", "yes","yes", "", "no"],
['GMP::Z#powmod', "mpz_powm<br />mpz_powm_ui", "yes","yes", "", "no"],
['GMP::Z#root', "mpz_root", "yes","yes", "", "no"],
['', "mpz_rootrem", "no", "no", "no", "no"],*/
['GMP::Z.sqrt', "mpz_sqrt", "no", "no", "no", "no"],
['', "mpz_sqrtrem", "no", "no", "no", "no"],
['', "mpz_perfect_power_p", "no", "no", "no", "no"],
['', "mpz_perfect_square_p", "no", "no", "no", "no"],
['', "mpz_probab_prime_p", "no", "no", "no", "no"],
['GMP::Z.nextprime', "mpz_nextprime", "no", "no", "no", "no"],
['', "mpz_gcd<br />mpz_gcd_ui", "no", "no", "no", "no"],
['', "mpz_gcdext", "no", "no", "no", "no"],
['GMP::Z.lcm', "mpz_lcm<br />mpz_lcm_ui", "no", "no", "no", "no"],
['', "mpz_invert", "no", "no", "no", "no"],
['', "mpz_jacobi", "no", "no", "no", "no"],
['', "mpz_legendre", "no", "no", "no", "no"],
/*['', "mpz_kronecker<br />mpz_kronecker_si<br />" +
"mpz_kronecker_ui<br />mpz_si_kronecker" +
"<br />mpz_ui_kronecker", "yes","yes", "", "no"],
['GMP::Z#remove', "mpz_remove", "yes","yes", "", "no"],
['GMP::Z.fac', "mpz_fac_ui", "yes","yes", "", "no"],
['', "mpz_bin_ui<br />mpz_bin_uiui", "no", "no", "no", "no"],
['GMP::Z.fib', "mpz_fib_ui", "yes","yes","yes", "no"],
['GMP::Z.fib2', "mpz_fib2_ui", "yes","yes","yes", "no"],
['', "mpz_lucnum_ui", "no", "no", "no", "no"],
['', "mpz_lucnum2_ui", "no", "no", "no", "no"],
['GMP::Z#==<br />GMP::Z#<=><br />' +
'GMP::Z#<<br />GMP::Z#<=<br />' +
'GMP::Z#><br />GMP::Z#>=', "mpz_cmp<br />mpz_cmp_si<br />mpz_cmp_ui", "yes","yes", "", "no"],
['GMP::Z#cmpabs', "mpz_cmpabs", "yes","yes", "", "no"],
['GMP::Z#sgn', "mpz_sgn", "yes","yes", "", "no"],
['GMP::Z#eql?', "mpz_get_str", "no","yes", "","n/a"],
['GMP::Z#hash', "mpz_get_str", "no","yes", "","n/a"],
['GMP::Z#&', "mpz_and", "yes","yes", "", "no"],
['GMP::Z#|', "mpz_ior", "yes","yes", "", "no"],
['GMP::Z#^', "mpz_xor", "yes","yes", "", "no"],*/
['GMP::Z.com', "mpz_com", "no", "no", "no", "no"],
/*['GMP::Z#popcount', "mpz_popcount", "yes","yes", "", "no"],
['', "mpz_hamdist", "no", "no", "no", "no"],
['GMP::Z#scan0', "mpz_scan0", "yes","yes", "", "no"],
['GMP::Z#scan1', "mpz_scan1", "yes","yes", "", "no"],
['GMP::Z#[]=', "mpz_setbit<br />mpz_clrbit", "yes","yes", "", "no"],
['', "mpz_combit", "no", "no", "no", "no"],
['GMP::Z#[]', "mpz_tstbit", "yes","yes", "", "no"],*/
['', "mpz_fits_ulong_p", "no", "no", "no", "no"],
['', "mpz_fits_slong_p", "no", "no", "no", "no"],
['', "mpz_fits_uint_p", "no", "no", "no", "no"],
['', "mpz_fits_sint_p", "no", "no", "no", "no"],
['', "mpz_fits_ushort_p", "no", "no", "no", "no"],
['', "mpz_fits_sshort_p", "no", "no", "no", "no"],
/*['GMP::Z#even?', "mpz_even_p", "yes","yes", "", "no"],
['GMP::Z#odd?', "mpz_odd_p", "yes","yes", "", "no"],
['GMP::Z#sizeinbase<br />' +
'GMP::Z#size_in_base', "mpz_sizeinbase", "yes","yes", "", "no"],
['GMP::Z#size_in_bin', "mpz_sizeinbase", "yes","yes", "", "no"],
['GMP::Z#size', "mpz_size", "yes","yes", "", "no"]*/
];
var mpqData = [
/* method, function, manual, yard, testB, testO */
['GMP::Q.new', "mpq_init", "","yes","yes", "no"],
['GMP::Q#swap', "mpq_swap", "","yes", "", "no"],
['GMP::Q#to_d', "mpq_get_d", "yes","yes", "", "no"],
['GMP::Q#to_s', "mpq_get_str", "yes","yes","yes", "no"],
['GMP::Q#+', "mpq_add", "no","yes", "", "no"],
['GMP::Q#-', "mpq_sub", "no","yes", "", "no"],
['GMP::Q#*', "mpq_mul", "no","yes", "", "no"],
['', "mpq_mul_2exp", "no", "no", "no", "no"],
['GMP::Q#/', "mpq_div", "no","yes", "", "no"],
['', "mpq_div_2exp", "no", "no", "no", "no"],
['GMP::Q#-@<br />' +
'GMP::Q#neg<br />GMP::Q#neg!', "mpq_neg", "no","yes","yes", "no"],
['GMP::Q#abs<br />GMP::Q#abs!', "mpq_abs", "no","yes","yes", "no"],
['GMP::Q#inv<br />GMP::Q#inv!', "mpq_inv", "no","yes","yes", "no"],
['GMP::Q#==<br />GMP::Q#<=><br />' +
'GMP::Q#<<br />GMP::Q#<=<br />' +
'GMP::Q#><br />GMP::Q#>=', "mpq_cmp<br />mpq_cmp_si<br />mpq_cmp_ui", "no", "no", "", "no"],
['GMP::Q#cmpabs', "mpq_cmpabs", "no", "no", "", "no"],
['GMP::Q#sgn', "mpq_sgn", "no","yes", "", "no"],
['GMP::Q#num', "mpq_get_num", "no", "no", "no", "no"],
['GMP::Q#den', "mpq_get_den", "no", "no", "no", "no"],
['', "mpq_set_num", "no", "no", "no", "no"],
['', "mpq_set_den", "no", "no", "no", "no"]
];
var mpfData = [
/* method, function, manual, yard, testB, testO */
['GMP::F.new', "mpq_init", "no", "","yes", "no"],
['', "mpf_swap", "no", "no", "no", "no"],
['GMP::F#to_d', "mpf_get_d", "no","yes", "", "no"],
['GMP::F#to_s', "mpf_get_str", "no","yes", "", "no"],
['GMP::F#+', "mpf_add", "no","yes", "", "no"],
['GMP::F#-', "mpf_sub", "no","yes", "", "no"],
['GMP::F#*', "mpf_mul", "no","yes", "", "no"],
['GMP::F#/', "mpf_div", "no","yes", "", "no"],
['GMP::F#-@<br />' +
'GMP::F#neg<br />GMP::F#neg!', "mpf_neg", "no","yes", "", "no"],
['GMP::F#abs<br />GMP::F#abs!', "mpf_abs", "no","yes", "", "no"],
['GMP::F#==<br />GMP::F#<=><br />' +
'GMP::F#<<br />GMP::F#<=<br />' +
'GMP::F#><br />GMP::F#>=', "mpf_cmp<br />mpf_cmp_si<br />mpf_cmp_ui", "no", "no", "", "no"],
['', "mpf_reldiff", "no", "no", "no", "no"],
['GMP::F#sgn', "mpf_sgn", "no","yes", "", "no"],
['GMP::F#ceil', "mpf_ceil", "no","yes", "", "no"],
['GMP::F#floor', "mpf_floor", "no","yes", "", "no"],
['GMP::F#trunc', "mpf_trunc", "no","yes", "", "no"],
['', "mpf_fits_ulong_p", "no", "no", "no", "no"],
['', "mpf_fits_slong_p", "no", "no", "no", "no"],
['', "mpf_fits_uint_p", "no", "no", "no", "no"],
['', "mpf_fits_sint_p", "no", "no", "no", "no"],
['', "mpf_fits_ushort_p", "no", "no", "no", "no"],
['', "mpf_fits_sshort_p", "no", "no", "no", "no"]
];
/**
* Custom function used for column renderer
* @param {Object} val
*/
function change(val){
if(val > 0){
return '<span style="color:green;">' + val + '</span>';
}else if(val < 0){
return '<span style="color:red;">' + val + '</span>';
}
return val;
}
/**
* Custom function used for column renderer
* @param {Object} val
*/
function pctChange(val){
if(val > 0){
return '<span style="color:green;">' + val + '%</span>';
}else if(val < 0){
return '<span style="color:red;">' + val + '%</span>';
}
return val;
}
/**
* Custom function used for column renderer
* @param {Object} val
*/
function shouldExist(val){
if(val == ''){
return '<span style="background-color:#FFCCCC;"> <i>missing</i> </span>';
}
return val;
}
/**
* Custom function used for column renderer
* @param {Object} val
*/
function shouldYes(val){
if(val == ''){
return '<span style="background-color:#FFCCCC;"> <i>missing</i> </span>';
}else if(typeof val != "string"){
return val;
} else if(val.match(/no/i)){
return '<span style="color:red;">' + val + '</span>';
} else if(val.match(/yes/i)){
return '<span style="color:green;">' + val + '</span>';
} else if(val.match(/n\/a/i)){
return '<span style="color:#AAAAAA;">' + val + '</span>';
}
return val;
}
// create the MPZ data store
var mpzStore = new Ext.data.ArrayStore({
fields: [
{name: 'method'},
{name: 'function'},
{name: 'manual'},
{name: 'yard'},
{name: 'testBasic'},
{name: 'testOriginal'}
]
});
// create the MPZ Functional Mappings data store
var mpzfmStore = new Ext.data.ArrayStore({
fields: [
{name: 'method'},
{name: 'function'},
{name: 'manual'},
{name: 'yard'},
{name: 'testBasic'},
{name: 'testOriginal'}
]
});
// create the MPQ data store
var mpqStore = new Ext.data.ArrayStore({
fields: [
{name: 'method'},
{name: 'function'},
{name: 'manual'},
{name: 'yard'},
{name: 'testBasic'},
{name: 'testOriginal'}
]
});
// create the MPQ data store
var mpfStore = new Ext.data.ArrayStore({
fields: [
{name: 'method'},
{name: 'function'},
{name: 'manual'},
{name: 'yard'},
{name: 'testBasic'},
{name: 'testOriginal'}
]
});
// manually load local data
mpzStore.loadData(mpzData);
mpzfmStore.loadData(mpzFmData);
mpqStore.loadData(mpqData);
mpfStore.loadData(mpfData);
// create the MPZ Grid
var mpzGrid = new Ext.grid.GridPanel({
store: mpzStore,
columns: [
{id:'method',header: 'Ruby method', width: 140, sortable: true, dataIndex: 'method'},
{header: 'C function', width: 130, sortable: true, renderer: shouldExist, dataIndex: 'function'},
{header: "Doc'd in manual.pdf?", width: 140, sortable: true, renderer: shouldYes, dataIndex: 'manual'},
{header: "Doc'd in YARD?", width: 100, sortable: true, renderer: shouldYes, dataIndex: 'yard'},
{header: 'Basic Tests?', width: 100, sortable: true, renderer: shouldYes, dataIndex: 'testBasic'},
{header: 'Original Tests?', width: 100, sortable: true, renderer: shouldYes, dataIndex: 'testOriginal'}
],
stripeRows: true,
autoExpandColumn: 'method',
height: 260,
width: 820,
title: 'GMP::Z',
// config options for stateful behavior
stateful: true,
stateId: 'grid',
viewConfig: {
getRowClass: function(record, rowIndex, rp, ds){
if(record.data.method == ""){
return 'x-grid3-row-unimplemented';
}
return 'x-grid3-row';
}
}
});
// create the MPZ Functional Mappings Grid
var mpzfmGrid = new Ext.grid.GridPanel({
store: mpzfmStore,
columns: [
{id:'method',header: 'Ruby method', width: 140, sortable: true, dataIndex: 'method'},
{header: 'C function', width: 130, sortable: true, renderer: shouldExist, dataIndex: 'function'},
{header: "Doc'd in manual.pdf?", width: 140, sortable: true, renderer: shouldYes, dataIndex: 'manual'},
{header: "Doc'd in YARD?", width: 100, sortable: true, renderer: shouldYes, dataIndex: 'yard'},
{header: 'Basic Tests?', width: 100, sortable: true, renderer: shouldYes, dataIndex: 'testBasic'},
{header: 'Original Tests?', width: 100, sortable: true, renderer: shouldYes, dataIndex: 'testOriginal'}
],
stripeRows: true,
autoExpandColumn: 'method',
height: 260,
width: 820,
title: 'GMP::Z Functional Mappings',
// config options for stateful behavior
stateful: true,
stateId: 'grid',
viewConfig: {
getRowClass: function(record, rowIndex, rp, ds){
if(record.data.method == ""){
return 'x-grid3-row-unimplemented';
}
return 'x-grid3-row';
}
}
});
// create the MPQ Grid
var mpqGrid = new Ext.grid.GridPanel({
store: mpqStore,
columns: [
{id:'method',header: 'Ruby method', width: 140, sortable: true, dataIndex: 'method'},
{header: 'C function', width: 130, sortable: true, renderer: shouldExist, dataIndex: 'function'},
{header: "Doc'd in manual.pdf?", width: 140, sortable: true, renderer: shouldYes, dataIndex: 'manual'},
{header: "Doc'd in YARD?", width: 100, sortable: true, renderer: shouldYes, dataIndex: 'yard'},
{header: 'Basic Tests?', width: 100, sortable: true, renderer: shouldYes, dataIndex: 'testBasic'},
{header: 'Original Tests?', width: 100, sortable: true, renderer: shouldYes, dataIndex: 'testOriginal'}
],
stripeRows: true,
autoExpandColumn: 'method',
height: 260,
width: 820,
title: 'GMP::Q',
// config options for stateful behavior
stateful: true,
stateId: 'grid',
viewConfig: {
getRowClass: function(record, rowIndex, rp, ds){
if(record.data.method == ""){
return 'x-grid3-row-unimplemented';
}
return 'x-grid3-row';
}
}
});
// create the MPF Grid
var mpfGrid = new Ext.grid.GridPanel({
store: mpfStore,
columns: [
{id:'method',header: 'Ruby method', width: 140, sortable: true, dataIndex: 'method'},
{header: 'C function', width: 130, sortable: true, renderer: shouldExist, dataIndex: 'function'},
{header: "Doc'd in manual.pdf?", width: 140, sortable: true, renderer: shouldYes, dataIndex: 'manual'},
{header: "Doc'd in YARD?", width: 100, sortable: true, renderer: shouldYes, dataIndex: 'yard'},
{header: 'Basic Tests?', width: 100, sortable: true, renderer: shouldYes, dataIndex: 'testBasic'},
{header: 'Original Tests?', width: 100, sortable: true, renderer: shouldYes, dataIndex: 'testOriginal'}
],
stripeRows: true,
autoExpandColumn: 'method',
height: 260,
width: 820,
title: 'GMP::F',
// config options for stateful behavior
stateful: true,
stateId: 'grid',
viewConfig: {
getRowClass: function(record, rowIndex, rp, ds){
if(record.data.method == ""){
return 'x-grid3-row-unimplemented';
}
return 'x-grid3-row';
}
}
});
// render the grid to the specified div in the page
mpzGrid.render('mpz-grid');
mpzfmGrid.render('mpzfm-grid');
mpqGrid.render('mpq-grid');
mpfGrid.render('mpf-grid');
});
</script>
</head>
<body>
<div id="mpz-grid"></div>
<div id="mpzfm-grid"></div>
<div id='mpq-grid'></div>
<div id='mpf-grid'></div>
</body>
</html>