rb-gsl 1.16.0.4 → 1.16.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +12 -0
- data/.travis.yml +24 -0
- data/AUTHORS +6 -0
- data/COPYING +341 -339
- data/ChangeLog +608 -587
- data/Gemfile +4 -0
- data/README.md +77 -0
- data/Rakefile +14 -33
- data/THANKS +1 -1
- data/examples/blas/blas.rb +1 -1
- data/examples/bspline.rb +3 -3
- data/examples/complex/functions.rb +4 -4
- data/examples/complex/mul.rb +1 -1
- data/examples/const/physconst.rb +4 -4
- data/examples/const/travel.rb +4 -4
- data/examples/eigen/nonsymmv.rb +1 -1
- data/examples/eigen/qhoscillator.rb +3 -3
- data/examples/fft/radix2.rb +1 -1
- data/examples/fft/real-halfcomplex.rb +3 -3
- data/examples/fft/real-halfcomplex2.rb +3 -3
- data/examples/fit/expfit.rb +1 -1
- data/examples/fit/multifit.rb +1 -1
- data/examples/fit/ndlinear.rb +44 -44
- data/examples/fit/nonlinearfit.rb +1 -1
- data/examples/fit/wlinear.rb +3 -3
- data/examples/function/function.rb +1 -1
- data/examples/function/min.rb +1 -1
- data/examples/function/synchrotron.rb +2 -2
- data/examples/gallery/koch.rb +1 -1
- data/examples/histogram/cauchy.rb +2 -2
- data/examples/histogram/exponential.rb +1 -1
- data/examples/histogram/histo3d.rb +1 -1
- data/examples/histogram/histogram-pdf.rb +2 -2
- data/examples/histogram/xexp.rb +1 -1
- data/examples/integration/ahmed.rb +2 -2
- data/examples/integration/cosmology.rb +7 -7
- data/examples/integration/friedmann.rb +4 -4
- data/examples/integration/qng.rb +1 -1
- data/examples/interp/demo.rb +2 -2
- data/examples/linalg/LQ_solve.rb +1 -1
- data/examples/linalg/LU.rb +1 -1
- data/examples/linalg/LU2.rb +1 -1
- data/examples/linalg/LU_narray.rb +1 -1
- data/examples/linalg/PTLQ.rb +1 -1
- data/examples/linalg/QRPT.rb +1 -1
- data/examples/linalg/chol.rb +1 -1
- data/examples/linalg/chol_narray.rb +1 -1
- data/examples/linalg/complex.rb +1 -1
- data/examples/math/elementary.rb +1 -1
- data/examples/math/functions.rb +1 -1
- data/examples/math/inf_nan.rb +1 -1
- data/examples/math/minmax.rb +1 -1
- data/examples/math/power.rb +1 -1
- data/examples/math/test.rb +1 -1
- data/examples/min.rb +1 -1
- data/examples/multimin/bundle.rb +1 -1
- data/examples/multimin/cqp.rb +17 -17
- data/examples/multiroot/fsolver3.rb +1 -1
- data/examples/odeiv/binarysystem.rb +12 -12
- data/examples/odeiv/demo.rb +3 -3
- data/examples/odeiv/frei1.rb +7 -7
- data/examples/odeiv/frei2.rb +4 -4
- data/examples/odeiv/oscillator.rb +1 -1
- data/examples/odeiv/sedov.rb +3 -3
- data/examples/odeiv/whitedwarf.rb +11 -11
- data/examples/permutation/ex1.rb +2 -2
- data/examples/permutation/permutation.rb +1 -1
- data/examples/poly/demo.rb +1 -1
- data/examples/random/diffusion.rb +1 -1
- data/examples/random/generator.rb +2 -2
- data/examples/random/randomwalk.rb +3 -3
- data/examples/random/rng.rb +1 -1
- data/examples/roots/bisection.rb +1 -1
- data/examples/roots/brent.rb +1 -1
- data/examples/roots/demo.rb +1 -1
- data/examples/roots/newton.rb +2 -2
- data/examples/roots/recombination.gp +0 -1
- data/examples/sf/hyperg.rb +1 -1
- data/examples/sf/sphbessel.rb +1 -1
- data/examples/sort/sort.rb +1 -1
- data/examples/tamu_anova.rb +4 -4
- data/examples/vector/add.rb +1 -1
- data/examples/vector/decimate.rb +1 -1
- data/examples/vector/gnuplot.rb +8 -8
- data/examples/vector/vector.rb +2 -2
- data/examples/wavelet/wavelet1.rb +1 -1
- data/ext/{gsl → gsl_native}/alf.c +9 -9
- data/ext/{gsl → gsl_native}/array.c +64 -151
- data/ext/{gsl → gsl_native}/array_complex.c +61 -63
- data/ext/{gsl → gsl_native}/blas.c +0 -0
- data/ext/{gsl → gsl_native}/blas1.c +32 -32
- data/ext/{gsl → gsl_native}/blas2.c +54 -58
- data/ext/{gsl → gsl_native}/blas3.c +54 -54
- data/ext/{gsl → gsl_native}/block.c +3 -6
- data/ext/{gsl/block_source.c → gsl_native/block_source.h} +109 -111
- data/ext/gsl_native/bspline.c +122 -0
- data/ext/{gsl → gsl_native}/bundle.c +0 -0
- data/ext/{gsl → gsl_native}/cdf.c +76 -88
- data/ext/{gsl → gsl_native}/cheb.c +74 -85
- data/ext/{gsl → gsl_native}/combination.c +9 -16
- data/ext/{gsl → gsl_native}/common.c +7 -37
- data/ext/{gsl → gsl_native}/complex.c +113 -115
- data/ext/gsl_native/const.c +331 -0
- data/ext/{gsl → gsl_native}/const_additional.c +12 -33
- data/ext/gsl_native/cqp.c +283 -0
- data/ext/{gsl → gsl_native}/deriv.c +22 -30
- data/ext/{gsl → gsl_native}/dht.c +20 -28
- data/ext/{gsl → gsl_native}/diff.c +23 -25
- data/ext/{gsl → gsl_native}/dirac.c +44 -45
- data/ext/{gsl → gsl_native}/eigen.c +1031 -1082
- data/ext/{gsl → gsl_native}/error.c +13 -13
- data/ext/{gsl → gsl_native}/extconf.rb +5 -13
- data/ext/{gsl → gsl_native}/fft.c +192 -198
- data/ext/{gsl → gsl_native}/fit.c +16 -16
- data/ext/gsl_native/fresnel.c +312 -0
- data/ext/{gsl → gsl_native}/function.c +29 -35
- data/ext/{gsl → gsl_native}/geometry.c +15 -15
- data/ext/{gsl → gsl_native}/graph.c +37 -87
- data/ext/{gsl → gsl_native}/gsl.c +10 -23
- data/ext/{gsl → gsl_native}/gsl_narray.c +15 -24
- data/ext/{gsl → gsl_native}/histogram.c +123 -150
- data/ext/{gsl → gsl_native}/histogram2d.c +71 -96
- data/ext/{gsl → gsl_native}/histogram3d.c +72 -72
- data/ext/{gsl → gsl_native}/histogram3d_source.c +195 -196
- data/ext/{gsl → gsl_native}/histogram_find.c +31 -33
- data/ext/{gsl → gsl_native}/histogram_oper.c +43 -52
- data/ext/{gsl → gsl_native}/ieee.c +7 -15
- data/ext/{gsl → gsl_native}/include/rb_gsl.h +0 -7
- data/ext/{gsl → gsl_native}/include/rb_gsl_array.h +15 -25
- data/ext/{gsl → gsl_native}/include/rb_gsl_cheb.h +0 -0
- data/ext/{gsl → gsl_native}/include/rb_gsl_common.h +44 -52
- data/ext/{gsl → gsl_native}/include/rb_gsl_complex.h +0 -0
- data/ext/{gsl → gsl_native}/include/rb_gsl_const.h +0 -5
- data/ext/{gsl → gsl_native}/include/rb_gsl_dirac.h +0 -0
- data/ext/{gsl → gsl_native}/include/rb_gsl_eigen.h +0 -0
- data/ext/{gsl → gsl_native}/include/rb_gsl_fft.h +0 -3
- data/ext/{gsl → gsl_native}/include/rb_gsl_fit.h +0 -0
- data/ext/{gsl → gsl_native}/include/rb_gsl_function.h +0 -0
- data/ext/{gsl → gsl_native}/include/rb_gsl_graph.h +2 -2
- data/ext/{gsl → gsl_native}/include/rb_gsl_histogram.h +8 -8
- data/ext/{gsl → gsl_native}/include/rb_gsl_histogram3d.h +50 -50
- data/ext/{gsl → gsl_native}/include/rb_gsl_integration.h +0 -0
- data/ext/{gsl → gsl_native}/include/rb_gsl_interp.h +0 -0
- data/ext/{gsl → gsl_native}/include/rb_gsl_linalg.h +0 -1
- data/ext/{gsl → gsl_native}/include/rb_gsl_math.h +0 -4
- data/ext/{gsl → gsl_native}/include/rb_gsl_odeiv.h +0 -0
- data/ext/{gsl → gsl_native}/include/rb_gsl_poly.h +3 -3
- data/ext/{gsl → gsl_native}/include/rb_gsl_rational.h +1 -1
- data/ext/{gsl → gsl_native}/include/rb_gsl_rng.h +0 -0
- data/ext/{gsl → gsl_native}/include/rb_gsl_root.h +0 -0
- data/ext/{gsl → gsl_native}/include/rb_gsl_sf.h +39 -43
- data/ext/{gsl → gsl_native}/include/rb_gsl_statistics.h +0 -0
- data/ext/{gsl → gsl_native}/include/rb_gsl_tensor.h +0 -0
- data/ext/{gsl → gsl_native}/include/rb_gsl_with_narray.h +0 -0
- data/ext/{gsl → gsl_native}/include/templates_off.h +0 -0
- data/ext/{gsl → gsl_native}/include/templates_on.h +1 -1
- data/ext/{gsl → gsl_native}/integration.c +160 -183
- data/ext/{gsl → gsl_native}/interp.c +23 -31
- data/ext/gsl_native/jacobi.c +733 -0
- data/ext/{gsl → gsl_native}/linalg.c +448 -576
- data/ext/{gsl → gsl_native}/linalg_complex.c +84 -98
- data/ext/{gsl → gsl_native}/math.c +45 -63
- data/ext/{gsl → gsl_native}/matrix.c +4 -6
- data/ext/{gsl → gsl_native}/matrix_complex.c +111 -114
- data/ext/{gsl → gsl_native}/matrix_double.c +74 -77
- data/ext/{gsl → gsl_native}/matrix_int.c +49 -50
- data/ext/{gsl/matrix_source.c → gsl_native/matrix_source.h} +280 -302
- data/ext/{gsl → gsl_native}/min.c +43 -74
- data/ext/{gsl → gsl_native}/monte.c +45 -59
- data/ext/{gsl → gsl_native}/multifit.c +138 -147
- data/ext/{gsl → gsl_native}/multimin.c +55 -83
- data/ext/{gsl → gsl_native}/multimin_fsdf.c +15 -15
- data/ext/{gsl → gsl_native}/multiroots.c +61 -64
- data/ext/{gsl → gsl_native}/multiset.c +3 -7
- data/ext/{gsl → gsl_native}/ndlinear.c +320 -321
- data/ext/{gsl → gsl_native}/nmf.c +11 -11
- data/ext/{gsl → gsl_native}/nmf_wrap.c +1 -1
- data/ext/{gsl → gsl_native}/ntuple.c +13 -13
- data/ext/{gsl → gsl_native}/odeiv.c +95 -106
- data/ext/gsl_native/ool.c +879 -0
- data/ext/{gsl → gsl_native}/permutation.c +36 -34
- data/ext/{gsl → gsl_native}/poly.c +2 -5
- data/ext/{gsl → gsl_native}/poly2.c +6 -6
- data/ext/{gsl/poly_source.c → gsl_native/poly_source.h} +232 -275
- data/ext/{gsl → gsl_native}/qrng.c +6 -17
- data/ext/{gsl → gsl_native}/randist.c +218 -243
- data/ext/{gsl → gsl_native}/rational.c +9 -9
- data/ext/{gsl → gsl_native}/rng.c +29 -45
- data/ext/{gsl → gsl_native}/root.c +43 -43
- data/ext/{gsl → gsl_native}/sf.c +163 -197
- data/ext/{gsl → gsl_native}/sf_airy.c +0 -0
- data/ext/{gsl → gsl_native}/sf_bessel.c +6 -6
- data/ext/{gsl → gsl_native}/sf_clausen.c +0 -0
- data/ext/{gsl → gsl_native}/sf_coulomb.c +39 -39
- data/ext/{gsl → gsl_native}/sf_coupling.c +29 -29
- data/ext/{gsl → gsl_native}/sf_dawson.c +0 -0
- data/ext/{gsl → gsl_native}/sf_debye.c +0 -9
- data/ext/{gsl → gsl_native}/sf_dilog.c +0 -0
- data/ext/{gsl → gsl_native}/sf_elementary.c +2 -2
- data/ext/{gsl → gsl_native}/sf_ellint.c +42 -42
- data/ext/{gsl → gsl_native}/sf_elljac.c +2 -2
- data/ext/{gsl → gsl_native}/sf_erfc.c +0 -4
- data/ext/{gsl → gsl_native}/sf_exp.c +2 -2
- data/ext/{gsl → gsl_native}/sf_expint.c +1 -11
- data/ext/{gsl → gsl_native}/sf_fermi_dirac.c +0 -0
- data/ext/{gsl → gsl_native}/sf_gamma.c +1 -5
- data/ext/{gsl → gsl_native}/sf_gegenbauer.c +0 -0
- data/ext/{gsl → gsl_native}/sf_hyperg.c +0 -0
- data/ext/{gsl → gsl_native}/sf_laguerre.c +3 -3
- data/ext/{gsl → gsl_native}/sf_lambert.c +0 -0
- data/ext/{gsl → gsl_native}/sf_legendre.c +0 -0
- data/ext/{gsl → gsl_native}/sf_log.c +3 -3
- data/ext/gsl_native/sf_mathieu.c +235 -0
- data/ext/{gsl → gsl_native}/sf_power.c +0 -0
- data/ext/{gsl → gsl_native}/sf_psi.c +2 -11
- data/ext/{gsl → gsl_native}/sf_synchrotron.c +0 -0
- data/ext/{gsl → gsl_native}/sf_transport.c +0 -0
- data/ext/{gsl → gsl_native}/sf_trigonometric.c +3 -3
- data/ext/{gsl → gsl_native}/sf_zeta.c +0 -4
- data/ext/{gsl → gsl_native}/signal.c +60 -64
- data/ext/{gsl → gsl_native}/siman.c +36 -40
- data/ext/{gsl → gsl_native}/sort.c +3 -4
- data/ext/{gsl → gsl_native}/spline.c +25 -43
- data/ext/{gsl → gsl_native}/stats.c +102 -115
- data/ext/{gsl → gsl_native}/sum.c +32 -32
- data/ext/{gsl → gsl_native}/tamu_anova.c +0 -0
- data/ext/{gsl → gsl_native}/tensor.c +2 -4
- data/ext/{gsl/tensor_source.c → gsl_native/tensor_source.h} +144 -144
- data/ext/{gsl → gsl_native}/vector.c +2 -4
- data/ext/{gsl → gsl_native}/vector_complex.c +165 -171
- data/ext/{gsl → gsl_native}/vector_double.c +167 -174
- data/ext/{gsl → gsl_native}/vector_int.c +23 -25
- data/ext/{gsl/vector_source.c → gsl_native/vector_source.h} +400 -414
- data/ext/{gsl → gsl_native}/wavelet.c +215 -236
- data/lib/gsl.rb +1 -7
- data/lib/gsl/gnuplot.rb +2 -2
- data/lib/gsl/version.rb +1 -3
- data/rb-gsl.gemspec +29 -0
- data/rdoc/blas.rdoc +3 -3
- data/rdoc/bspline.rdoc +7 -7
- data/rdoc/cheb.rdoc +8 -8
- data/rdoc/cholesky_complex.rdoc +1 -1
- data/rdoc/combi.rdoc +9 -9
- data/rdoc/complex.rdoc +11 -11
- data/rdoc/const.rdoc +20 -20
- data/rdoc/dht.rdoc +6 -6
- data/rdoc/diff.rdoc +6 -6
- data/rdoc/ehandling.rdoc +3 -3
- data/rdoc/eigen.rdoc +11 -11
- data/rdoc/fft.rdoc +26 -26
- data/rdoc/fit.rdoc +18 -18
- data/rdoc/graph.rdoc +2 -2
- data/rdoc/hist.rdoc +16 -16
- data/rdoc/hist2d.rdoc +4 -4
- data/rdoc/hist3d.rdoc +3 -3
- data/rdoc/integration.rdoc +16 -16
- data/rdoc/interp.rdoc +11 -11
- data/rdoc/intro.rdoc +3 -3
- data/rdoc/linalg.rdoc +20 -20
- data/rdoc/linalg_complex.rdoc +1 -1
- data/rdoc/math.rdoc +13 -13
- data/rdoc/matrix.rdoc +22 -22
- data/rdoc/min.rdoc +9 -9
- data/rdoc/monte.rdoc +3 -3
- data/rdoc/multimin.rdoc +12 -12
- data/rdoc/multiroot.rdoc +12 -12
- data/rdoc/narray.rdoc +9 -9
- data/rdoc/ndlinear.rdoc +4 -4
- data/rdoc/nonlinearfit.rdoc +17 -17
- data/rdoc/ntuple.rdoc +5 -5
- data/rdoc/odeiv.rdoc +12 -12
- data/rdoc/perm.rdoc +11 -11
- data/rdoc/poly.rdoc +17 -17
- data/rdoc/qrng.rdoc +9 -9
- data/rdoc/randist.rdoc +10 -10
- data/rdoc/ref.rdoc +49 -49
- data/rdoc/rng.rdoc +9 -9
- data/rdoc/roots.rdoc +12 -12
- data/rdoc/sf.rdoc +35 -35
- data/rdoc/siman.rdoc +3 -3
- data/rdoc/sort.rdoc +6 -6
- data/rdoc/start.rdoc +2 -2
- data/rdoc/stats.rdoc +13 -13
- data/rdoc/sum.rdoc +4 -4
- data/rdoc/tensor.rdoc +3 -3
- data/rdoc/tut.rdoc +1 -1
- data/rdoc/use.rdoc +3 -3
- data/rdoc/vector.rdoc +28 -28
- data/rdoc/vector_complex.rdoc +6 -6
- data/rdoc/wavelet.rdoc +8 -8
- data/test/gsl/blas_test.rb +1 -1
- data/test/gsl/index_test.rb +61 -0
- data/test/gsl/matrix_test.rb +21 -0
- data/uncrustify.cfg +1693 -0
- metadata +212 -243
- data/README +0 -28
- data/ext/gsl/bspline.c +0 -130
- data/ext/gsl/const.c +0 -672
- data/ext/gsl/cqp.c +0 -283
- data/ext/gsl/fcmp.c +0 -64
- data/ext/gsl/fresnel.c +0 -312
- data/ext/gsl/jacobi.c +0 -739
- data/ext/gsl/ool.c +0 -879
- data/ext/gsl/oper_complex_source.c +0 -251
- data/ext/gsl/sf_mathieu.c +0 -238
- data/rdoc/index.rdoc +0 -50
File without changes
|
File without changes
|
@@ -13,7 +13,7 @@
|
|
13
13
|
|
14
14
|
static VALUE rb_gsl_sf_sin(VALUE obj, VALUE x)
|
15
15
|
{
|
16
|
-
if (COMPLEX_P(x) || VECTOR_COMPLEX_P(x) || MATRIX_COMPLEX_P(x))
|
16
|
+
if (COMPLEX_P(x) || VECTOR_COMPLEX_P(x) || MATRIX_COMPLEX_P(x))
|
17
17
|
return rb_gsl_math_complex_eval(gsl_complex_sin, x);
|
18
18
|
return rb_gsl_sf_eval1(gsl_sf_sin, x);
|
19
19
|
}
|
@@ -25,7 +25,7 @@ static VALUE rb_gsl_sf_sin_e(VALUE obj, VALUE x)
|
|
25
25
|
|
26
26
|
static VALUE rb_gsl_sf_cos(VALUE obj, VALUE x)
|
27
27
|
{
|
28
|
-
if (COMPLEX_P(x) || VECTOR_COMPLEX_P(x) || MATRIX_COMPLEX_P(x))
|
28
|
+
if (COMPLEX_P(x) || VECTOR_COMPLEX_P(x) || MATRIX_COMPLEX_P(x))
|
29
29
|
return rb_gsl_math_complex_eval(gsl_complex_cos, x);
|
30
30
|
return rb_gsl_sf_eval1(gsl_sf_cos, x);
|
31
31
|
}
|
@@ -57,7 +57,7 @@ static VALUE rb_gsl_sf_sinc_e(VALUE obj, VALUE x)
|
|
57
57
|
}
|
58
58
|
|
59
59
|
static VALUE rb_gsl_sf_complex_XXX_e(int argc, VALUE *argv, VALUE obj,
|
60
|
-
|
60
|
+
int (*f)(double, double, gsl_sf_result*, gsl_sf_result*))
|
61
61
|
{
|
62
62
|
gsl_sf_result *r1, *r2;
|
63
63
|
gsl_complex *z;
|
@@ -68,7 +68,6 @@ static VALUE rb_gsl_sf_eta_e(VALUE obj, VALUE x)
|
|
68
68
|
return rb_gsl_sf_eval_e(gsl_sf_eta_e, x);
|
69
69
|
}
|
70
70
|
|
71
|
-
#ifdef GSL_1_4_9_LATER
|
72
71
|
static VALUE rb_gsl_sf_zetam1_int(VALUE obj, VALUE n)
|
73
72
|
{
|
74
73
|
VALUE nn;
|
@@ -94,7 +93,6 @@ static VALUE rb_gsl_sf_zetam1_e(VALUE obj, VALUE x)
|
|
94
93
|
{
|
95
94
|
return rb_gsl_sf_eval_e(gsl_sf_zetam1_e, x);
|
96
95
|
}
|
97
|
-
#endif
|
98
96
|
|
99
97
|
void Init_gsl_sf_zeta(VALUE module)
|
100
98
|
{
|
@@ -110,10 +108,8 @@ void Init_gsl_sf_zeta(VALUE module)
|
|
110
108
|
rb_define_module_function(module, "eta", rb_gsl_sf_eta, 1);
|
111
109
|
rb_define_module_function(module, "eta_e", rb_gsl_sf_eta_e, 1);
|
112
110
|
|
113
|
-
#ifdef GSL_1_4_9_LATER
|
114
111
|
rb_define_module_function(module, "zetam1_int", rb_gsl_sf_zetam1_int, 1);
|
115
112
|
rb_define_module_function(module, "zetam1_int_e", rb_gsl_sf_zetam1_int_e, 1);
|
116
113
|
rb_define_module_function(module, "zetam1", rb_gsl_sf_zetam1, 1);
|
117
114
|
rb_define_module_function(module, "zetam1_e", rb_gsl_sf_zetam1_e, 1);
|
118
|
-
#endif
|
119
115
|
}
|
@@ -16,43 +16,43 @@ enum FFT_CONV_CORR {
|
|
16
16
|
RB_GSL_FFT_CORRELATE = 1,
|
17
17
|
RB_GSL_FFT_REAL = 2,
|
18
18
|
RB_GSL_FFT_HALFCOMPLEX = 3,
|
19
|
-
RB_GSL_FFT_DECONVOLVE = 4,
|
19
|
+
RB_GSL_FFT_DECONVOLVE = 4,
|
20
20
|
};
|
21
21
|
|
22
22
|
#ifndef WAVETABLE_P
|
23
|
-
#define WAVETABLE_P(x) (rb_obj_is_kind_of(x,cgsl_fft_halfcomplex_wavetable)?1:0)
|
23
|
+
#define WAVETABLE_P(x) (rb_obj_is_kind_of(x,cgsl_fft_halfcomplex_wavetable) ? 1 : 0)
|
24
24
|
#endif
|
25
25
|
|
26
26
|
#ifndef CHECK_WAVETABLE
|
27
|
-
#define CHECK_WAVETABLE(x) if(!rb_obj_is_kind_of(x,cgsl_fft_halfcomplex_wavetable))\
|
27
|
+
#define CHECK_WAVETABLE(x) if(!rb_obj_is_kind_of(x,cgsl_fft_halfcomplex_wavetable)) \
|
28
28
|
rb_raise(rb_eTypeError, "wrong argument type (FFT::HalfComplex::Wavetable expected)");
|
29
29
|
#endif
|
30
30
|
|
31
31
|
#ifndef WORKSPACE_P
|
32
|
-
#define WORKSPACE_P(x) (rb_obj_is_kind_of(x,cgsl_fft_real_workspace)?1:0)
|
32
|
+
#define WORKSPACE_P(x) (rb_obj_is_kind_of(x,cgsl_fft_real_workspace) ? 1 : 0)
|
33
33
|
#endif
|
34
34
|
|
35
35
|
#ifndef CHECK_WORKSPACE
|
36
|
-
#define CHECK_WORKSPACE(x) if(!rb_obj_is_kind_of(x,cgsl_fft_real_workspace))\
|
36
|
+
#define CHECK_WORKSPACE(x) if(!rb_obj_is_kind_of(x,cgsl_fft_real_workspace)) \
|
37
37
|
rb_raise(rb_eTypeError, "wrong argument type (FFT::Real::Workspace expected)");
|
38
38
|
#endif
|
39
39
|
|
40
40
|
static void complex_mul(double re1, double im1, double re2, double im2,
|
41
|
-
|
41
|
+
double *re, double *im)
|
42
42
|
{
|
43
43
|
*re = re1*re2 - im1*im2;
|
44
44
|
*im = re1*im2 + im1*re2;
|
45
45
|
}
|
46
46
|
|
47
47
|
static void complex_conj_mul(double re1, double im1, double re2, double im2,
|
48
|
-
|
48
|
+
double *re, double *im)
|
49
49
|
{
|
50
50
|
*re = re1*re2 + im1*im2;
|
51
51
|
*im = -re1*im2 + im1*re2;
|
52
52
|
}
|
53
53
|
|
54
54
|
static void complex_div(double re1, double im1, double re2, double im2,
|
55
|
-
|
55
|
+
double *re, double *im)
|
56
56
|
{
|
57
57
|
double factor = re2*re2 + im2*im2;
|
58
58
|
complex_conj_mul(re1, im1, re2, im2, re, im);
|
@@ -61,55 +61,50 @@ static void complex_div(double re1, double im1, double re2, double im2,
|
|
61
61
|
}
|
62
62
|
|
63
63
|
/* data1, data2: FFTed data */
|
64
|
-
static void rbgsl_calc_conv_corr_c(const double *data1, const double *data2,
|
65
|
-
|
66
|
-
|
67
|
-
|
64
|
+
static void rbgsl_calc_conv_corr_c(const double *data1, const double *data2,
|
65
|
+
double *data3, size_t size,
|
66
|
+
gsl_fft_halfcomplex_wavetable *table,
|
67
|
+
gsl_fft_real_workspace *space, enum FFT_CONV_CORR calcflag)
|
68
68
|
{
|
69
69
|
size_t i;
|
70
70
|
double re1, re2, im1, im2;
|
71
71
|
void (*complex_cal)(double, double, double, double, double*, double*);
|
72
|
-
|
72
|
+
|
73
73
|
switch (calcflag) {
|
74
74
|
case RB_GSL_FFT_CONVOLVE:
|
75
75
|
complex_cal = complex_mul;
|
76
76
|
data3[0] = data1[0]*data2[0];
|
77
|
-
data3[size-1] = data1[size-1]*data2[size-1];
|
77
|
+
data3[size-1] = data1[size-1]*data2[size-1];
|
78
78
|
break;
|
79
|
-
case RB_GSL_FFT_CORRELATE:
|
80
|
-
data3[0] = data1[0]*data2[0];
|
81
|
-
data3[size-1] = data1[size-1]*data2[size-1];
|
79
|
+
case RB_GSL_FFT_CORRELATE:
|
80
|
+
data3[0] = data1[0]*data2[0];
|
81
|
+
data3[size-1] = data1[size-1]*data2[size-1];
|
82
82
|
complex_cal = complex_conj_mul;
|
83
83
|
break;
|
84
84
|
case RB_GSL_FFT_DECONVOLVE:
|
85
85
|
complex_cal = complex_div;
|
86
86
|
data3[0] = data1[0]/data2[0];
|
87
|
-
data3[size-1] = data1[size-1]/data2[size-1];
|
87
|
+
data3[size-1] = data1[size-1]/data2[size-1];
|
88
88
|
break;
|
89
89
|
default:
|
90
90
|
rb_raise(rb_eArgError, "Wrong flag.");
|
91
91
|
break;
|
92
92
|
}
|
93
|
-
|
94
|
-
for (i = 1; i < size-1; i+=2) {
|
93
|
+
|
94
|
+
for (i = 1; i < size-1; i += 2) {
|
95
95
|
re1 = data1[i]; im1 = data1[i+1];
|
96
96
|
re2 = data2[i]; im2 = data2[i+1];
|
97
97
|
(*complex_cal)(re1, im1, re2, im2, &data3[i], &data3[i+1]);
|
98
98
|
}
|
99
|
-
|
100
99
|
}
|
101
100
|
|
102
101
|
static VALUE rb_gsl_fft_conv_corr(int argc, VALUE *argv, VALUE obj,
|
103
|
-
|
104
|
-
|
102
|
+
enum FFT_CONV_CORR flag1,
|
103
|
+
enum FFT_CONV_CORR flag2)
|
105
104
|
{
|
106
105
|
double *data1, *data2, *data3 = NULL;
|
107
106
|
size_t stride1, stride2, size1, size2;
|
108
|
-
#ifdef HAVE_NARRAY_H
|
109
|
-
int naflag1, naflag2, shape;
|
110
|
-
#else
|
111
107
|
int naflag1, naflag2;
|
112
|
-
#endif
|
113
108
|
gsl_vector *v = NULL;
|
114
109
|
gsl_fft_halfcomplex_wavetable *table = NULL;
|
115
110
|
gsl_fft_real_wavetable *rtable = NULL;
|
@@ -139,10 +134,10 @@ static VALUE rb_gsl_fft_conv_corr(int argc, VALUE *argv, VALUE obj,
|
|
139
134
|
table = gsl_fft_halfcomplex_wavetable_alloc(size1);
|
140
135
|
flagt = 1;
|
141
136
|
} else {
|
142
|
-
rb_raise(rb_eTypeError,
|
143
|
-
|
144
|
-
|
145
|
-
|
137
|
+
rb_raise(rb_eTypeError,
|
138
|
+
"wrong argument type %s "
|
139
|
+
"(FFT::HalfComplex::Wavetable or FFT::Real::Workspace expected)",
|
140
|
+
rb_class2name(CLASS_OF(argv[2])));
|
146
141
|
}
|
147
142
|
break;
|
148
143
|
case 1:
|
@@ -164,7 +159,7 @@ static VALUE rb_gsl_fft_conv_corr(int argc, VALUE *argv, VALUE obj,
|
|
164
159
|
case RB_GSL_FFT_REAL:
|
165
160
|
ary = Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, v);
|
166
161
|
break;
|
167
|
-
default:
|
162
|
+
default:
|
168
163
|
ary = Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, v);
|
169
164
|
break;
|
170
165
|
}
|
@@ -172,9 +167,11 @@ static VALUE rb_gsl_fft_conv_corr(int argc, VALUE *argv, VALUE obj,
|
|
172
167
|
break;
|
173
168
|
case 1:
|
174
169
|
#ifdef HAVE_NARRAY_H
|
175
|
-
|
176
|
-
|
177
|
-
|
170
|
+
{
|
171
|
+
int shape = (int) size1;
|
172
|
+
ary = na_make_object(NA_DFLOAT, 1, &shape, cNArray);
|
173
|
+
data3 = NA_PTR_TYPE(ary, double*);
|
174
|
+
}
|
178
175
|
#endif
|
179
176
|
break;
|
180
177
|
default:
|
@@ -190,10 +187,10 @@ static VALUE rb_gsl_fft_conv_corr(int argc, VALUE *argv, VALUE obj,
|
|
190
187
|
data2 = vtmp2->data;
|
191
188
|
rtable = gsl_fft_real_wavetable_alloc(size1);
|
192
189
|
if (size1 == space->n) {
|
193
|
-
gsl_fft_real_transform(data1, stride1, size1, rtable, space);
|
190
|
+
gsl_fft_real_transform(data1, stride1, size1, rtable, space);
|
194
191
|
} else {
|
195
192
|
space2 = gsl_fft_real_workspace_alloc(size1);
|
196
|
-
gsl_fft_real_transform(data1, stride1, size1, rtable, space2);
|
193
|
+
gsl_fft_real_transform(data1, stride1, size1, rtable, space2);
|
197
194
|
/* no freeing space2 here */
|
198
195
|
}
|
199
196
|
if (size1 != size2) {
|
@@ -201,14 +198,14 @@ static VALUE rb_gsl_fft_conv_corr(int argc, VALUE *argv, VALUE obj,
|
|
201
198
|
rtable = gsl_fft_real_wavetable_alloc(size2);
|
202
199
|
}
|
203
200
|
if (size2 == space->n) {
|
204
|
-
gsl_fft_real_transform(data2, stride2, size2, rtable, space);
|
201
|
+
gsl_fft_real_transform(data2, stride2, size2, rtable, space);
|
205
202
|
} else if (size2 == size1) {
|
206
|
-
gsl_fft_real_transform(data2, stride2, size2, rtable, space2);
|
203
|
+
gsl_fft_real_transform(data2, stride2, size2, rtable, space2);
|
207
204
|
gsl_fft_real_workspace_free(space2);
|
208
205
|
} else {
|
209
206
|
if (space2) gsl_fft_real_workspace_free(space2);
|
210
207
|
space2 = gsl_fft_real_workspace_alloc(size2);
|
211
|
-
gsl_fft_real_transform(data2, stride2, size2, rtable, space2);
|
208
|
+
gsl_fft_real_transform(data2, stride2, size2, rtable, space2);
|
212
209
|
gsl_fft_real_workspace_free(space2);
|
213
210
|
}
|
214
211
|
gsl_fft_real_wavetable_free(rtable);
|
@@ -222,14 +219,13 @@ static VALUE rb_gsl_fft_conv_corr(int argc, VALUE *argv, VALUE obj,
|
|
222
219
|
/* not occur */
|
223
220
|
break;
|
224
221
|
}
|
225
|
-
|
222
|
+
|
226
223
|
rbgsl_calc_conv_corr_c(data1, data2, data3, size1, table, space, flag2);
|
227
224
|
|
228
225
|
if (flag1 == RB_GSL_FFT_REAL) {
|
229
226
|
gsl_fft_halfcomplex_inverse(data3, 1, size1, table, space);
|
230
227
|
// for (i = 0; i < size1; i++) data3[i] /= size1;
|
231
228
|
}
|
232
|
-
|
233
229
|
if (flagt == 1) gsl_fft_halfcomplex_wavetable_free(table);
|
234
230
|
if (flagw == 1) gsl_fft_real_workspace_free(space);
|
235
231
|
if (vtmp1) gsl_vector_free(vtmp1);
|
@@ -240,61 +236,61 @@ static VALUE rb_gsl_fft_conv_corr(int argc, VALUE *argv, VALUE obj,
|
|
240
236
|
/* GSL::Vector#convolve */
|
241
237
|
static VALUE rb_gsl_fft_real_convolve(int argc, VALUE *argv, VALUE obj)
|
242
238
|
{
|
243
|
-
return rb_gsl_fft_conv_corr(argc, argv, obj,
|
244
|
-
|
245
|
-
|
239
|
+
return rb_gsl_fft_conv_corr(argc, argv, obj,
|
240
|
+
RB_GSL_FFT_REAL,
|
241
|
+
RB_GSL_FFT_CONVOLVE);
|
246
242
|
}
|
247
243
|
/* GSL::Vector#deconvolve */
|
248
244
|
static VALUE rb_gsl_fft_real_deconvolve(int argc, VALUE *argv, VALUE obj)
|
249
245
|
{
|
250
|
-
return rb_gsl_fft_conv_corr(argc, argv, obj,
|
251
|
-
|
252
|
-
|
246
|
+
return rb_gsl_fft_conv_corr(argc, argv, obj,
|
247
|
+
RB_GSL_FFT_REAL,
|
248
|
+
RB_GSL_FFT_DECONVOLVE);
|
253
249
|
}
|
254
250
|
|
255
251
|
/* GSL::Vector#correlate */
|
256
252
|
static VALUE rb_gsl_fft_real_correlate(int argc, VALUE *argv, VALUE obj)
|
257
253
|
{
|
258
|
-
return rb_gsl_fft_conv_corr(argc, argv, obj,
|
259
|
-
|
260
|
-
|
254
|
+
return rb_gsl_fft_conv_corr(argc, argv, obj,
|
255
|
+
RB_GSL_FFT_REAL,
|
256
|
+
RB_GSL_FFT_CORRELATE);
|
261
257
|
}
|
262
258
|
|
263
259
|
/* GSL::Vector#halfcomplex_convolve */
|
264
260
|
static VALUE rb_gsl_fft_halfcomplex_convolve(int argc, VALUE *argv, VALUE obj)
|
265
261
|
{
|
266
|
-
return rb_gsl_fft_conv_corr(argc, argv, obj,
|
267
|
-
|
268
|
-
|
262
|
+
return rb_gsl_fft_conv_corr(argc, argv, obj,
|
263
|
+
RB_GSL_FFT_HALFCOMPLEX,
|
264
|
+
RB_GSL_FFT_CONVOLVE);
|
269
265
|
}
|
270
266
|
/* GSL::Vector#halfcomplex_deconvolve */
|
271
267
|
static VALUE rb_gsl_fft_halfcomplex_deconvolve(int argc, VALUE *argv, VALUE obj)
|
272
268
|
{
|
273
|
-
return rb_gsl_fft_conv_corr(argc, argv, obj,
|
274
|
-
|
275
|
-
|
269
|
+
return rb_gsl_fft_conv_corr(argc, argv, obj,
|
270
|
+
RB_GSL_FFT_HALFCOMPLEX,
|
271
|
+
RB_GSL_FFT_DECONVOLVE);
|
276
272
|
}
|
277
273
|
/* GSL::Vector#halfcomplex_correlate */
|
278
274
|
static VALUE rb_gsl_fft_halfcomplex_correlate(int argc, VALUE *argv, VALUE obj)
|
279
275
|
{
|
280
|
-
return rb_gsl_fft_conv_corr(argc, argv, obj,
|
281
|
-
|
282
|
-
|
276
|
+
return rb_gsl_fft_conv_corr(argc, argv, obj,
|
277
|
+
RB_GSL_FFT_HALFCOMPLEX,
|
278
|
+
RB_GSL_FFT_CORRELATE);
|
283
279
|
}
|
284
280
|
|
285
281
|
void Init_gsl_signal(VALUE module)
|
286
282
|
{
|
287
283
|
rb_define_method(cgsl_vector, "real_convolve", rb_gsl_fft_real_convolve, -1);
|
288
|
-
rb_define_method(cgsl_vector, "real_deconvolve", rb_gsl_fft_real_deconvolve, -1);
|
289
|
-
rb_define_method(cgsl_vector, "real_correlate", rb_gsl_fft_real_correlate, -1);
|
284
|
+
rb_define_method(cgsl_vector, "real_deconvolve", rb_gsl_fft_real_deconvolve, -1);
|
285
|
+
rb_define_method(cgsl_vector, "real_correlate", rb_gsl_fft_real_correlate, -1);
|
290
286
|
|
291
287
|
rb_define_alias(cgsl_vector, "convolve", "real_convolve");
|
292
288
|
rb_define_alias(cgsl_vector, "deconvolve", "real_deconvolve");
|
293
289
|
rb_define_alias(cgsl_vector, "correlate", "real_correlate");
|
294
290
|
|
295
291
|
rb_define_method(cgsl_vector, "halfcomplex_convolve", rb_gsl_fft_halfcomplex_convolve, -1);
|
296
|
-
rb_define_method(cgsl_vector, "halfcomplex_deconvolve", rb_gsl_fft_halfcomplex_deconvolve, -1);
|
297
|
-
rb_define_method(cgsl_vector, "halfcomplex_correlate", rb_gsl_fft_halfcomplex_correlate, -1);
|
292
|
+
rb_define_method(cgsl_vector, "halfcomplex_deconvolve", rb_gsl_fft_halfcomplex_deconvolve, -1);
|
293
|
+
rb_define_method(cgsl_vector, "halfcomplex_correlate", rb_gsl_fft_halfcomplex_correlate, -1);
|
298
294
|
|
299
295
|
rb_define_alias(cgsl_vector, "hc_convolve", "halfcomplex_convolve");
|
300
296
|
rb_define_alias(cgsl_vector, "hc_deconvolve", "halfcomplex_deconvolve");
|
@@ -331,7 +331,7 @@ static siman_metric* siman_metric_alloc()
|
|
331
331
|
se = ALLOC(siman_metric);
|
332
332
|
if (se == NULL) rb_raise(rb_eRuntimeError, "ALLOC failed");
|
333
333
|
se->siman_metric_t = &rb_gsl_siman_metric_t;
|
334
|
-
|
334
|
+
return se;
|
335
335
|
}
|
336
336
|
|
337
337
|
static void siman_metric_mark(siman_metric *se)
|
@@ -419,22 +419,22 @@ static VALUE rb_gsl_siman_params_set(int argc, VALUE *argv, VALUE obj)
|
|
419
419
|
switch (argc) {
|
420
420
|
case 7:
|
421
421
|
params->t_min = NUM2DBL(argv[6]);
|
422
|
-
|
422
|
+
/* no break */
|
423
423
|
case 6:
|
424
424
|
params->mu_t = NUM2DBL(argv[5]);
|
425
|
-
|
425
|
+
/* no break */
|
426
426
|
case 5:
|
427
427
|
params->t_initial = NUM2DBL(argv[4]);
|
428
|
-
|
428
|
+
/* no break */
|
429
429
|
case 4:
|
430
430
|
params->k = NUM2DBL(argv[3]);
|
431
|
-
|
431
|
+
/* no break */
|
432
432
|
case 3:
|
433
433
|
params->step_size = NUM2DBL(argv[2]);
|
434
|
-
|
434
|
+
/* no break */
|
435
435
|
case 2:
|
436
436
|
params->iters_fixed_T = NUM2INT(argv[1]);
|
437
|
-
|
437
|
+
/* no break */
|
438
438
|
case 1:
|
439
439
|
params->n_tries = NUM2INT(argv[0]);
|
440
440
|
}
|
@@ -551,16 +551,16 @@ static VALUE rb_gsl_siman_params_params(VALUE obj)
|
|
551
551
|
gsl_siman_params_t *params = NULL;
|
552
552
|
Data_Get_Struct(obj, gsl_siman_params_t, params);
|
553
553
|
return rb_ary_new3(7, INT2FIX(params->n_tries), INT2FIX(params->iters_fixed_T),
|
554
|
-
|
555
|
-
|
556
|
-
|
554
|
+
rb_float_new(params->step_size), rb_float_new(params->k),
|
555
|
+
rb_float_new(params->t_initial), rb_float_new(params->mu_t),
|
556
|
+
rb_float_new(params->t_min));
|
557
557
|
}
|
558
558
|
|
559
559
|
/***** solver *****/
|
560
560
|
static VALUE rb_gsl_siman_solver_solve(VALUE obj, VALUE rng,
|
561
|
-
|
562
|
-
|
563
|
-
|
561
|
+
VALUE vx0p, VALUE vefunc,
|
562
|
+
VALUE vstep, VALUE vmetric, VALUE vprint,
|
563
|
+
VALUE vparams)
|
564
564
|
{
|
565
565
|
gsl_rng *r = NULL;
|
566
566
|
siman_solver *ss = NULL;
|
@@ -587,17 +587,16 @@ static VALUE rb_gsl_siman_solver_solve(VALUE obj, VALUE rng,
|
|
587
587
|
}
|
588
588
|
if (!rb_obj_is_kind_of(rng, cgsl_rng))
|
589
589
|
rb_raise(rb_eTypeError, "wrong argument type %s (GSL::Rng expected)",
|
590
|
-
|
590
|
+
rb_class2name(CLASS_OF(rng)));
|
591
591
|
if (!rb_obj_is_kind_of(vefunc, cgsl_siman_Efunc))
|
592
592
|
rb_raise(rb_eTypeError, "wrong argument type %s (GSL::Siman::Efunc expected)",
|
593
|
-
|
593
|
+
rb_class2name(CLASS_OF(vefunc)));
|
594
594
|
if (!rb_obj_is_kind_of(vstep, cgsl_siman_step))
|
595
595
|
rb_raise(rb_eTypeError, "wrong argument type %s (GSL::Siman::Step expected)",
|
596
|
-
|
596
|
+
rb_class2name(CLASS_OF(vstep)));
|
597
597
|
if (!rb_obj_is_kind_of(vmetric, cgsl_siman_metric))
|
598
598
|
rb_raise(rb_eTypeError, "wrong argument type %s (GSL::Siman::Metric expected)",
|
599
|
-
|
600
|
-
|
599
|
+
rb_class2name(CLASS_OF(vmetric)));
|
601
600
|
Data_Get_Struct(rng, gsl_rng, r);
|
602
601
|
Data_Get_Struct(vefunc, siman_Efunc, efunc);
|
603
602
|
Data_Get_Struct(vstep, siman_step, step);
|
@@ -607,14 +606,13 @@ static VALUE rb_gsl_siman_solver_solve(VALUE obj, VALUE rng,
|
|
607
606
|
} else {
|
608
607
|
if (!rb_obj_is_kind_of(vprint, cgsl_siman_print))
|
609
608
|
rb_raise(rb_eTypeError, "wrong argument type %s (GSL::Siman::Print expected)",
|
610
|
-
|
609
|
+
rb_class2name(CLASS_OF(vprint)));
|
611
610
|
Data_Get_Struct(vprint, siman_print, print);
|
612
611
|
ss->proc_print = print->proc;
|
613
612
|
}
|
614
613
|
if (!rb_obj_is_kind_of(vparams, cgsl_siman_params))
|
615
614
|
rb_raise(rb_eTypeError, "wrong argument type %s (GSL::Siman::Params expected)",
|
616
|
-
|
617
|
-
|
615
|
+
rb_class2name(CLASS_OF(vparams)));
|
618
616
|
Data_Get_Struct(vparams, gsl_siman_params_t, params);
|
619
617
|
|
620
618
|
ss->proc_efunc = efunc->proc;
|
@@ -624,30 +622,28 @@ static VALUE rb_gsl_siman_solver_solve(VALUE obj, VALUE rng,
|
|
624
622
|
gsl_vector_memcpy(ss->vx, vtmp);
|
625
623
|
|
626
624
|
if (NIL_P(vprint)) {
|
627
|
-
gsl_siman_solve(r, ss, rb_gsl_siman_Efunc_t,
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
625
|
+
gsl_siman_solve(r, ss, rb_gsl_siman_Efunc_t,
|
626
|
+
rb_gsl_siman_step_t,
|
627
|
+
rb_gsl_siman_metric_t,
|
628
|
+
NULL,
|
629
|
+
rb_gsl_siman_copy_t,
|
630
|
+
rb_gsl_siman_copy_construct_t,
|
631
|
+
rb_gsl_siman_destroy_t, 0,
|
632
|
+
*params);
|
635
633
|
|
636
634
|
} else {
|
637
|
-
gsl_siman_solve(r, ss, rb_gsl_siman_Efunc_t,
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
635
|
+
gsl_siman_solve(r, ss, rb_gsl_siman_Efunc_t,
|
636
|
+
rb_gsl_siman_step_t,
|
637
|
+
rb_gsl_siman_metric_t,
|
638
|
+
rb_gsl_siman_print_t,
|
639
|
+
rb_gsl_siman_copy_t,
|
640
|
+
rb_gsl_siman_copy_construct_t,
|
641
|
+
rb_gsl_siman_destroy_t, 0,
|
642
|
+
*params);
|
645
643
|
}
|
646
|
-
|
647
644
|
gsl_vector_memcpy(vtmp, ss->vx);
|
648
645
|
|
649
646
|
if (flag == 1) gsl_siman_solver_free(ss);
|
650
|
-
|
651
647
|
return obj;
|
652
648
|
}
|
653
649
|
|
@@ -681,7 +677,7 @@ void Init_gsl_siman(VALUE module)
|
|
681
677
|
rb_define_singleton_method(cgsl_siman_metric, "alloc", rb_gsl_siman_metric_new, -1);
|
682
678
|
rb_define_method(cgsl_siman_metric, "set", rb_gsl_siman_metric_set, -1);
|
683
679
|
rb_define_alias(cgsl_siman_metric, "set_proc", "set");
|
684
|
-
|
680
|
+
|
685
681
|
/***** params *****/
|
686
682
|
rb_define_singleton_method(cgsl_siman_params, "alloc", rb_gsl_siman_params_new, -1);
|
687
683
|
rb_define_method(cgsl_siman_params, "set", rb_gsl_siman_params_set, -1);
|