visualize_helper 0.0.10.37 → 0.0.10.38
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/visualize_helper/visualize_helper.c +8 -21
- data/lib/visualize_helper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4b041e9c666807a1fb984af95df9d9781c5e02f
|
4
|
+
data.tar.gz: 8f5b36670c44d2fcb75b6a1e572cad6f5a10b27a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fb67de64e2ed37bc5aa8e342d19b5b8c90cf16ec883119dc9773d9b8efee616d5f4714b2fa312a20e41b902ce7808d2572f75a76d53e631c242602d80188980
|
7
|
+
data.tar.gz: 41ad6dca5fb1349f13576de5a5affafbe3216499e67a4a740d0863c4201cc3b483389b27a127debb0636be466251739be8e4a8b807f5a35b5ff14ece30b7dbd2
|
@@ -264,7 +264,6 @@ static VALUE generate_boxes_and_links(VALUE self, VALUE aggr, VALUE boxes, VALUE
|
|
264
264
|
char* period_s;
|
265
265
|
char* prox_s;
|
266
266
|
int period,i;
|
267
|
-
//FILE *f = fopen("/tmp/file.txt", "a");
|
268
267
|
|
269
268
|
for(period = 0; period < aggr_size; period++ ){
|
270
269
|
seq_key = rb_ary_new();
|
@@ -353,13 +352,6 @@ static VALUE generate_boxes_and_links(VALUE self, VALUE aggr, VALUE boxes, VALUE
|
|
353
352
|
sprintf(link_key,"%s_%s;%s_%s", period_s,seq_key_result,prox_s,prox_key_result);
|
354
353
|
RemoveSpaces(link_key);
|
355
354
|
|
356
|
-
//fprintf(f,"Composicao key:\n");
|
357
|
-
//fprintf(f,"period_s: %s\n",period_s);
|
358
|
-
//fprintf(f,"seq_key: %s\n",seq_key_result);
|
359
|
-
//fprintf(f,"prox_s : %s\n",prox_s);
|
360
|
-
//fprintf(f,"prox_key_result: %s\n",prox_key_result);
|
361
|
-
//fprintf(f,"chave final : %s\n",link_key);
|
362
|
-
|
363
355
|
links_period_value = rb_hash_aref(rb_ary_entry(links,period),rb_str_new2(link_key));
|
364
356
|
if (links_period_value == Qnil) {
|
365
357
|
rb_hash_aset(rb_ary_entry(links,period),rb_str_new2(link_key),value);
|
@@ -376,8 +368,6 @@ static VALUE generate_boxes_and_links(VALUE self, VALUE aggr, VALUE boxes, VALUE
|
|
376
368
|
free(prox_s);
|
377
369
|
free(link_key);
|
378
370
|
|
379
|
-
//fclose(f);
|
380
|
-
//return result_final;
|
381
371
|
return Qnil;
|
382
372
|
}
|
383
373
|
|
@@ -388,12 +378,13 @@ static VALUE join_teste(VALUE self, VALUE strings){
|
|
388
378
|
}
|
389
379
|
|
390
380
|
|
391
|
-
|
381
|
+
|
382
|
+
// iterate over all the tracjetories and create the boxes and links needed for the dashboard
|
383
|
+
static VALUE iterate_over_trajectories(VALUE self, VALUE trajectories, VALUE min, VALUE max, VALUE hash_v, VALUE hash_t, VALUE intervals, VALUE dict, VALUE agrupamento, VALUE boxes, VALUE links) {
|
392
384
|
|
393
385
|
VALUE trajectory;
|
394
386
|
VALUE aggr;
|
395
387
|
VALUE value;
|
396
|
-
VALUE result;
|
397
388
|
VALUE min_max_aggr;
|
398
389
|
int i,j;
|
399
390
|
|
@@ -407,9 +398,9 @@ static VALUE iterate_over_trajectories(VALUE self, VALUE trajectories, VALUE min
|
|
407
398
|
rb_ary_push(aggr,rb_ary_new());
|
408
399
|
}
|
409
400
|
|
410
|
-
value = rb_hash_aref(
|
411
|
-
VALUE temp = rb_hash_aref(hash,key_t);
|
412
|
-
min_max_aggr = min_max_period(self,min,max,rb_hash_aref(
|
401
|
+
value = rb_hash_aref(hash_v,trajectory);
|
402
|
+
//VALUE temp = rb_hash_aref(hash,key_t);
|
403
|
+
min_max_aggr = min_max_period(self,min,max,rb_hash_aref(hash_t,trajectory),intervals,aggr);
|
413
404
|
aggr = rb_ary_entry(min_max_aggr,4);
|
414
405
|
min = rb_ary_entry(min_max_aggr,0);
|
415
406
|
max = rb_ary_entry(min_max_aggr,1);
|
@@ -418,11 +409,7 @@ static VALUE iterate_over_trajectories(VALUE self, VALUE trajectories, VALUE min
|
|
418
409
|
|
419
410
|
}
|
420
411
|
|
421
|
-
|
422
|
-
result = rb_ary_new();
|
423
|
-
rb_ary_push(result,boxes);
|
424
|
-
rb_ary_push(result,links);
|
425
|
-
return result;
|
412
|
+
return Qnil;
|
426
413
|
}
|
427
414
|
|
428
415
|
// Main function called when the gem is loaded
|
@@ -441,7 +428,7 @@ void Init_visualize_helper(void) {
|
|
441
428
|
rb_define_singleton_method(mVisualizeHelper, "sort_uniq", sort_uniq, 2 );
|
442
429
|
|
443
430
|
// Register the method that iterates for each trajectory
|
444
|
-
rb_define_singleton_method(mVisualizeHelper, "iterate_over_trajectories", iterate_over_trajectories,
|
431
|
+
rb_define_singleton_method(mVisualizeHelper, "iterate_over_trajectories", iterate_over_trajectories, 10);
|
445
432
|
|
446
433
|
// Register the method sort
|
447
434
|
rb_define_singleton_method(mVisualizeHelper, "join_teste", join_teste, 1 );
|