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
@@ -74,7 +74,7 @@ static VALUE rb_gsl_complex_arithmetics5(int flag, VALUE obj, VALUE bb)
|
|
74
74
|
case GSL_COMPLEX_DIV:
|
75
75
|
c = ALLOC(gsl_complex);
|
76
76
|
*c = tmp;
|
77
|
-
return Data_Wrap_Struct(cgsl_complex, 0, free, c);
|
77
|
+
return Data_Wrap_Struct(cgsl_complex, 0, free, c);
|
78
78
|
break;
|
79
79
|
}
|
80
80
|
break;
|
@@ -87,83 +87,81 @@ static VALUE rb_gsl_complex_arithmetics5(int flag, VALUE obj, VALUE bb)
|
|
87
87
|
case GSL_COMPLEX_SUB:
|
88
88
|
case GSL_COMPLEX_MUL:
|
89
89
|
case GSL_COMPLEX_DIV:
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
90
|
+
c = ALLOC(gsl_complex);
|
91
|
+
*c = tmp;
|
92
|
+
return Data_Wrap_Struct(cgsl_complex, 0, free, c);
|
93
|
+
break;
|
94
94
|
}
|
95
95
|
} else {
|
96
96
|
if (VECTOR_P(bb)) {
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
97
|
+
Data_Get_Struct(bb, gsl_vector, v);
|
98
|
+
cv = vector_to_complex(v);
|
99
|
+
cvnew = gsl_vector_complex_alloc(v->size);
|
100
|
+
if (cvnew == NULL) rb_raise(rb_eNoMemError, "gsl_vector_complex_alloc failed");
|
101
|
+
gsl_vector_complex_set_all(cvnew, *a);
|
102
|
+
switch (flag) {
|
103
|
+
case GSL_COMPLEX_ADD:
|
104
|
+
gsl_vector_complex_add(cvnew, cv);
|
105
|
+
break;
|
106
|
+
case GSL_COMPLEX_SUB:
|
107
|
+
gsl_vector_complex_sub(cvnew, cv);
|
108
|
+
break;
|
109
|
+
case GSL_COMPLEX_MUL:
|
110
|
+
gsl_vector_complex_mul(cvnew, cv);
|
111
|
+
break;
|
112
|
+
case GSL_COMPLEX_DIV:
|
113
|
+
gsl_vector_complex_add(cvnew, cv);
|
114
|
+
break;
|
115
|
+
}
|
116
|
+
gsl_vector_complex_free(cv);
|
117
|
+
return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_complex_free, cvnew);
|
118
118
|
}
|
119
119
|
if (VECTOR_COMPLEX_P(bb)) {
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
120
|
+
Data_Get_Struct(bb, gsl_vector_complex, cv);
|
121
|
+
cvnew = gsl_vector_complex_alloc(v->size);
|
122
|
+
if (cvnew == NULL) rb_raise(rb_eNoMemError, "gsl_vector_complex_alloc failed");
|
123
|
+
gsl_vector_complex_set_all(cvnew, *a);
|
124
|
+
switch (flag) {
|
125
|
+
case GSL_COMPLEX_ADD:
|
126
|
+
gsl_vector_complex_add(cvnew, cv);
|
127
|
+
break;
|
128
|
+
case GSL_COMPLEX_SUB:
|
129
|
+
gsl_vector_complex_sub(cvnew, cv);
|
130
|
+
break;
|
131
|
+
case GSL_COMPLEX_MUL:
|
132
|
+
gsl_vector_complex_mul(cvnew, cv);
|
133
|
+
break;
|
134
|
+
case GSL_COMPLEX_DIV:
|
135
|
+
gsl_vector_complex_add(cvnew, cv);
|
136
|
+
break;
|
137
|
+
}
|
138
|
+
return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_complex_free, cvnew);
|
139
139
|
}
|
140
|
-
|
141
|
-
|
142
140
|
if (MATRIX_P(bb)) {
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
}
|
147
|
-
|
141
|
+
Data_Get_Struct(bb, gsl_matrix, m);
|
142
|
+
cm = matrix_to_complex(m);
|
143
|
+
flagcm = 1;
|
144
|
+
} else if (MATRIX_COMPLEX_P(bb)) {
|
145
|
+
Data_Get_Struct(bb, gsl_matrix_complex, cm);
|
148
146
|
} else {
|
149
|
-
|
147
|
+
rb_raise(rb_eTypeError, "wrong argument type %s", rb_class2name(CLASS_OF(bb)));
|
150
148
|
}
|
151
149
|
cmself = gsl_matrix_complex_alloc(m->size1, m->size2);
|
152
150
|
if (cmself == NULL) rb_raise(rb_eNoMemError, "gsl_matrix_complex_alloc failed");
|
153
151
|
gsl_matrix_complex_set_all(cmself, *a);
|
154
152
|
switch (flag) {
|
155
153
|
case GSL_COMPLEX_ADD:
|
156
|
-
|
157
|
-
|
154
|
+
gsl_matrix_complex_add(cmself, cm);
|
155
|
+
break;
|
158
156
|
case GSL_COMPLEX_SUB:
|
159
|
-
|
160
|
-
|
157
|
+
gsl_matrix_complex_sub(cmself, cm);
|
158
|
+
break;
|
161
159
|
case GSL_COMPLEX_MUL:
|
162
|
-
|
163
|
-
|
160
|
+
gsl_matrix_complex_mul_elements(cmself, cm);
|
161
|
+
break;
|
164
162
|
case GSL_COMPLEX_DIV:
|
165
|
-
|
166
|
-
|
163
|
+
gsl_matrix_complex_div_elements(cmself, cm);
|
164
|
+
break;
|
167
165
|
}
|
168
166
|
if (flagcm == 1) gsl_matrix_complex_free(cm);
|
169
167
|
return Data_Wrap_Struct(cgsl_matrix_complex, 0, gsl_matrix_complex_free, cmself);
|
@@ -206,7 +204,7 @@ static VALUE rb_gsl_complex_coerce(VALUE obj, VALUE other)
|
|
206
204
|
c = ALLOC(gsl_complex);
|
207
205
|
*c = gsl_complex_rect(x, 0.0);
|
208
206
|
return rb_ary_new3(2, Data_Wrap_Struct(cgsl_complex, 0, free, c),
|
209
|
-
|
207
|
+
obj);
|
210
208
|
break;
|
211
209
|
default:
|
212
210
|
if (MATRIX_P(other)) {
|
@@ -219,7 +217,7 @@ static VALUE rb_gsl_complex_coerce(VALUE obj, VALUE other)
|
|
219
217
|
gsl_matrix_complex_set_all(cmself, *c);
|
220
218
|
vcmself = Data_Wrap_Struct(cgsl_matrix_complex, 0, gsl_matrix_complex_free, cmself);
|
221
219
|
return rb_ary_new3(2, vcmself, vcmnew);
|
222
|
-
}
|
220
|
+
}
|
223
221
|
if (MATRIX_COMPLEX_P(other)) {
|
224
222
|
Data_Get_Struct(other, gsl_matrix_complex, cmnew);
|
225
223
|
cmself = gsl_matrix_complex_alloc(cmnew->size1, cmnew->size2);
|
File without changes
|
@@ -16,10 +16,10 @@
|
|
16
16
|
|
17
17
|
static int get_vector1(int argc, VALUE *argv, VALUE obj, gsl_vector **x);
|
18
18
|
static int get_vector_complex1(int argc, VALUE *argv, VALUE obj, gsl_vector_complex **x);
|
19
|
-
static int get_vector2(int argc, VALUE *argv, VALUE obj,
|
20
|
-
|
21
|
-
static int get_vector_complex2(int argc, VALUE *argv, VALUE obj,
|
22
|
-
|
19
|
+
static int get_vector2(int argc, VALUE *argv, VALUE obj,
|
20
|
+
gsl_vector **x, gsl_vector **y);
|
21
|
+
static int get_vector_complex2(int argc, VALUE *argv, VALUE obj,
|
22
|
+
gsl_vector_complex **x, gsl_vector_complex **y);
|
23
23
|
|
24
24
|
static int get_vector1(int argc, VALUE *argv, VALUE obj, gsl_vector **x)
|
25
25
|
{
|
@@ -29,7 +29,7 @@ static int get_vector1(int argc, VALUE *argv, VALUE obj, gsl_vector **x)
|
|
29
29
|
case T_CLASS:
|
30
30
|
case T_OBJECT:
|
31
31
|
if (argc != 1) rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)",
|
32
|
-
|
32
|
+
argc);
|
33
33
|
Data_Get_Vector(argv[0], (*x));
|
34
34
|
break;
|
35
35
|
default:
|
@@ -48,7 +48,7 @@ static int get_vector_complex1(int argc, VALUE *argv, VALUE obj, gsl_vector_comp
|
|
48
48
|
case T_CLASS:
|
49
49
|
case T_OBJECT:
|
50
50
|
if (argc != 1) rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)",
|
51
|
-
|
51
|
+
argc);
|
52
52
|
CHECK_VECTOR_COMPLEX(argv[0]);
|
53
53
|
Data_Get_Struct(argv[0], gsl_vector_complex, (*x));
|
54
54
|
break;
|
@@ -60,8 +60,8 @@ static int get_vector_complex1(int argc, VALUE *argv, VALUE obj, gsl_vector_comp
|
|
60
60
|
return flag;
|
61
61
|
}
|
62
62
|
|
63
|
-
static int get_vector2(int argc, VALUE *argv, VALUE obj,
|
64
|
-
|
63
|
+
static int get_vector2(int argc, VALUE *argv, VALUE obj,
|
64
|
+
gsl_vector **x, gsl_vector **y)
|
65
65
|
{
|
66
66
|
int flag = 0;
|
67
67
|
switch (TYPE(obj)) {
|
@@ -69,13 +69,13 @@ static int get_vector2(int argc, VALUE *argv, VALUE obj,
|
|
69
69
|
case T_CLASS:
|
70
70
|
case T_OBJECT:
|
71
71
|
if (argc != 2) rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)",
|
72
|
-
|
72
|
+
argc);
|
73
73
|
Data_Get_Vector(argv[0], (*x));
|
74
74
|
Data_Get_Vector(argv[1], (*y));
|
75
75
|
break;
|
76
76
|
default:
|
77
77
|
if (argc != 1) rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)",
|
78
|
-
|
78
|
+
argc);
|
79
79
|
Data_Get_Vector(obj, (*x));
|
80
80
|
Data_Get_Vector(argv[0], (*y));
|
81
81
|
flag = 1;
|
@@ -85,8 +85,8 @@ static int get_vector2(int argc, VALUE *argv, VALUE obj,
|
|
85
85
|
}
|
86
86
|
|
87
87
|
|
88
|
-
static int get_vector_complex2(int argc, VALUE *argv, VALUE obj,
|
89
|
-
|
88
|
+
static int get_vector_complex2(int argc, VALUE *argv, VALUE obj,
|
89
|
+
gsl_vector_complex **x, gsl_vector_complex **y)
|
90
90
|
{
|
91
91
|
int flag = 0;
|
92
92
|
switch (TYPE(obj)) {
|
@@ -94,7 +94,7 @@ static int get_vector_complex2(int argc, VALUE *argv, VALUE obj,
|
|
94
94
|
case T_CLASS:
|
95
95
|
case T_OBJECT:
|
96
96
|
if (argc != 2) rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)",
|
97
|
-
|
97
|
+
argc);
|
98
98
|
CHECK_VECTOR_COMPLEX(argv[0]);
|
99
99
|
CHECK_VECTOR_COMPLEX(argv[1]);
|
100
100
|
Data_Get_Struct(argv[0], gsl_vector_complex, (*x));
|
@@ -102,7 +102,7 @@ static int get_vector_complex2(int argc, VALUE *argv, VALUE obj,
|
|
102
102
|
break;
|
103
103
|
default:
|
104
104
|
if (argc != 1) rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)",
|
105
|
-
|
105
|
+
argc);
|
106
106
|
CHECK_VECTOR_COMPLEX(argv[0]);
|
107
107
|
Data_Get_Struct(obj, gsl_vector_complex, (*x));
|
108
108
|
Data_Get_Struct(argv[0], gsl_vector_complex, (*y));
|
@@ -242,7 +242,7 @@ static VALUE rb_gsl_blas_daxpy(int argc, VALUE *argv, VALUE obj)
|
|
242
242
|
default:
|
243
243
|
Data_Get_Struct(obj, gsl_vector, x);
|
244
244
|
if (argc != 2) rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)",
|
245
|
-
|
245
|
+
argc);
|
246
246
|
Need_Float(argv[0]);
|
247
247
|
// a = RFLOAT(argv[0])->value;
|
248
248
|
a = NUM2DBL(argv[0]);
|
@@ -269,7 +269,7 @@ static VALUE rb_gsl_blas_daxpy2(int argc, VALUE *argv, VALUE obj)
|
|
269
269
|
default:
|
270
270
|
Data_Get_Struct(obj, gsl_vector, x);
|
271
271
|
if (argc != 2) rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)",
|
272
|
-
|
272
|
+
argc);
|
273
273
|
Need_Float(argv[0]);
|
274
274
|
CHECK_VECTOR(argv[1]);
|
275
275
|
// a = RFLOAT(argv[0])->value;
|
@@ -298,7 +298,7 @@ static VALUE rb_gsl_blas_zaxpy(int argc, VALUE *argv, VALUE obj)
|
|
298
298
|
default:
|
299
299
|
Data_Get_Struct(obj, gsl_vector_complex, x);
|
300
300
|
if (argc != 2) rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)",
|
301
|
-
|
301
|
+
argc);
|
302
302
|
CHECK_COMPLEX(argv[0]);
|
303
303
|
CHECK_VECTOR_COMPLEX(argv[1]);
|
304
304
|
Data_Get_Struct(argv[0], gsl_complex, a);
|
@@ -325,7 +325,7 @@ static VALUE rb_gsl_blas_zaxpy2(int argc, VALUE *argv, VALUE obj)
|
|
325
325
|
default:
|
326
326
|
Data_Get_Struct(obj, gsl_vector_complex, x);
|
327
327
|
if (argc != 2) rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)",
|
328
|
-
|
328
|
+
argc);
|
329
329
|
CHECK_COMPLEX(argv[0]);
|
330
330
|
CHECK_VECTOR_COMPLEX(argv[1]);
|
331
331
|
Data_Get_Struct(argv[0], gsl_complex, a);
|
@@ -347,7 +347,7 @@ static VALUE rb_gsl_blas_dscal(int argc, VALUE *argv, VALUE obj)
|
|
347
347
|
case T_CLASS:
|
348
348
|
case T_OBJECT:
|
349
349
|
if (argc != 2) rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)",
|
350
|
-
|
350
|
+
argc);
|
351
351
|
Need_Float(argv[0]);
|
352
352
|
CHECK_VECTOR(argv[1]);
|
353
353
|
// a = RFLOAT(argv[0])->value;
|
@@ -358,7 +358,7 @@ static VALUE rb_gsl_blas_dscal(int argc, VALUE *argv, VALUE obj)
|
|
358
358
|
break;
|
359
359
|
default:
|
360
360
|
if (argc != 1) rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)",
|
361
|
-
|
361
|
+
argc);
|
362
362
|
Need_Float(argv[0]);
|
363
363
|
// a = RFLOAT(argv[0])->value;
|
364
364
|
a = NUM2DBL(argv[0]);
|
@@ -379,7 +379,7 @@ static VALUE rb_gsl_blas_dscal2(int argc, VALUE *argv, VALUE obj)
|
|
379
379
|
case T_CLASS:
|
380
380
|
case T_OBJECT:
|
381
381
|
if (argc != 2) rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)",
|
382
|
-
|
382
|
+
argc);
|
383
383
|
Need_Float(argv[0]);
|
384
384
|
CHECK_VECTOR(argv[1]);
|
385
385
|
a = NUM2DBL(argv[0]);
|
@@ -388,7 +388,7 @@ static VALUE rb_gsl_blas_dscal2(int argc, VALUE *argv, VALUE obj)
|
|
388
388
|
default:
|
389
389
|
Data_Get_Struct(obj, gsl_vector, x);
|
390
390
|
if (argc != 1) rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)",
|
391
|
-
|
391
|
+
argc);
|
392
392
|
Need_Float(argv[0]);
|
393
393
|
a = NUM2DBL(argv[0]);
|
394
394
|
break;
|
@@ -408,7 +408,7 @@ static VALUE rb_gsl_blas_zdscal(int argc, VALUE *argv, VALUE obj)
|
|
408
408
|
case T_CLASS:
|
409
409
|
case T_OBJECT:
|
410
410
|
if (argc != 2) rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)",
|
411
|
-
|
411
|
+
argc);
|
412
412
|
Need_Float(argv[0]);
|
413
413
|
CHECK_VECTOR_COMPLEX(argv[1]);
|
414
414
|
// a = RFLOAT(argv[0])->value;
|
@@ -420,7 +420,7 @@ static VALUE rb_gsl_blas_zdscal(int argc, VALUE *argv, VALUE obj)
|
|
420
420
|
default:
|
421
421
|
Data_Get_Struct(obj, gsl_vector_complex, x);
|
422
422
|
if (argc != 1) rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)",
|
423
|
-
|
423
|
+
argc);
|
424
424
|
Need_Float(argv[0]);
|
425
425
|
a = NUM2DBL(argv[0]);
|
426
426
|
gsl_blas_zdscal(a, x);
|
@@ -438,7 +438,7 @@ static VALUE rb_gsl_blas_zdscal2(int argc, VALUE *argv, VALUE obj)
|
|
438
438
|
case T_CLASS:
|
439
439
|
case T_OBJECT:
|
440
440
|
if (argc != 2) rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)",
|
441
|
-
|
441
|
+
argc);
|
442
442
|
Need_Float(argv[0]);
|
443
443
|
CHECK_VECTOR_COMPLEX(argv[1]);
|
444
444
|
a = NUM2DBL(argv[0]);
|
@@ -447,7 +447,7 @@ static VALUE rb_gsl_blas_zdscal2(int argc, VALUE *argv, VALUE obj)
|
|
447
447
|
default:
|
448
448
|
Data_Get_Struct(obj, gsl_vector_complex, x);
|
449
449
|
if (argc != 1) rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)",
|
450
|
-
|
450
|
+
argc);
|
451
451
|
Need_Float(argv[0]);
|
452
452
|
a = NUM2DBL(argv[0]);
|
453
453
|
break;
|
@@ -468,7 +468,7 @@ static VALUE rb_gsl_blas_zscal(int argc, VALUE *argv, VALUE obj)
|
|
468
468
|
case T_CLASS:
|
469
469
|
case T_OBJECT:
|
470
470
|
if (argc != 2) rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)",
|
471
|
-
|
471
|
+
argc);
|
472
472
|
CHECK_VECTOR_COMPLEX(argv[1]);
|
473
473
|
Data_Get_Struct(argv[0], gsl_complex, a);
|
474
474
|
Data_Get_Struct(argv[1], gsl_vector_complex, x);
|
@@ -477,7 +477,7 @@ static VALUE rb_gsl_blas_zscal(int argc, VALUE *argv, VALUE obj)
|
|
477
477
|
break;
|
478
478
|
default:
|
479
479
|
if (argc != 1) rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)",
|
480
|
-
|
480
|
+
argc);
|
481
481
|
Data_Get_Struct(obj, gsl_vector_complex, x);
|
482
482
|
Data_Get_Struct(argv[0], gsl_complex, a);
|
483
483
|
gsl_blas_zscal(*a, x);
|
@@ -496,14 +496,14 @@ static VALUE rb_gsl_blas_zscal2(int argc, VALUE *argv, VALUE obj)
|
|
496
496
|
case T_CLASS:
|
497
497
|
case T_OBJECT:
|
498
498
|
if (argc != 2) rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)",
|
499
|
-
|
499
|
+
argc);
|
500
500
|
CHECK_VECTOR_COMPLEX(argv[1]);
|
501
501
|
Data_Get_Struct(argv[0], gsl_complex, a);
|
502
502
|
Data_Get_Struct(argv[1], gsl_vector_complex, x);
|
503
503
|
break;
|
504
504
|
default:
|
505
505
|
if (argc != 1) rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)",
|
506
|
-
|
506
|
+
argc);
|
507
507
|
Data_Get_Struct(obj, gsl_vector_complex, x);
|
508
508
|
Data_Get_Struct(argv[0], gsl_complex, a);
|
509
509
|
break;
|
@@ -548,7 +548,7 @@ static VALUE rb_gsl_blas_drot2(VALUE obj, VALUE xx, VALUE yy, VALUE cc, VALUE ss
|
|
548
548
|
gsl_vector_memcpy(ynew, y);
|
549
549
|
gsl_blas_drot(xnew, ynew, c, s);
|
550
550
|
return rb_ary_new3(2, Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, xnew),
|
551
|
-
|
551
|
+
Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, ynew));
|
552
552
|
}
|
553
553
|
|
554
554
|
static VALUE rb_gsl_blas_drotm(VALUE obj, VALUE xx, VALUE yy, VALUE PP)
|
@@ -601,7 +601,7 @@ static VALUE rb_gsl_blas_drotm2(VALUE obj, VALUE xx, VALUE yy, VALUE PP)
|
|
601
601
|
gsl_blas_drotm(xnew, ynew, p->data);
|
602
602
|
if (flag == 1) gsl_vector_free(p);
|
603
603
|
return rb_ary_new3(2, Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, xnew),
|
604
|
-
|
604
|
+
Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, ynew));
|
605
605
|
}
|
606
606
|
|
607
607
|
void Init_gsl_blas1(VALUE module)
|
@@ -57,7 +57,7 @@ static VALUE rb_gsl_blas_dgemv(int argc, VALUE *argv, VALUE obj)
|
|
57
57
|
case T_CLASS:
|
58
58
|
case T_OBJECT:
|
59
59
|
if (argc < 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 4)",
|
60
|
-
|
60
|
+
argc);
|
61
61
|
CHECK_FIXNUM(argv[0]);
|
62
62
|
Need_Float(argv[1]);
|
63
63
|
CHECK_MATRIX(argv[2]);
|
@@ -71,7 +71,7 @@ static VALUE rb_gsl_blas_dgemv(int argc, VALUE *argv, VALUE obj)
|
|
71
71
|
default:
|
72
72
|
Data_Get_Struct(obj, gsl_matrix, A);
|
73
73
|
if (argc < 3) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 3)",
|
74
|
-
|
74
|
+
argc);
|
75
75
|
CHECK_FIXNUM(argv[0]);
|
76
76
|
Need_Float(argv[1]);
|
77
77
|
CHECK_VECTOR(argv[2]);
|
@@ -100,7 +100,6 @@ static VALUE rb_gsl_blas_dgemv(int argc, VALUE *argv, VALUE obj)
|
|
100
100
|
gsl_blas_dgemv(type, a, A, x, b, y);
|
101
101
|
if (flag == 1) return Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, y);
|
102
102
|
else return argv[argc-1];
|
103
|
-
|
104
103
|
}
|
105
104
|
|
106
105
|
static VALUE rb_gsl_blas_dgemv2(int argc, VALUE *argv, VALUE obj)
|
@@ -114,7 +113,7 @@ static VALUE rb_gsl_blas_dgemv2(int argc, VALUE *argv, VALUE obj)
|
|
114
113
|
case T_CLASS:
|
115
114
|
case T_OBJECT:
|
116
115
|
if (argc < 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 4)",
|
117
|
-
|
116
|
+
argc);
|
118
117
|
CHECK_FIXNUM(argv[0]);
|
119
118
|
Need_Float(argv[1]);
|
120
119
|
CHECK_MATRIX(argv[2]);
|
@@ -128,7 +127,7 @@ static VALUE rb_gsl_blas_dgemv2(int argc, VALUE *argv, VALUE obj)
|
|
128
127
|
default:
|
129
128
|
Data_Get_Struct(obj, gsl_matrix, A);
|
130
129
|
if (argc < 3) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 3)",
|
131
|
-
|
130
|
+
argc);
|
132
131
|
CHECK_FIXNUM(argv[0]);
|
133
132
|
Need_Float(argv[1]);
|
134
133
|
CHECK_VECTOR(argv[2]);
|
@@ -172,7 +171,7 @@ static VALUE rb_gsl_blas_zgemv(int argc, VALUE *argv, VALUE obj)
|
|
172
171
|
case T_CLASS:
|
173
172
|
case T_OBJECT:
|
174
173
|
if (argc < 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 4)",
|
175
|
-
|
174
|
+
argc);
|
176
175
|
CHECK_FIXNUM(argv[0]);
|
177
176
|
CHECK_COMPLEX(argv[1]);
|
178
177
|
CHECK_MATRIX_COMPLEX(argv[2]);
|
@@ -186,7 +185,7 @@ static VALUE rb_gsl_blas_zgemv(int argc, VALUE *argv, VALUE obj)
|
|
186
185
|
default:
|
187
186
|
Data_Get_Struct(obj, gsl_matrix_complex, A);
|
188
187
|
if (argc < 3) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 3)",
|
189
|
-
|
188
|
+
argc);
|
190
189
|
CHECK_FIXNUM(argv[0]);
|
191
190
|
CHECK_COMPLEX(argv[1]);
|
192
191
|
CHECK_VECTOR_COMPLEX(argv[2]);
|
@@ -216,7 +215,6 @@ static VALUE rb_gsl_blas_zgemv(int argc, VALUE *argv, VALUE obj)
|
|
216
215
|
gsl_blas_zgemv(type, *a, A, x, *b, y);
|
217
216
|
if (flag == 1) return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_complex_free, y);
|
218
217
|
else return argv[argc-1];
|
219
|
-
|
220
218
|
}
|
221
219
|
|
222
220
|
|
@@ -231,7 +229,7 @@ static VALUE rb_gsl_blas_zgemv2(int argc, VALUE *argv, VALUE obj)
|
|
231
229
|
case T_CLASS:
|
232
230
|
case T_OBJECT:
|
233
231
|
if (argc < 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 4)",
|
234
|
-
|
232
|
+
argc);
|
235
233
|
CHECK_FIXNUM(argv[0]);
|
236
234
|
CHECK_COMPLEX(argv[1]);
|
237
235
|
CHECK_MATRIX_COMPLEX(argv[2]);
|
@@ -245,7 +243,7 @@ static VALUE rb_gsl_blas_zgemv2(int argc, VALUE *argv, VALUE obj)
|
|
245
243
|
default:
|
246
244
|
Data_Get_Struct(obj, gsl_matrix_complex, A);
|
247
245
|
if (argc < 3) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 3)",
|
248
|
-
|
246
|
+
argc);
|
249
247
|
CHECK_FIXNUM(argv[0]);
|
250
248
|
CHECK_COMPLEX(argv[1]);
|
251
249
|
CHECK_VECTOR_COMPLEX(argv[2]);
|
@@ -288,7 +286,7 @@ static VALUE rb_gsl_blas_dtrmv(int argc, VALUE *argv, VALUE obj)
|
|
288
286
|
case T_CLASS:
|
289
287
|
case T_OBJECT:
|
290
288
|
if (argc != 5) rb_raise(rb_eArgError, "wrong number of arguments (%d for 5)",
|
291
|
-
|
289
|
+
argc);
|
292
290
|
CHECK_MATRIX(argv[3]);
|
293
291
|
CHECK_VECTOR(argv[4]);
|
294
292
|
Data_Get_Struct(argv[3], gsl_matrix, A);
|
@@ -296,7 +294,7 @@ static VALUE rb_gsl_blas_dtrmv(int argc, VALUE *argv, VALUE obj)
|
|
296
294
|
break;
|
297
295
|
default:
|
298
296
|
if (argc != 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for 4)",
|
299
|
-
|
297
|
+
argc);
|
300
298
|
CHECK_VECTOR(argv[3]);
|
301
299
|
Data_Get_Struct(obj, gsl_matrix, A);
|
302
300
|
Data_Get_Struct(argv[3], gsl_vector, x);
|
@@ -304,7 +302,7 @@ static VALUE rb_gsl_blas_dtrmv(int argc, VALUE *argv, VALUE obj)
|
|
304
302
|
}
|
305
303
|
CHECK_FIXNUM(argv[0]); CHECK_FIXNUM(argv[1]); CHECK_FIXNUM(argv[2]);
|
306
304
|
gsl_blas_dtrmv(FIX2INT(argv[0]), FIX2INT(argv[1]), FIX2INT(argv[2]),
|
307
|
-
|
305
|
+
A, x);
|
308
306
|
return argv[argc-1];
|
309
307
|
}
|
310
308
|
|
@@ -318,7 +316,7 @@ static VALUE rb_gsl_blas_dtrmv2(int argc, VALUE *argv, VALUE obj)
|
|
318
316
|
case T_CLASS:
|
319
317
|
case T_OBJECT:
|
320
318
|
if (argc != 5) rb_raise(rb_eArgError, "wrong number of arguments (%d for 5)",
|
321
|
-
|
319
|
+
argc);
|
322
320
|
CHECK_MATRIX(argv[3]);
|
323
321
|
CHECK_VECTOR(argv[4]);
|
324
322
|
Data_Get_Struct(argv[3], gsl_matrix, A);
|
@@ -326,7 +324,7 @@ static VALUE rb_gsl_blas_dtrmv2(int argc, VALUE *argv, VALUE obj)
|
|
326
324
|
break;
|
327
325
|
default:
|
328
326
|
if (argc != 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for 4)",
|
329
|
-
|
327
|
+
argc);
|
330
328
|
CHECK_VECTOR(argv[3]);
|
331
329
|
Data_Get_Struct(obj, gsl_matrix, A);
|
332
330
|
Data_Get_Struct(argv[3], gsl_vector, x);
|
@@ -336,7 +334,7 @@ static VALUE rb_gsl_blas_dtrmv2(int argc, VALUE *argv, VALUE obj)
|
|
336
334
|
xnew = gsl_vector_alloc(x->size);
|
337
335
|
gsl_vector_memcpy(xnew, x);
|
338
336
|
gsl_blas_dtrmv(FIX2INT(argv[0]), FIX2INT(argv[1]), FIX2INT(argv[2]),
|
339
|
-
|
337
|
+
A, xnew);
|
340
338
|
return Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, xnew);
|
341
339
|
}
|
342
340
|
|
@@ -350,7 +348,7 @@ static VALUE rb_gsl_blas_ztrmv(int argc, VALUE *argv, VALUE obj)
|
|
350
348
|
case T_CLASS:
|
351
349
|
case T_OBJECT:
|
352
350
|
if (argc != 5) rb_raise(rb_eArgError, "wrong number of arguments (%d for 5)",
|
353
|
-
|
351
|
+
argc);
|
354
352
|
CHECK_MATRIX_COMPLEX(argv[3]);
|
355
353
|
CHECK_VECTOR_COMPLEX(argv[4]);
|
356
354
|
Data_Get_Struct(argv[3], gsl_matrix_complex, A);
|
@@ -358,7 +356,7 @@ static VALUE rb_gsl_blas_ztrmv(int argc, VALUE *argv, VALUE obj)
|
|
358
356
|
break;
|
359
357
|
default:
|
360
358
|
if (argc != 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for 4)",
|
361
|
-
|
359
|
+
argc);
|
362
360
|
CHECK_VECTOR_COMPLEX(argv[3]);
|
363
361
|
Data_Get_Struct(obj, gsl_matrix_complex, A);
|
364
362
|
Data_Get_Struct(argv[3], gsl_vector_complex, x);
|
@@ -366,7 +364,7 @@ static VALUE rb_gsl_blas_ztrmv(int argc, VALUE *argv, VALUE obj)
|
|
366
364
|
}
|
367
365
|
CHECK_FIXNUM(argv[0]); CHECK_FIXNUM(argv[1]); CHECK_FIXNUM(argv[2]);
|
368
366
|
gsl_blas_ztrmv(FIX2INT(argv[0]), FIX2INT(argv[1]), FIX2INT(argv[2]),
|
369
|
-
|
367
|
+
A, x);
|
370
368
|
return argv[argc-1];
|
371
369
|
}
|
372
370
|
|
@@ -379,7 +377,7 @@ static VALUE rb_gsl_blas_ztrmv2(int argc, VALUE *argv, VALUE obj)
|
|
379
377
|
case T_CLASS:
|
380
378
|
case T_OBJECT:
|
381
379
|
if (argc != 5) rb_raise(rb_eArgError, "wrong number of arguments (%d for 5)",
|
382
|
-
|
380
|
+
argc);
|
383
381
|
CHECK_MATRIX_COMPLEX(argv[3]);
|
384
382
|
CHECK_VECTOR_COMPLEX(argv[4]);
|
385
383
|
Data_Get_Struct(argv[3], gsl_matrix_complex, A);
|
@@ -387,7 +385,7 @@ static VALUE rb_gsl_blas_ztrmv2(int argc, VALUE *argv, VALUE obj)
|
|
387
385
|
break;
|
388
386
|
default:
|
389
387
|
if (argc != 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for 4)",
|
390
|
-
|
388
|
+
argc);
|
391
389
|
CHECK_VECTOR_COMPLEX(argv[3]);
|
392
390
|
Data_Get_Struct(obj, gsl_matrix_complex, A);
|
393
391
|
Data_Get_Struct(argv[3], gsl_vector_complex, x);
|
@@ -397,7 +395,7 @@ static VALUE rb_gsl_blas_ztrmv2(int argc, VALUE *argv, VALUE obj)
|
|
397
395
|
xnew = gsl_vector_complex_alloc(x->size);
|
398
396
|
gsl_vector_complex_memcpy(xnew, x);
|
399
397
|
gsl_blas_ztrmv(FIX2INT(argv[0]), FIX2INT(argv[1]), FIX2INT(argv[2]),
|
400
|
-
|
398
|
+
A, xnew);
|
401
399
|
return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_complex_free, xnew);
|
402
400
|
}
|
403
401
|
|
@@ -410,7 +408,7 @@ static VALUE rb_gsl_blas_dtrsv(int argc, VALUE *argv, VALUE obj)
|
|
410
408
|
case T_CLASS:
|
411
409
|
case T_OBJECT:
|
412
410
|
if (argc != 5) rb_raise(rb_eArgError, "wrong number of arguments (%d for 5)",
|
413
|
-
|
411
|
+
argc);
|
414
412
|
CHECK_MATRIX(argv[3]);
|
415
413
|
CHECK_VECTOR(argv[4]);
|
416
414
|
Data_Get_Struct(argv[3], gsl_matrix, A);
|
@@ -418,7 +416,7 @@ static VALUE rb_gsl_blas_dtrsv(int argc, VALUE *argv, VALUE obj)
|
|
418
416
|
break;
|
419
417
|
default:
|
420
418
|
if (argc != 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for 4)",
|
421
|
-
|
419
|
+
argc);
|
422
420
|
CHECK_VECTOR(argv[3]);
|
423
421
|
Data_Get_Struct(obj, gsl_matrix, A);
|
424
422
|
Data_Get_Struct(argv[3], gsl_vector, x);
|
@@ -426,7 +424,7 @@ static VALUE rb_gsl_blas_dtrsv(int argc, VALUE *argv, VALUE obj)
|
|
426
424
|
}
|
427
425
|
CHECK_FIXNUM(argv[0]); CHECK_FIXNUM(argv[1]); CHECK_FIXNUM(argv[2]);
|
428
426
|
gsl_blas_dtrsv(FIX2INT(argv[0]), FIX2INT(argv[1]), FIX2INT(argv[2]),
|
429
|
-
|
427
|
+
A, x);
|
430
428
|
return argv[argc-1];
|
431
429
|
}
|
432
430
|
|
@@ -439,7 +437,7 @@ static VALUE rb_gsl_blas_dtrsv2(int argc, VALUE *argv, VALUE obj)
|
|
439
437
|
case T_CLASS:
|
440
438
|
case T_OBJECT:
|
441
439
|
if (argc != 5) rb_raise(rb_eArgError, "wrong number of arguments (%d for 5)",
|
442
|
-
|
440
|
+
argc);
|
443
441
|
CHECK_MATRIX(argv[3]);
|
444
442
|
CHECK_VECTOR(argv[4]);
|
445
443
|
Data_Get_Struct(argv[3], gsl_matrix, A);
|
@@ -447,7 +445,7 @@ static VALUE rb_gsl_blas_dtrsv2(int argc, VALUE *argv, VALUE obj)
|
|
447
445
|
break;
|
448
446
|
default:
|
449
447
|
if (argc != 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for 4)",
|
450
|
-
|
448
|
+
argc);
|
451
449
|
CHECK_VECTOR(argv[3]);
|
452
450
|
Data_Get_Struct(obj, gsl_matrix, A);
|
453
451
|
Data_Get_Struct(argv[3], gsl_vector, x);
|
@@ -457,7 +455,7 @@ static VALUE rb_gsl_blas_dtrsv2(int argc, VALUE *argv, VALUE obj)
|
|
457
455
|
xnew = gsl_vector_alloc(x->size);
|
458
456
|
gsl_vector_memcpy(xnew, x);
|
459
457
|
gsl_blas_dtrsv(FIX2INT(argv[0]), FIX2INT(argv[1]), FIX2INT(argv[2]),
|
460
|
-
|
458
|
+
A, xnew);
|
461
459
|
return Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, xnew);
|
462
460
|
}
|
463
461
|
|
@@ -470,7 +468,7 @@ static VALUE rb_gsl_blas_ztrsv(int argc, VALUE *argv, VALUE obj)
|
|
470
468
|
case T_CLASS:
|
471
469
|
case T_OBJECT:
|
472
470
|
if (argc != 5) rb_raise(rb_eArgError, "wrong number of arguments (%d for 5)",
|
473
|
-
|
471
|
+
argc);
|
474
472
|
CHECK_MATRIX_COMPLEX(argv[3]);
|
475
473
|
CHECK_VECTOR_COMPLEX(argv[4]);
|
476
474
|
Data_Get_Struct(argv[3], gsl_matrix_complex, A);
|
@@ -478,7 +476,7 @@ static VALUE rb_gsl_blas_ztrsv(int argc, VALUE *argv, VALUE obj)
|
|
478
476
|
break;
|
479
477
|
default:
|
480
478
|
if (argc != 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for 4)",
|
481
|
-
|
479
|
+
argc);
|
482
480
|
CHECK_VECTOR_COMPLEX(argv[3]);
|
483
481
|
Data_Get_Struct(obj, gsl_matrix_complex, A);
|
484
482
|
Data_Get_Struct(argv[3], gsl_vector_complex, x);
|
@@ -486,7 +484,7 @@ static VALUE rb_gsl_blas_ztrsv(int argc, VALUE *argv, VALUE obj)
|
|
486
484
|
}
|
487
485
|
CHECK_FIXNUM(argv[0]); CHECK_FIXNUM(argv[1]); CHECK_FIXNUM(argv[2]);
|
488
486
|
gsl_blas_ztrsv(FIX2INT(argv[0]), FIX2INT(argv[1]), FIX2INT(argv[2]),
|
489
|
-
|
487
|
+
A, x);
|
490
488
|
return argv[argc-1];
|
491
489
|
}
|
492
490
|
|
@@ -499,7 +497,7 @@ static VALUE rb_gsl_blas_ztrsv2(int argc, VALUE *argv, VALUE obj)
|
|
499
497
|
case T_CLASS:
|
500
498
|
case T_OBJECT:
|
501
499
|
if (argc != 5) rb_raise(rb_eArgError, "wrong number of arguments (%d for 5)",
|
502
|
-
|
500
|
+
argc);
|
503
501
|
CHECK_MATRIX_COMPLEX(argv[3]);
|
504
502
|
CHECK_VECTOR_COMPLEX(argv[4]);
|
505
503
|
Data_Get_Struct(argv[3], gsl_matrix_complex, A);
|
@@ -507,7 +505,7 @@ static VALUE rb_gsl_blas_ztrsv2(int argc, VALUE *argv, VALUE obj)
|
|
507
505
|
break;
|
508
506
|
default:
|
509
507
|
if (argc != 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for 4)",
|
510
|
-
|
508
|
+
argc);
|
511
509
|
CHECK_VECTOR_COMPLEX(argv[3]);
|
512
510
|
Data_Get_Struct(obj, gsl_matrix_complex, A);
|
513
511
|
Data_Get_Struct(argv[3], gsl_vector_complex, x);
|
@@ -517,7 +515,7 @@ static VALUE rb_gsl_blas_ztrsv2(int argc, VALUE *argv, VALUE obj)
|
|
517
515
|
xnew = gsl_vector_complex_alloc(x->size);
|
518
516
|
gsl_vector_complex_memcpy(xnew, x);
|
519
517
|
gsl_blas_ztrsv(FIX2INT(argv[0]), FIX2INT(argv[1]), FIX2INT(argv[2]),
|
520
|
-
|
518
|
+
A, xnew);
|
521
519
|
return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_complex_free, xnew);
|
522
520
|
}
|
523
521
|
|
@@ -532,7 +530,7 @@ static VALUE rb_gsl_blas_dsymv(int argc, VALUE *argv, VALUE obj)
|
|
532
530
|
case T_CLASS:
|
533
531
|
case T_OBJECT:
|
534
532
|
if (argc < 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 4)",
|
535
|
-
|
533
|
+
argc);
|
536
534
|
CHECK_FIXNUM(argv[0]);
|
537
535
|
Need_Float(argv[1]);
|
538
536
|
CHECK_MATRIX(argv[2]);
|
@@ -546,7 +544,7 @@ static VALUE rb_gsl_blas_dsymv(int argc, VALUE *argv, VALUE obj)
|
|
546
544
|
default:
|
547
545
|
Data_Get_Struct(obj, gsl_matrix, A);
|
548
546
|
if (argc < 3) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 3)",
|
549
|
-
|
547
|
+
argc);
|
550
548
|
CHECK_FIXNUM(argv[0]);
|
551
549
|
Need_Float(argv[1]);
|
552
550
|
CHECK_VECTOR(argv[2]);
|
@@ -575,7 +573,6 @@ static VALUE rb_gsl_blas_dsymv(int argc, VALUE *argv, VALUE obj)
|
|
575
573
|
gsl_blas_dsymv(type, a, A, x, b, y);
|
576
574
|
if (flag == 1) return Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, y);
|
577
575
|
else return argv[argc-1];
|
578
|
-
|
579
576
|
}
|
580
577
|
|
581
578
|
static VALUE rb_gsl_blas_dsymv2(int argc, VALUE *argv, VALUE obj)
|
@@ -589,7 +586,7 @@ static VALUE rb_gsl_blas_dsymv2(int argc, VALUE *argv, VALUE obj)
|
|
589
586
|
case T_CLASS:
|
590
587
|
case T_OBJECT:
|
591
588
|
if (argc < 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 4)",
|
592
|
-
|
589
|
+
argc);
|
593
590
|
CHECK_FIXNUM(argv[0]);
|
594
591
|
Need_Float(argv[1]);
|
595
592
|
CHECK_MATRIX(argv[2]);
|
@@ -603,7 +600,7 @@ static VALUE rb_gsl_blas_dsymv2(int argc, VALUE *argv, VALUE obj)
|
|
603
600
|
default:
|
604
601
|
Data_Get_Struct(obj, gsl_matrix, A);
|
605
602
|
if (argc < 3) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 3)",
|
606
|
-
|
603
|
+
argc);
|
607
604
|
CHECK_FIXNUM(argv[0]);
|
608
605
|
Need_Float(argv[1]);
|
609
606
|
CHECK_VECTOR(argv[2]);
|
@@ -647,7 +644,7 @@ static VALUE rb_gsl_blas_zhemv(int argc, VALUE *argv, VALUE obj)
|
|
647
644
|
case T_CLASS:
|
648
645
|
case T_OBJECT:
|
649
646
|
if (argc < 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 4)",
|
650
|
-
|
647
|
+
argc);
|
651
648
|
CHECK_FIXNUM(argv[0]);
|
652
649
|
CHECK_COMPLEX(argv[1]);
|
653
650
|
CHECK_MATRIX_COMPLEX(argv[2]);
|
@@ -661,7 +658,7 @@ static VALUE rb_gsl_blas_zhemv(int argc, VALUE *argv, VALUE obj)
|
|
661
658
|
default:
|
662
659
|
Data_Get_Struct(obj, gsl_matrix_complex, A);
|
663
660
|
if (argc < 3) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 3)",
|
664
|
-
|
661
|
+
argc);
|
665
662
|
CHECK_FIXNUM(argv[0]);
|
666
663
|
CHECK_COMPLEX(argv[1]);
|
667
664
|
CHECK_VECTOR_COMPLEX(argv[2]);
|
@@ -691,7 +688,6 @@ static VALUE rb_gsl_blas_zhemv(int argc, VALUE *argv, VALUE obj)
|
|
691
688
|
gsl_blas_zhemv(type, *a, A, x, *b, y);
|
692
689
|
if (flag == 1) return Data_Wrap_Struct(cgsl_vector_complex, 0, gsl_vector_complex_free, y);
|
693
690
|
else return argv[argc-1];
|
694
|
-
|
695
691
|
}
|
696
692
|
|
697
693
|
static VALUE rb_gsl_blas_zhemv2(int argc, VALUE *argv, VALUE obj)
|
@@ -705,7 +701,7 @@ static VALUE rb_gsl_blas_zhemv2(int argc, VALUE *argv, VALUE obj)
|
|
705
701
|
case T_CLASS:
|
706
702
|
case T_OBJECT:
|
707
703
|
if (argc < 4) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 4)",
|
708
|
-
|
704
|
+
argc);
|
709
705
|
CHECK_FIXNUM(argv[0]);
|
710
706
|
CHECK_COMPLEX(argv[1]);
|
711
707
|
CHECK_MATRIX_COMPLEX(argv[2]);
|
@@ -719,7 +715,7 @@ static VALUE rb_gsl_blas_zhemv2(int argc, VALUE *argv, VALUE obj)
|
|
719
715
|
default:
|
720
716
|
Data_Get_Struct(obj, gsl_matrix_complex, A);
|
721
717
|
if (argc < 3) rb_raise(rb_eArgError, "wrong number of arguments (%d for >= 3)",
|
722
|
-
|
718
|
+
argc);
|
723
719
|
CHECK_FIXNUM(argv[0]);
|
724
720
|
CHECK_COMPLEX(argv[1]);
|
725
721
|
CHECK_VECTOR_COMPLEX(argv[2]);
|
@@ -759,7 +755,7 @@ static VALUE rb_gsl_blas_dger(VALUE obj, VALUE aa, VALUE xx, VALUE yy, VALUE AA)
|
|
759
755
|
gsl_vector *x = NULL, *y = NULL;
|
760
756
|
double a;
|
761
757
|
Need_Float(aa);
|
762
|
-
CHECK_VECTOR(xx); CHECK_VECTOR(yy);
|
758
|
+
CHECK_VECTOR(xx); CHECK_VECTOR(yy);
|
763
759
|
CHECK_MATRIX(AA);
|
764
760
|
a = NUM2DBL(aa);
|
765
761
|
Data_Get_Struct(xx, gsl_vector, x);
|
@@ -775,7 +771,7 @@ static VALUE rb_gsl_blas_dger2(VALUE obj, VALUE aa, VALUE xx, VALUE yy, VALUE AA
|
|
775
771
|
gsl_vector *x = NULL, *y = NULL;
|
776
772
|
double a;
|
777
773
|
Need_Float(aa);
|
778
|
-
CHECK_VECTOR(xx); CHECK_VECTOR(yy);
|
774
|
+
CHECK_VECTOR(xx); CHECK_VECTOR(yy);
|
779
775
|
CHECK_MATRIX(AA);
|
780
776
|
a = NUM2DBL(aa);
|
781
777
|
Data_Get_Struct(xx, gsl_vector, x);
|
@@ -793,7 +789,7 @@ static VALUE rb_gsl_blas_zgeru(VALUE obj, VALUE aa, VALUE xx, VALUE yy, VALUE AA
|
|
793
789
|
gsl_vector_complex *x = NULL, *y = NULL;
|
794
790
|
gsl_complex *a;
|
795
791
|
CHECK_COMPLEX(aa);
|
796
|
-
CHECK_VECTOR_COMPLEX(xx);CHECK_VECTOR_COMPLEX(yy);
|
792
|
+
CHECK_VECTOR_COMPLEX(xx); CHECK_VECTOR_COMPLEX(yy);
|
797
793
|
CHECK_MATRIX_COMPLEX(AA);
|
798
794
|
Data_Get_Struct(aa, gsl_complex, a);
|
799
795
|
Data_Get_Struct(xx, gsl_vector_complex, x);
|
@@ -809,7 +805,7 @@ static VALUE rb_gsl_blas_zgeru2(VALUE obj, VALUE aa, VALUE xx, VALUE yy, VALUE A
|
|
809
805
|
gsl_vector_complex *x = NULL, *y = NULL;
|
810
806
|
gsl_complex *a;
|
811
807
|
CHECK_COMPLEX(aa);
|
812
|
-
CHECK_VECTOR_COMPLEX(xx);CHECK_VECTOR_COMPLEX(yy);
|
808
|
+
CHECK_VECTOR_COMPLEX(xx); CHECK_VECTOR_COMPLEX(yy);
|
813
809
|
CHECK_MATRIX_COMPLEX(AA);
|
814
810
|
Data_Get_Struct(aa, gsl_complex, a);
|
815
811
|
Data_Get_Struct(xx, gsl_vector_complex, x);
|
@@ -827,7 +823,7 @@ static VALUE rb_gsl_blas_zgerc(VALUE obj, VALUE aa, VALUE xx, VALUE yy, VALUE AA
|
|
827
823
|
gsl_vector_complex *x = NULL, *y = NULL;
|
828
824
|
gsl_complex *a;
|
829
825
|
CHECK_COMPLEX(aa);
|
830
|
-
CHECK_VECTOR_COMPLEX(xx);CHECK_VECTOR_COMPLEX(yy);
|
826
|
+
CHECK_VECTOR_COMPLEX(xx); CHECK_VECTOR_COMPLEX(yy);
|
831
827
|
CHECK_MATRIX_COMPLEX(AA);
|
832
828
|
Data_Get_Struct(aa, gsl_complex, a);
|
833
829
|
Data_Get_Struct(xx, gsl_vector_complex, x);
|
@@ -843,7 +839,7 @@ static VALUE rb_gsl_blas_zgerc2(VALUE obj, VALUE aa, VALUE xx, VALUE yy, VALUE A
|
|
843
839
|
gsl_vector_complex *x = NULL, *y = NULL;
|
844
840
|
gsl_complex *a;
|
845
841
|
CHECK_COMPLEX(aa);
|
846
|
-
CHECK_VECTOR_COMPLEX(xx);CHECK_VECTOR_COMPLEX(yy);
|
842
|
+
CHECK_VECTOR_COMPLEX(xx); CHECK_VECTOR_COMPLEX(yy);
|
847
843
|
CHECK_MATRIX_COMPLEX(AA);
|
848
844
|
Data_Get_Struct(aa, gsl_complex, a);
|
849
845
|
Data_Get_Struct(xx, gsl_vector_complex, x);
|
@@ -919,8 +915,8 @@ static VALUE rb_gsl_blas_zher_a(VALUE obj, VALUE tt, VALUE aa, VALUE xx, VALUE A
|
|
919
915
|
return Data_Wrap_Struct(cgsl_matrix_complex, 0, gsl_matrix_complex_free, Anew);
|
920
916
|
}
|
921
917
|
|
922
|
-
static VALUE rb_gsl_blas_dsyr2(VALUE obj, VALUE tt, VALUE aa, VALUE xx,
|
923
|
-
|
918
|
+
static VALUE rb_gsl_blas_dsyr2(VALUE obj, VALUE tt, VALUE aa, VALUE xx,
|
919
|
+
VALUE yy, VALUE AA)
|
924
920
|
{
|
925
921
|
gsl_matrix *A = NULL;
|
926
922
|
gsl_vector *x = NULL, *y = NULL;
|
@@ -936,8 +932,8 @@ static VALUE rb_gsl_blas_dsyr2(VALUE obj, VALUE tt, VALUE aa, VALUE xx,
|
|
936
932
|
return AA;
|
937
933
|
}
|
938
934
|
|
939
|
-
static VALUE rb_gsl_blas_dsyr2_a(VALUE obj, VALUE tt, VALUE aa, VALUE xx,
|
940
|
-
|
935
|
+
static VALUE rb_gsl_blas_dsyr2_a(VALUE obj, VALUE tt, VALUE aa, VALUE xx,
|
936
|
+
VALUE yy, VALUE AA)
|
941
937
|
{
|
942
938
|
gsl_matrix *A = NULL, *Anew = NULL;
|
943
939
|
gsl_vector *x = NULL, *y = NULL;
|
@@ -955,8 +951,8 @@ static VALUE rb_gsl_blas_dsyr2_a(VALUE obj, VALUE tt, VALUE aa, VALUE xx,
|
|
955
951
|
return Data_Wrap_Struct(cgsl_matrix, 0, gsl_matrix_free, Anew);
|
956
952
|
}
|
957
953
|
|
958
|
-
static VALUE rb_gsl_blas_zher2(VALUE obj, VALUE tt, VALUE aa, VALUE xx,
|
959
|
-
|
954
|
+
static VALUE rb_gsl_blas_zher2(VALUE obj, VALUE tt, VALUE aa, VALUE xx,
|
955
|
+
VALUE yy, VALUE AA)
|
960
956
|
{
|
961
957
|
gsl_matrix_complex *A = NULL;
|
962
958
|
gsl_vector_complex *x = NULL, *y = NULL;
|
@@ -972,8 +968,8 @@ static VALUE rb_gsl_blas_zher2(VALUE obj, VALUE tt, VALUE aa, VALUE xx,
|
|
972
968
|
return AA;
|
973
969
|
}
|
974
970
|
|
975
|
-
static VALUE rb_gsl_blas_zher2_a(VALUE obj, VALUE tt, VALUE aa, VALUE xx,
|
976
|
-
|
971
|
+
static VALUE rb_gsl_blas_zher2_a(VALUE obj, VALUE tt, VALUE aa, VALUE xx,
|
972
|
+
VALUE yy, VALUE AA)
|
977
973
|
{
|
978
974
|
gsl_matrix_complex *A = NULL, *Anew = NULL;
|
979
975
|
gsl_vector_complex *x = NULL, *y = NULL;
|