lowess 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/ext_lowess/lowess.c +4 -5
- data/lib/lowess/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: e13380fb4e6d2b488f9943ce273ee36c84ebd4ab
|
4
|
+
data.tar.gz: 38eebc7c90406117bc8fb31786f25b09a29ecc91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dc5e4c9b607fdcabee1c9e125782788b47afaece8d82ee681aba241c4f658149858cbc735b3a8e93a4c03715b93731fcc73358ef026b158fd901c3f0f627413
|
7
|
+
data.tar.gz: 754480684ce7d93ebb4436e06eaede6cbc55888488156ef630b1b08df0de83ce870175f3842cfda453e68e113af196c389cccf22a27615eb966114b618d26b40
|
data/ext/ext_lowess/lowess.c
CHANGED
@@ -25,8 +25,8 @@ lowess_ext_lowess(VALUE self, VALUE in_points, VALUE in_f, VALUE in_iter, VALUE
|
|
25
25
|
double* out_ys = ALLOC_N(double, len);
|
26
26
|
double* rw = ALLOC_N(double, len);
|
27
27
|
double* res = ALLOC_N(double, len);
|
28
|
-
VALUE* points = ALLOC_N(VALUE, len);
|
29
28
|
VALUE point_args[2];
|
29
|
+
VALUE point;
|
30
30
|
VALUE ret = rb_ary_new_capa(len);
|
31
31
|
int i;
|
32
32
|
|
@@ -39,15 +39,14 @@ lowess_ext_lowess(VALUE self, VALUE in_points, VALUE in_f, VALUE in_iter, VALUE
|
|
39
39
|
|
40
40
|
clowess(xs, ys, len, f, iter, delta, out_ys, rw, res);
|
41
41
|
|
42
|
+
rb_ary_resize(ret, len); /* fill with Qnil */
|
42
43
|
for (i = 0; i < len; i++) {
|
43
44
|
point_args[0] = DBL2NUM(xs[i]);
|
44
45
|
point_args[1] = DBL2NUM(out_ys[i]);
|
45
|
-
|
46
|
+
point = rb_class_new_instance(2, point_args, Lowess_Point);
|
47
|
+
RARRAY_ASET(ret, i, point);
|
46
48
|
}
|
47
49
|
|
48
|
-
rb_ary_cat(ret, points, len);
|
49
|
-
|
50
|
-
xfree(points);
|
51
50
|
xfree(res);
|
52
51
|
xfree(rw);
|
53
52
|
xfree(out_ys);
|
data/lib/lowess/version.rb
CHANGED