visualize_helper 0.0.10.34 → 0.0.10.35

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1de76bf0893430b7014404255ceb3233e3642280
4
- data.tar.gz: 1bd1c65aeab869cf767d78b25dfbf8ea2bf07742
3
+ metadata.gz: d4d63db7c253c734accbfaf226fd0252019044f0
4
+ data.tar.gz: 9369123d379d8e1a8a7182cf9d3ebffcd272616c
5
5
  SHA512:
6
- metadata.gz: 9227aa99d581e2c3dc9b4295c386d3ce2231644f9ab2d638e5d7aeeda4f2ce6172c87b5d57f9bcd7ecc516d17f1eecd90c152f07e5be08b462db53227718f872
7
- data.tar.gz: 7a2d7bdac84678b1852bcfa0c5d0494c1ec8e6d208657e2176da71f76a4b01a12c916bd6f3b81c77bff9a9a543f137fc7e2b9822f332dea9adba579d14e8eb23
6
+ metadata.gz: e4ba09283d42e8617f6fcf96451e281693be6bb05fd4dc6972b7dc5469a5bdfd53b453a0da669054ae262dabfcf4ec81e7c3e78a10068d3f84d017d3822de7d0
7
+ data.tar.gz: 8020baa5505faba8503a6519327a4617ff62add832a8c5ad451f274750d0503b6fe36030096f162b9cac80dcc3dc430ec4d394d619d212deacb49e3be972dbd1
@@ -149,8 +149,7 @@ static int encontra_min_max_period(VALUE days, VALUE traj, VALUE array){
149
149
  int days_c = atoi(StringValuePtr(days));
150
150
  int min_c = FIX2INT(rb_ary_entry(array,0));
151
151
  int max_c = FIX2INT(rb_ary_entry(array,1));
152
- int period;
153
- int traj_size;
152
+ int period, traj_size, index, i;
154
153
 
155
154
 
156
155
  if (days_c < first_interval_c) {
@@ -167,7 +166,7 @@ static int encontra_min_max_period(VALUE days, VALUE traj, VALUE array){
167
166
  }
168
167
  period = aggr_size -1;
169
168
  }else {
170
- for ( int index = 0 ; index < intervals_size ; index++){
169
+ for ( index = 0 ; index < intervals_size ; index++){
171
170
  if( index < (intervals_size - 1) ){
172
171
  int intervals_index_plus_1 = FIX2INT(rb_ary_entry(intervals,index+1));
173
172
  if ( intervals_index_plus_1 <= 0 ){
@@ -186,7 +185,7 @@ static int encontra_min_max_period(VALUE days, VALUE traj, VALUE array){
186
185
  rb_ary_store(array,0,INT2FIX(min_c));
187
186
  rb_ary_store(array,1,INT2FIX(max_c));
188
187
  traj_size = RARRAY_LEN(traj);
189
- for ( int i =0; i < traj_size; i++){
188
+ for ( i =0; i < traj_size; i++){
190
189
  rb_ary_push(rb_ary_entry(aggr,period),rb_ary_entry(traj,i));
191
190
  }
192
191
 
@@ -225,8 +224,9 @@ static VALUE remove_entry_from_array (VALUE strings, char* element){
225
224
  VALUE result = rb_ary_new();
226
225
  char* current_value;
227
226
  VALUE current_value_temp;
227
+ int i;
228
228
 
229
- for(int i = 0; i < RARRAY_LEN(strings); i++){
229
+ for( i = 0; i < RARRAY_LEN(strings); i++){
230
230
  current_value_temp = rb_ary_entry(strings,i);
231
231
  current_value = StringValuePtr(current_value_temp);
232
232
  if (strcmp(current_value, element) != 0) {
@@ -260,9 +260,10 @@ static VALUE generate_boxes_and_links(VALUE self, VALUE aggr, VALUE boxes, VALUE
260
260
  char* link_key = (char*) malloc(1000);
261
261
  char* period_s;
262
262
  char* prox_s;
263
+ int period,i;
263
264
  //FILE *f = fopen("/tmp/file.txt", "a");
264
265
 
265
- for(int period = 0; period < aggr_size; period++ ){
266
+ for(period = 0; period < aggr_size; period++ ){
266
267
  seq_key = rb_ary_new();
267
268
 
268
269
  if (period < aggr_size - 1) {
@@ -276,7 +277,7 @@ static VALUE generate_boxes_and_links(VALUE self, VALUE aggr, VALUE boxes, VALUE
276
277
  if (seq_size == 0) {
277
278
  rb_ary_push(seq_key,rb_hash_aref(dict, rb_str_new2("M-2")));
278
279
  }else{
279
- for(int i = 0; i < seq_size; i++ ) {
280
+ for(i = 0; i < seq_size; i++ ) {
280
281
  rb_ary_push(seq_key,rb_hash_aref(dict,rb_ary_entry(seq,i)));
281
282
  }
282
283
  }
@@ -315,7 +316,7 @@ static VALUE generate_boxes_and_links(VALUE self, VALUE aggr, VALUE boxes, VALUE
315
316
  if ( aggr_prox_size == 0) {
316
317
  rb_ary_push(prox_key,rb_hash_aref(dict, rb_str_new2("M-2")));
317
318
  }else{
318
- for(int i = 0; i < aggr_prox_size ; i++ ) {
319
+ for( i = 0; i < aggr_prox_size ; i++ ) {
319
320
  rb_ary_push(prox_key,rb_hash_aref(dict,rb_ary_entry(aggr_prox,i)));
320
321
  }
321
322
  }
@@ -391,14 +392,15 @@ static VALUE iterate_over_trajectories(VALUE self, VALUE trajectories, VALUE min
391
392
  VALUE value;
392
393
  VALUE result;
393
394
  VALUE min_max_aggr;
395
+ int i,j;
394
396
 
395
397
  // iterate over each trajectory
396
- for (int i = 0; i < RARRAY_LEN(trajectories); i++ ){
398
+ for (i = 0; i < RARRAY_LEN(trajectories); i++ ){
397
399
 
398
400
  trajectory = rb_ary_entry(trajectories,i);
399
401
 
400
402
  aggr = rb_ary_new();
401
- for (int j = 0; j < RARRAY_LEN(intervals) + 2; j++){
403
+ for (j = 0; j < RARRAY_LEN(intervals) + 2; j++){
402
404
  rb_ary_push(aggr,rb_ary_new());
403
405
  }
404
406
 
@@ -1,3 +1,3 @@
1
1
  module VisualizeHelper
2
- VERSION = "0.0.10.34"
2
+ VERSION = "0.0.10.35"
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.34
4
+ version: 0.0.10.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raphael Ottoni Santiago Machado de Faria