visualize_helper 0.0.10.37 → 0.0.10.38

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad495a9cd84b7101ed95fe81d23fe3aa3cf49585
4
- data.tar.gz: 96a9ca28678ecc1d6b0806bf810e38d8103478c2
3
+ metadata.gz: f4b041e9c666807a1fb984af95df9d9781c5e02f
4
+ data.tar.gz: 8f5b36670c44d2fcb75b6a1e572cad6f5a10b27a
5
5
  SHA512:
6
- metadata.gz: a238fb71c5f4335ddb39887c25b9e5997c89f29aeb1a60667e9bb6a910c99c355de5cc5726228c75f4e39423a4ffa8e2d976331b17d4d19f2fa6bb78977fcd1c
7
- data.tar.gz: f073ee92935e2f5d874a8fd055eb6a0f9987cebcddd99e88842799a719f3ab4566d098f36070e7d23be3438ac2798bf55cdc1f001adda3854d978cf50d4ba38c
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
- static VALUE iterate_over_trajectories(VALUE self, VALUE trajectories, VALUE min, VALUE max, VALUE hash, VALUE key_v, VALUE key_t, VALUE intervals, VALUE dict, VALUE agrupamento, VALUE boxes, VALUE links) {
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(rb_hash_aref(hash,key_v),trajectory);
411
- VALUE temp = rb_hash_aref(hash,key_t);
412
- min_max_aggr = min_max_period(self,min,max,rb_hash_aref(temp,trajectory),intervals,aggr);
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
- //return aggr;
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, 11);
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 );
@@ -1,3 +1,3 @@
1
1
  module VisualizeHelper
2
- VERSION = "0.0.10.37"
2
+ VERSION = "0.0.10.38"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: visualize_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10.37
4
+ version: 0.0.10.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raphael Ottoni Santiago Machado de Faria