rb-gsl 1.16.0 → 1.16.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +6 -0
- data/README +11 -15
- data/Rakefile +6 -10
- data/ext/{alf.c → gsl/alf.c} +1 -1
- data/ext/{array.c → gsl/array.c} +4 -6
- data/ext/{array_complex.c → gsl/array_complex.c} +2 -3
- data/ext/{blas.c → gsl/blas.c} +2 -3
- data/ext/{blas1.c → gsl/blas1.c} +3 -4
- data/ext/{blas2.c → gsl/blas2.c} +3 -4
- data/ext/{blas3.c → gsl/blas3.c} +3 -4
- data/ext/{block.c → gsl/block.c} +11 -12
- data/ext/{block_source.c → gsl/block_source.c} +0 -0
- data/ext/{bspline.c → gsl/bspline.c} +1 -1
- data/ext/{bundle.c → gsl/bundle.c} +0 -0
- data/ext/{cdf.c → gsl/cdf.c} +3 -5
- data/ext/{cheb.c → gsl/cheb.c} +4 -4
- data/ext/{combination.c → gsl/combination.c} +2 -3
- data/ext/{common.c → gsl/common.c} +8 -10
- data/ext/{complex.c → gsl/complex.c} +3 -3
- data/ext/{const.c → gsl/const.c} +2 -3
- data/ext/{const_additional.c → gsl/const_additional.c} +2 -2
- data/ext/{cqp.c → gsl/cqp.c} +1 -1
- data/ext/{deriv.c → gsl/deriv.c} +3 -3
- data/ext/{dht.c → gsl/dht.c} +3 -3
- data/ext/{diff.c → gsl/diff.c} +3 -3
- data/ext/{dirac.c → gsl/dirac.c} +1 -1
- data/ext/{eigen.c → gsl/eigen.c} +16 -16
- data/ext/{error.c → gsl/error.c} +5 -5
- data/ext/gsl/extconf.rb +121 -0
- data/ext/{fcmp.c → gsl/fcmp.c} +0 -2
- data/ext/{fft.c → gsl/fft.c} +1 -2
- data/ext/{fit.c → gsl/fit.c} +1 -2
- data/ext/{fresnel.c → gsl/fresnel.c} +2 -2
- data/ext/{function.c → gsl/function.c} +3 -3
- data/ext/{geometry.c → gsl/geometry.c} +1 -1
- data/ext/{graph.c → gsl/graph.c} +2 -2
- data/ext/{gsl.c → gsl/gsl.c} +2 -10
- data/ext/{gsl_narray.c → gsl/gsl_narray.c} +2 -3
- data/ext/{histogram.c → gsl/histogram.c} +3 -4
- data/ext/{histogram2d.c → gsl/histogram2d.c} +3 -4
- data/ext/{histogram3d.c → gsl/histogram3d.c} +4 -4
- data/ext/{histogram3d_source.c → gsl/histogram3d_source.c} +1 -1
- data/ext/{histogram_find.c → gsl/histogram_find.c} +1 -1
- data/ext/{histogram_oper.c → gsl/histogram_oper.c} +0 -0
- data/ext/{ieee.c → gsl/ieee.c} +4 -8
- data/{include → ext/gsl/include}/rb_gsl.h +4 -19
- data/{include → ext/gsl/include}/rb_gsl_array.h +0 -14
- data/{include → ext/gsl/include}/rb_gsl_cheb.h +0 -2
- data/{include → ext/gsl/include}/rb_gsl_common.h +11 -15
- data/{include → ext/gsl/include}/rb_gsl_complex.h +1 -1
- data/{include → ext/gsl/include}/rb_gsl_const.h +1 -2
- data/ext/gsl/include/rb_gsl_dirac.h +6 -0
- data/{include → ext/gsl/include}/rb_gsl_eigen.h +1 -1
- data/{include → ext/gsl/include}/rb_gsl_fft.h +0 -10
- data/{include → ext/gsl/include}/rb_gsl_fit.h +0 -2
- data/{include → ext/gsl/include}/rb_gsl_function.h +0 -4
- data/{include → ext/gsl/include}/rb_gsl_graph.h +0 -2
- data/{include → ext/gsl/include}/rb_gsl_histogram.h +0 -0
- data/{include → ext/gsl/include}/rb_gsl_histogram3d.h +0 -0
- data/{include → ext/gsl/include}/rb_gsl_integration.h +1 -1
- data/{include → ext/gsl/include}/rb_gsl_interp.h +0 -5
- data/{include → ext/gsl/include}/rb_gsl_linalg.h +2 -5
- data/{include → ext/gsl/include}/rb_gsl_math.h +0 -2
- data/{include → ext/gsl/include}/rb_gsl_odeiv.h +0 -3
- data/{include → ext/gsl/include}/rb_gsl_poly.h +0 -4
- data/{include → ext/gsl/include}/rb_gsl_rational.h +0 -7
- data/{include → ext/gsl/include}/rb_gsl_rng.h +0 -1
- data/{include → ext/gsl/include}/rb_gsl_root.h +1 -1
- data/{include → ext/gsl/include}/rb_gsl_sf.h +0 -5
- data/{include → ext/gsl/include}/rb_gsl_statistics.h +1 -1
- data/{include → ext/gsl/include}/rb_gsl_tensor.h +0 -2
- data/{include → ext/gsl/include}/rb_gsl_with_narray.h +3 -1
- data/{include → ext/gsl/include}/templates_off.h +0 -0
- data/{include → ext/gsl/include}/templates_on.h +0 -0
- data/ext/{integration.c → gsl/integration.c} +4 -6
- data/ext/{interp.c → gsl/interp.c} +1 -6
- data/ext/{jacobi.c → gsl/jacobi.c} +1 -1
- data/ext/{linalg.c → gsl/linalg.c} +3 -4
- data/ext/{linalg_complex.c → gsl/linalg_complex.c} +3 -4
- data/ext/{math.c → gsl/math.c} +2 -3
- data/ext/{matrix.c → gsl/matrix.c} +9 -10
- data/ext/{matrix_complex.c → gsl/matrix_complex.c} +2 -3
- data/ext/{matrix_double.c → gsl/matrix_double.c} +5 -5
- data/ext/{matrix_int.c → gsl/matrix_int.c} +4 -4
- data/ext/{matrix_source.c → gsl/matrix_source.c} +2 -6
- data/ext/{min.c → gsl/min.c} +2 -2
- data/ext/{monte.c → gsl/monte.c} +3 -3
- data/ext/{multifit.c → gsl/multifit.c} +4 -4
- data/ext/{multimin.c → gsl/multimin.c} +5 -5
- data/ext/{multimin_fsdf.c → gsl/multimin_fsdf.c} +1 -1
- data/ext/{multiroots.c → gsl/multiroots.c} +6 -6
- data/ext/{multiset.c → gsl/multiset.c} +1 -1
- data/ext/{ndlinear.c → gsl/ndlinear.c} +1 -1
- data/ext/{nmf.c → gsl/nmf.c} +0 -0
- data/ext/{nmf_wrap.c → gsl/nmf_wrap.c} +0 -0
- data/ext/{ntuple.c → gsl/ntuple.c} +6 -6
- data/ext/{odeiv.c → gsl/odeiv.c} +4 -8
- data/ext/{ool.c → gsl/ool.c} +2 -2
- data/ext/{oper_complex_source.c → gsl/oper_complex_source.c} +2 -4
- data/ext/{permutation.c → gsl/permutation.c} +2 -2
- data/ext/{poly.c → gsl/poly.c} +8 -8
- data/ext/{poly2.c → gsl/poly2.c} +4 -4
- data/ext/{poly_source.c → gsl/poly_source.c} +7 -11
- data/ext/{qrng.c → gsl/qrng.c} +3 -3
- data/ext/{randist.c → gsl/randist.c} +4 -4
- data/ext/{rational.c → gsl/rational.c} +3 -3
- data/ext/{rng.c → gsl/rng.c} +1 -2
- data/ext/{root.c → gsl/root.c} +4 -5
- data/ext/{sf.c → gsl/sf.c} +2 -2
- data/ext/{sf_airy.c → gsl/sf_airy.c} +2 -2
- data/ext/{sf_bessel.c → gsl/sf_bessel.c} +1 -1
- data/ext/{sf_clausen.c → gsl/sf_clausen.c} +1 -1
- data/ext/{sf_coulomb.c → gsl/sf_coulomb.c} +1 -1
- data/ext/{sf_coupling.c → gsl/sf_coupling.c} +1 -1
- data/ext/{sf_dawson.c → gsl/sf_dawson.c} +1 -1
- data/ext/{sf_debye.c → gsl/sf_debye.c} +1 -1
- data/ext/{sf_dilog.c → gsl/sf_dilog.c} +1 -1
- data/ext/{sf_elementary.c → gsl/sf_elementary.c} +1 -1
- data/ext/{sf_ellint.c → gsl/sf_ellint.c} +1 -1
- data/ext/{sf_elljac.c → gsl/sf_elljac.c} +1 -1
- data/ext/{sf_erfc.c → gsl/sf_erfc.c} +1 -1
- data/ext/{sf_exp.c → gsl/sf_exp.c} +1 -1
- data/ext/{sf_expint.c → gsl/sf_expint.c} +1 -1
- data/ext/{sf_fermi_dirac.c → gsl/sf_fermi_dirac.c} +1 -1
- data/ext/{sf_gamma.c → gsl/sf_gamma.c} +1 -1
- data/ext/{sf_gegenbauer.c → gsl/sf_gegenbauer.c} +1 -1
- data/ext/{sf_hyperg.c → gsl/sf_hyperg.c} +1 -1
- data/ext/{sf_laguerre.c → gsl/sf_laguerre.c} +1 -1
- data/ext/{sf_lambert.c → gsl/sf_lambert.c} +1 -1
- data/ext/{sf_legendre.c → gsl/sf_legendre.c} +1 -1
- data/ext/{sf_log.c → gsl/sf_log.c} +1 -1
- data/ext/{sf_mathieu.c → gsl/sf_mathieu.c} +1 -1
- data/ext/{sf_power.c → gsl/sf_power.c} +1 -1
- data/ext/{sf_psi.c → gsl/sf_psi.c} +1 -1
- data/ext/{sf_synchrotron.c → gsl/sf_synchrotron.c} +1 -1
- data/ext/{sf_transport.c → gsl/sf_transport.c} +1 -1
- data/ext/{sf_trigonometric.c → gsl/sf_trigonometric.c} +1 -1
- data/ext/{sf_zeta.c → gsl/sf_zeta.c} +1 -1
- data/ext/{signal.c → gsl/signal.c} +2 -3
- data/ext/{siman.c → gsl/siman.c} +9 -9
- data/ext/{sort.c → gsl/sort.c} +4 -4
- data/ext/{spline.c → gsl/spline.c} +3 -3
- data/ext/{stats.c → gsl/stats.c} +3 -3
- data/ext/{sum.c → gsl/sum.c} +2 -2
- data/ext/{tamu_anova.c → gsl/tamu_anova.c} +1 -1
- data/ext/{tensor.c → gsl/tensor.c} +6 -7
- data/ext/{tensor_source.c → gsl/tensor_source.c} +3 -4
- data/ext/{vector.c → gsl/vector.c} +9 -10
- data/ext/{vector_complex.c → gsl/vector_complex.c} +3 -3
- data/ext/{vector_double.c → gsl/vector_double.c} +5 -6
- data/ext/{vector_int.c → gsl/vector_int.c} +4 -4
- data/ext/{vector_source.c → gsl/vector_source.c} +1 -5
- data/ext/{wavelet.c → gsl/wavelet.c} +3 -4
- data/lib/gsl.rb +13 -3
- data/lib/gsl/gnuplot.rb +1 -1
- data/lib/gsl/version.rb +5 -0
- data/lib/rbgsl.rb +1 -3
- data/rdoc/index.rdoc +0 -9
- metadata +199 -160
- data/VERSION +0 -1
- data/ext/extconf.rb +0 -309
- data/include/rb_gsl_config.h +0 -71
- data/include/rb_gsl_dirac.h +0 -13
@@ -9,8 +9,7 @@
|
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
11
|
|
12
|
-
#include "
|
13
|
-
#include "rb_gsl_fft.h"
|
12
|
+
#include "include/rb_gsl_fft.h"
|
14
13
|
|
15
14
|
enum FFT_CONV_CORR {
|
16
15
|
RB_GSL_FFT_CONVOLVE = 0,
|
@@ -118,7 +117,7 @@ static VALUE rb_gsl_fft_conv_corr(int argc, VALUE *argv, VALUE obj,
|
|
118
117
|
int flagt = 0, flagw = 0;
|
119
118
|
// size_t i;
|
120
119
|
gsl_vector *vtmp1 = NULL, *vtmp2 = NULL;
|
121
|
-
VALUE ary =
|
120
|
+
VALUE ary = Qnil;
|
122
121
|
switch (argc) {
|
123
122
|
case 3:
|
124
123
|
data1 = get_ptr_double3(obj, &size1, &stride1, &naflag1);
|
data/ext/{siman.c → gsl/siman.c}
RENAMED
@@ -11,11 +11,11 @@
|
|
11
11
|
|
12
12
|
#include <gsl/gsl_rng.h>
|
13
13
|
#include <gsl/gsl_siman.h>
|
14
|
-
#include "rb_gsl.h"
|
15
|
-
#include "rb_gsl_array.h"
|
16
|
-
#include "rb_gsl_function.h"
|
17
|
-
#include "rb_gsl_rng.h"
|
18
|
-
#include "rb_gsl_common.h"
|
14
|
+
#include "include/rb_gsl.h"
|
15
|
+
#include "include/rb_gsl_array.h"
|
16
|
+
#include "include/rb_gsl_function.h"
|
17
|
+
#include "include/rb_gsl_rng.h"
|
18
|
+
#include "include/rb_gsl_common.h"
|
19
19
|
|
20
20
|
static VALUE cgsl_siman_Efunc;
|
21
21
|
static VALUE cgsl_siman_step;
|
@@ -128,7 +128,7 @@ static VALUE rb_gsl_siman_Efunc_set(int argc, VALUE *argv, VALUE obj)
|
|
128
128
|
Data_Get_Struct(obj, siman_Efunc, se);
|
129
129
|
switch (argc) {
|
130
130
|
case 0:
|
131
|
-
if (rb_block_given_p()) se->proc =
|
131
|
+
if (rb_block_given_p()) se->proc = rb_block_proc();
|
132
132
|
break;
|
133
133
|
case 1:
|
134
134
|
if (rb_obj_is_kind_of(argv[0], rb_cProc)) se->proc = argv[0];
|
@@ -233,7 +233,7 @@ static VALUE rb_gsl_siman_print_set(int argc, VALUE *argv, VALUE obj)
|
|
233
233
|
Data_Get_Struct(obj, siman_print, se);
|
234
234
|
switch (argc) {
|
235
235
|
case 0:
|
236
|
-
if (rb_block_given_p()) se->proc =
|
236
|
+
if (rb_block_given_p()) se->proc = rb_block_proc();
|
237
237
|
break;
|
238
238
|
case 1:
|
239
239
|
if (rb_obj_is_kind_of(argv[0], rb_cProc)) se->proc = argv[0];
|
@@ -302,7 +302,7 @@ static VALUE rb_gsl_siman_step_set(int argc, VALUE *argv, VALUE obj)
|
|
302
302
|
Data_Get_Struct(obj, siman_step, se);
|
303
303
|
switch (argc) {
|
304
304
|
case 0:
|
305
|
-
if (rb_block_given_p()) se->proc =
|
305
|
+
if (rb_block_given_p()) se->proc = rb_block_proc();
|
306
306
|
break;
|
307
307
|
case 1:
|
308
308
|
if (rb_obj_is_kind_of(argv[0], rb_cProc)) se->proc = argv[0];
|
@@ -373,7 +373,7 @@ static VALUE rb_gsl_siman_metric_set(int argc, VALUE *argv, VALUE obj)
|
|
373
373
|
Data_Get_Struct(obj, siman_metric, se);
|
374
374
|
switch (argc) {
|
375
375
|
case 0:
|
376
|
-
if (rb_block_given_p()) se->proc =
|
376
|
+
if (rb_block_given_p()) se->proc = rb_block_proc();
|
377
377
|
break;
|
378
378
|
case 1:
|
379
379
|
if (rb_obj_is_kind_of(argv[0], rb_cProc)) se->proc = argv[0];
|
data/ext/{sort.c → gsl/sort.c}
RENAMED
@@ -9,10 +9,10 @@
|
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
11
|
|
12
|
-
#include "
|
13
|
-
#include "rb_gsl_array.h"
|
12
|
+
#include "include/rb_gsl_array.h"
|
14
13
|
#include <gsl/gsl_heapsort.h>
|
15
14
|
#include <gsl/gsl_sort.h>
|
15
|
+
|
16
16
|
EXTERN ID RBGSL_ID_call;
|
17
17
|
EXTERN VALUE cgsl_complex;
|
18
18
|
|
@@ -23,7 +23,7 @@ int rb_gsl_comparison_double(const void *aa, const void *bb)
|
|
23
23
|
double *a = NULL, *b = NULL;
|
24
24
|
a = (double *) aa;
|
25
25
|
b = (double *) bb;
|
26
|
-
return FIX2INT(rb_funcall(
|
26
|
+
return FIX2INT(rb_funcall(rb_block_proc(), RBGSL_ID_call, 2, rb_float_new(*a), rb_float_new(*b)));
|
27
27
|
}
|
28
28
|
|
29
29
|
int rb_gsl_comparison_complex(const void *aa, const void *bb)
|
@@ -31,7 +31,7 @@ int rb_gsl_comparison_complex(const void *aa, const void *bb)
|
|
31
31
|
gsl_complex *a = NULL, *b = NULL;
|
32
32
|
a = (gsl_complex *) aa;
|
33
33
|
b = (gsl_complex *) bb;
|
34
|
-
return FIX2INT(rb_funcall(
|
34
|
+
return FIX2INT(rb_funcall(rb_block_proc(), RBGSL_ID_call, 2,
|
35
35
|
Data_Wrap_Struct(cgsl_complex, 0, NULL, a),
|
36
36
|
Data_Wrap_Struct(cgsl_complex, 0, NULL, b)));
|
37
37
|
}
|
@@ -9,8 +9,8 @@
|
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
11
|
|
12
|
-
#include "
|
13
|
-
|
12
|
+
#include "include/rb_gsl_interp.h"
|
13
|
+
|
14
14
|
EXTERN VALUE cgsl_interp_accel; /* defined in interp.c */
|
15
15
|
|
16
16
|
static void rb_gsl_spline_free(rb_gsl_spline *sp);
|
@@ -318,7 +318,7 @@ static VALUE rb_gsl_spline_info(VALUE obj)
|
|
318
318
|
char buf[256];
|
319
319
|
Data_Get_Struct(obj, rb_gsl_spline, p);
|
320
320
|
sprintf(buf, "Class: %s\n", rb_class2name(CLASS_OF(obj)));
|
321
|
-
|
321
|
+
sprintf(buf, "%sSuperClass: %s\n", buf, rb_class2name(RCLASS_SUPER(CLASS_OF(obj))));
|
322
322
|
sprintf(buf, "%sType: %s\n", buf, gsl_interp_name(p->s->interp));
|
323
323
|
sprintf(buf, "%sxmin: %f\n", buf, p->s->interp->xmin);
|
324
324
|
sprintf(buf, "%sxmax: %f\n", buf, p->s->interp->xmax);
|
data/ext/{stats.c → gsl/stats.c}
RENAMED
@@ -8,9 +8,9 @@
|
|
8
8
|
This library is distributed in the hope that it will be useful, but
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
|
-
|
12
|
-
#include "rb_gsl_array.h"
|
13
|
-
#include "rb_gsl_statistics.h"
|
11
|
+
|
12
|
+
#include "include/rb_gsl_array.h"
|
13
|
+
#include "include/rb_gsl_statistics.h"
|
14
14
|
#ifdef HAVE_NARRAY_H
|
15
15
|
#include "narray.h"
|
16
16
|
#endif
|
data/ext/{sum.c → gsl/sum.c}
RENAMED
@@ -8,8 +8,8 @@
|
|
8
8
|
This library is distributed in the hope that it will be useful, but
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
|
-
|
12
|
-
#include "rb_gsl_array.h"
|
11
|
+
|
12
|
+
#include "include/rb_gsl_array.h"
|
13
13
|
#include <gsl/gsl_sum.h>
|
14
14
|
|
15
15
|
static VALUE rb_gsl_sum_accel(VALUE obj)
|
@@ -16,23 +16,22 @@
|
|
16
16
|
|
17
17
|
#ifdef HAVE_TENSOR_TENSOR_H
|
18
18
|
|
19
|
-
#include "
|
20
|
-
#include "rb_gsl_tensor.h"
|
19
|
+
#include "include/rb_gsl_tensor.h"
|
21
20
|
|
22
21
|
#ifdef HAVE_NARRAY_H
|
23
|
-
#include "rb_gsl_with_narray.h"
|
22
|
+
#include "include/rb_gsl_with_narray.h"
|
24
23
|
#endif
|
25
24
|
|
26
25
|
#define BASE_DOUBLE
|
27
|
-
#include "templates_on.h"
|
26
|
+
#include "include/templates_on.h"
|
28
27
|
#include "tensor_source.c"
|
29
|
-
#include "templates_off.h"
|
28
|
+
#include "include/templates_off.h"
|
30
29
|
#undef BASE_DOUBLE
|
31
30
|
|
32
31
|
#define BASE_INT
|
33
|
-
#include "templates_on.h"
|
32
|
+
#include "include/templates_on.h"
|
34
33
|
#include "tensor_source.c"
|
35
|
-
#include "templates_off.h"
|
34
|
+
#include "include/templates_off.h"
|
36
35
|
#undef BASE_INT
|
37
36
|
|
38
37
|
#endif
|
@@ -17,9 +17,8 @@
|
|
17
17
|
|
18
18
|
#ifdef HAVE_TENSOR_TENSOR_H
|
19
19
|
|
20
|
-
#include "
|
21
|
-
#include "
|
22
|
-
#include "rb_gsl_common.h"
|
20
|
+
#include "include/rb_gsl_tensor.h"
|
21
|
+
#include "include/rb_gsl_common.h"
|
23
22
|
|
24
23
|
#ifdef BASE_DOUBLE
|
25
24
|
VALUE cgsl_tensor, cgsl_tensor_int;
|
@@ -940,7 +939,7 @@ static VALUE FUNCTION(rb_tensor,info)(VALUE obj)
|
|
940
939
|
char buf[256];
|
941
940
|
Data_Get_Struct(obj, GSL_TYPE(rbgsl_tensor), t);
|
942
941
|
sprintf(buf, "Class: %s\n", rb_class2name(CLASS_OF(obj)));
|
943
|
-
|
942
|
+
sprintf(buf, "%sSuperClass: %s\n", buf, rb_class2name(RCLASS_SUPER(CLASS_OF(obj))));
|
944
943
|
sprintf(buf, "%sRank: %d\n", buf, (int) t->tensor->rank);
|
945
944
|
sprintf(buf, "%sDimension: %d\n", buf, (int) t->tensor->dimension);
|
946
945
|
sprintf(buf, "%sSize: %d\n", buf, (int) t->tensor->size);
|
@@ -14,25 +14,24 @@
|
|
14
14
|
which are provided by the GSL source.
|
15
15
|
*/
|
16
16
|
|
17
|
-
#include "
|
18
|
-
#include "
|
19
|
-
#include "
|
20
|
-
#include "
|
21
|
-
#include "rb_gsl_poly.h"
|
17
|
+
#include "include/rb_gsl_array.h"
|
18
|
+
#include "include/rb_gsl_histogram.h"
|
19
|
+
#include "include/rb_gsl_complex.h"
|
20
|
+
#include "include/rb_gsl_poly.h"
|
22
21
|
#ifdef HAVE_NARRAY_H
|
23
|
-
#include "rb_gsl_with_narray.h"
|
22
|
+
#include "include/rb_gsl_with_narray.h"
|
24
23
|
#endif
|
25
24
|
|
26
25
|
#define BASE_DOUBLE
|
27
|
-
#include "templates_on.h"
|
26
|
+
#include "include/templates_on.h"
|
28
27
|
#include "vector_source.c"
|
29
|
-
#include "templates_off.h"
|
28
|
+
#include "include/templates_off.h"
|
30
29
|
#undef BASE_DOUBLE
|
31
30
|
|
32
31
|
#define BASE_INT
|
33
|
-
#include "templates_on.h"
|
32
|
+
#include "include/templates_on.h"
|
34
33
|
#include "vector_source.c"
|
35
|
-
#include "templates_off.h"
|
34
|
+
#include "include/templates_off.h"
|
36
35
|
#undef BASE_INT
|
37
36
|
|
38
37
|
|
@@ -8,9 +8,9 @@
|
|
8
8
|
This library is distributed in the hope that it will be useful, but
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
|
-
|
12
|
-
#include "rb_gsl_array.h"
|
13
|
-
#include "rb_gsl_complex.h"
|
11
|
+
|
12
|
+
#include "include/rb_gsl_array.h"
|
13
|
+
#include "include/rb_gsl_complex.h"
|
14
14
|
|
15
15
|
EXTERN VALUE cgsl_complex;
|
16
16
|
static VALUE rb_gsl_vector_complex_inner_product(int argc, VALUE *argv, VALUE obj);
|
@@ -10,13 +10,12 @@
|
|
10
10
|
WITHOUT ANY WARRANTY.
|
11
11
|
*/
|
12
12
|
|
13
|
-
#include "
|
14
|
-
#include "
|
15
|
-
#include "
|
16
|
-
#include "
|
17
|
-
#include "rb_gsl_poly.h"
|
13
|
+
#include "include/rb_gsl_array.h"
|
14
|
+
#include "include/rb_gsl_histogram.h"
|
15
|
+
#include "include/rb_gsl_complex.h"
|
16
|
+
#include "include/rb_gsl_poly.h"
|
18
17
|
#ifdef HAVE_NARRAY_H
|
19
|
-
#include "rb_gsl_with_narray.h"
|
18
|
+
#include "include/rb_gsl_with_narray.h"
|
20
19
|
#endif
|
21
20
|
|
22
21
|
VALUE rb_gsl_vector_inner_product(int argc, VALUE *argv, VALUE obj);
|
@@ -9,11 +9,11 @@
|
|
9
9
|
This library is distributed in the hope that it will be useful, but
|
10
10
|
WITHOUT ANY WARRANTY.
|
11
11
|
*/
|
12
|
-
|
13
|
-
#include "rb_gsl_array.h"
|
14
|
-
#include "rb_gsl_complex.h"
|
12
|
+
|
13
|
+
#include "include/rb_gsl_array.h"
|
14
|
+
#include "include/rb_gsl_complex.h"
|
15
15
|
#ifdef HAVE_NARRAY_H
|
16
|
-
#include "rb_gsl_with_narray.h"
|
16
|
+
#include "include/rb_gsl_with_narray.h"
|
17
17
|
#endif
|
18
18
|
|
19
19
|
VALUE rb_gsl_vector_int_inner_product(int argc, VALUE *argv, VALUE obj);
|
@@ -188,11 +188,7 @@ void FUNCTION(cvector,set_from_rarray)(GSL_TYPE(gsl_vector) *v, VALUE ary)
|
|
188
188
|
size_t i;
|
189
189
|
if (CLASS_OF(ary) == rb_cRange) ary = rb_gsl_range2ary(ary);
|
190
190
|
Check_Type(ary, T_ARRAY);
|
191
|
-
#ifdef RUBY_1_9_LATER
|
192
191
|
if (RARRAY_LEN(ary) == 0) return;
|
193
|
-
#else
|
194
|
-
if (RARRAY_LEN(ary) == 0) return;
|
195
|
-
#endif
|
196
192
|
for (i = 0; i < v->size; i++) FUNCTION(gsl_vector,set)(v, i, NUMCONV(rb_ary_entry(ary, i)));
|
197
193
|
}
|
198
194
|
|
@@ -1561,7 +1557,7 @@ QUALIFIED_VIEW(gsl_vector,view)* FUNCTION(rb_gsl_make_vector,view)(BASE *data, s
|
|
1561
1557
|
}
|
1562
1558
|
|
1563
1559
|
#ifdef HAVE_TENSOR_TENSOR_H
|
1564
|
-
#include "rb_gsl_tensor.h"
|
1560
|
+
#include "include/rb_gsl_tensor.h"
|
1565
1561
|
static VALUE FUNCTION(rb_gsl_vector,to_tensor)(int argc, VALUE *argv, VALUE obj)
|
1566
1562
|
{
|
1567
1563
|
GSL_TYPE(gsl_vector) *v = NULL;
|
@@ -9,9 +9,8 @@
|
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
11
|
|
12
|
-
#include "
|
13
|
-
#include "
|
14
|
-
#include "rb_gsl_common.h"
|
12
|
+
#include "include/rb_gsl_array.h"
|
13
|
+
#include "include/rb_gsl_common.h"
|
15
14
|
|
16
15
|
#ifdef GSL_1_6_LATER
|
17
16
|
#include <gsl/gsl_wavelet.h>
|
@@ -363,7 +362,7 @@ static VALUE rb_gsl_wavelet_trans(int argc, VALUE *argv, VALUE obj,
|
|
363
362
|
//int status;
|
364
363
|
double *ptr1 = NULL, *ptr2 = NULL;
|
365
364
|
size_t n, stride;
|
366
|
-
VALUE ary =
|
365
|
+
VALUE ary = Qnil, ret;
|
367
366
|
#ifdef HAVE_NARRAY_H
|
368
367
|
struct NARRAY *na;
|
369
368
|
#endif
|
data/lib/gsl.rb
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
-
|
2
|
-
require
|
3
|
-
|
1
|
+
begin
|
2
|
+
require 'narray'
|
3
|
+
rescue LoadError
|
4
|
+
end
|
5
|
+
|
6
|
+
begin
|
7
|
+
require "gsl/#{RUBY_VERSION[/\d+.\d+/]}/gsl_native"
|
8
|
+
rescue LoadError
|
9
|
+
require 'gsl/gsl_native'
|
10
|
+
end
|
11
|
+
|
12
|
+
require 'gsl/version'
|
13
|
+
require 'gsl/oper'
|
data/lib/gsl/gnuplot.rb
CHANGED