visualize_helper 0.0.10.31 → 0.0.10.32

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: bdaff7a9bc9376e93f1568c513f883dfbbc3da57
4
- data.tar.gz: bb40c30bfd00bba13047d68f95dade0b76f9e960
3
+ metadata.gz: e414a7b8decab1b583f69cd57863410b55402cad
4
+ data.tar.gz: 35dbe6d75b22b276fd958bec3a8c9ec1db0f2cf2
5
5
  SHA512:
6
- metadata.gz: 2fc7a74e19f2201eed773dab5f211e6357742f664aa9b6acb6d253b8459cdf6fd35c08872357bf16d9288066a595f198240d48a1a4afce63344c52ae9351a29a
7
- data.tar.gz: bca5f2f496189c17f60927445686deb3651ee9c12abd601f9eb68eced07ca5a0d3dab4e0f63e5a038ea9618aaf63add498a6792d47d5dee78f57948c6f304f79
6
+ metadata.gz: 7184bb954f59822440150def37d4ca637ed001f146571a68e67e3e8f3b5006c8a541296e67637652cb384b8992fcd265b07a02dfe7706f2ea7ff2193d532f80f
7
+ data.tar.gz: 149e3ad5a488fece5118d8eb463dde47d0c8748a2d30907fd2a17f82a3a85281df485da7fe20536eb3435fea02832554199c62bf915a144554008ba4eb4a53fb
@@ -156,6 +156,7 @@ static int encontra_min_max_period(VALUE days, VALUE traj, VALUE array){
156
156
  int max_c = FIX2INT(rb_ary_entry(array,1));
157
157
  int period;
158
158
  int traj_size;
159
+ //FILE *f = fopen("/tmp/aggr.txt", "a+");
159
160
 
160
161
 
161
162
  if (days_c < first_interval_c) {
@@ -181,12 +182,12 @@ static int encontra_min_max_period(VALUE days, VALUE traj, VALUE array){
181
182
  if( index < (intervals_size - 1) ){
182
183
  int intervals_index_plus_1 = FIX2INT(rb_ary_entry(intervals,index+1));
183
184
  if ( intervals_index_plus_1 <= 0 ){
184
- if (( days_c >= rb_ary_entry(intervals,index)) && (days_c < intervals_index_plus_1)) {
185
+ if (( days_c >= FIX2INT(rb_ary_entry(intervals,index))) && (days_c < intervals_index_plus_1)) {
185
186
  period = index +1;
186
187
  //rb_ary_store(array,2,INT2FIX(i+1));
187
188
  break;
188
189
  }
189
- }else if ( (days_c > rb_ary_entry(intervals,index) ) && (days_c <= intervals_index_plus_1) ) {
190
+ }else if ( (days_c > FIX2INT(rb_ary_entry(intervals,index)) ) && (days_c <= intervals_index_plus_1) ) {
190
191
  period = index + 2;
191
192
  //rb_ary_store(array,2,INT2FIX(i+2));
192
193
  break;
@@ -205,6 +206,27 @@ static int encontra_min_max_period(VALUE days, VALUE traj, VALUE array){
205
206
  rb_ary_push(rb_ary_entry(aggr,period),rb_ary_entry(traj,i));
206
207
  }
207
208
 
209
+ // FOR DEBUG
210
+ //for (int i = 0; i < aggr_size; i++) {
211
+ // fprintf(f, "[");
212
+ // VALUE temp = rb_ary_entry(aggr,i);
213
+ // int temp_size = RARRAY_LEN(temp);
214
+ // for (int j = 0; j < temp_size; j++){
215
+ // VALUE temp_string = rb_ary_entry(temp,j);
216
+ // fprintf(f, "%s", StringValuePtr(temp_string));
217
+ // if ( j != temp_size -1 ){
218
+ // fprintf(f, ",");
219
+ // }
220
+ // }
221
+ // fprintf(f, "]");
222
+ // if ( i != aggr_size -1 ){
223
+ // fprintf(f, ",");
224
+ // }
225
+ //}
226
+
227
+ //fprintf(f, "\n");
228
+ //fclose(f);
229
+
208
230
  return ST_CONTINUE;
209
231
  }
210
232
 
@@ -1,3 +1,3 @@
1
1
  module VisualizeHelper
2
- VERSION = "0.0.10.31"
2
+ VERSION = "0.0.10.32"
3
3
  end
@@ -15,6 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.required_ruby_version = '>= 2.1.5'
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0")
18
+ #spec.files = `git ls-files`.split($/)
18
19
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
20
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
21
  spec.require_paths = ["lib"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: visualize_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10.31
4
+ version: 0.0.10.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raphael Ottoni Santiago Machado de Faria
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-04 00:00:00.000000000 Z
11
+ date: 2016-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler