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
@@ -12,22 +12,16 @@
|
|
12
12
|
#include "include/rb_gsl_array.h"
|
13
13
|
#include "include/rb_gsl_common.h"
|
14
14
|
|
15
|
-
#ifdef GSL_1_6_LATER
|
16
15
|
#include <gsl/gsl_wavelet.h>
|
17
16
|
#include <gsl/gsl_wavelet2d.h>
|
18
|
-
#endif
|
19
|
-
|
20
|
-
#ifdef HAVE_NARRAY_H
|
21
|
-
#include "narray.h"
|
22
|
-
#endif
|
23
17
|
|
24
18
|
#ifndef CHECK_WAVELET
|
25
|
-
#define CHECK_WAVELET(x) if(!rb_obj_is_kind_of(x,cgsl_wavelet))\
|
19
|
+
#define CHECK_WAVELET(x) if(!rb_obj_is_kind_of(x,cgsl_wavelet)) \
|
26
20
|
rb_raise(rb_eTypeError, "wrong argument type (Wavelet expected)");
|
27
21
|
#endif
|
28
22
|
|
29
23
|
#ifndef CHECK_WORKSPACE
|
30
|
-
#define CHECK_WORKSPACE(x) if(!rb_obj_is_kind_of(x,cgsl_wavelet_workspace))\
|
24
|
+
#define CHECK_WORKSPACE(x) if(!rb_obj_is_kind_of(x,cgsl_wavelet_workspace)) \
|
31
25
|
rb_raise(rb_eTypeError, "wrong argument type (Wavelet::Workspace expected)");
|
32
26
|
#endif
|
33
27
|
|
@@ -47,14 +41,11 @@ enum {
|
|
47
41
|
GSL_WAVELET_BSPLINE_CENTERED,
|
48
42
|
};
|
49
43
|
|
50
|
-
#ifdef GSL_1_6_LATER
|
51
44
|
static const gsl_wavelet_type* rb_gsl_wavelet_get_type(VALUE t);
|
52
45
|
static VALUE cgsl_wavelet_workspace;
|
53
|
-
#endif
|
54
46
|
|
55
47
|
static VALUE rb_gsl_wavelet_new(VALUE klass, VALUE t, VALUE m)
|
56
48
|
{
|
57
|
-
#ifdef GSL_1_6_LATER
|
58
49
|
const gsl_wavelet_type *T;
|
59
50
|
size_t member;
|
60
51
|
gsl_wavelet *w = NULL;
|
@@ -64,13 +55,8 @@ static VALUE rb_gsl_wavelet_new(VALUE klass, VALUE t, VALUE m)
|
|
64
55
|
w = gsl_wavelet_alloc(T, member);
|
65
56
|
if (w == NULL) rb_raise(rb_eNoMemError, "gsl_wavelet_alloc failed");
|
66
57
|
return Data_Wrap_Struct(klass, 0, gsl_wavelet_free, w);
|
67
|
-
#else
|
68
|
-
rb_raise(rb_eNotImpError, "Wavelet transforms not supported in GSL-%s, use GSL-1.6 or later", GSL_VERSION);
|
69
|
-
return Qnil;
|
70
|
-
#endif
|
71
58
|
}
|
72
59
|
|
73
|
-
#ifdef GSL_1_6_LATER
|
74
60
|
static const gsl_wavelet_type* rb_gsl_wavelet_get_type_str(char *name);
|
75
61
|
static const gsl_wavelet_type* rb_gsl_wavelet_get_type_int(int t);
|
76
62
|
static const gsl_wavelet_type* rb_gsl_wavelet_get_type(VALUE t)
|
@@ -84,9 +70,9 @@ static const gsl_wavelet_type* rb_gsl_wavelet_get_type(VALUE t)
|
|
84
70
|
T = rb_gsl_wavelet_get_type_int(FIX2INT(t));
|
85
71
|
break;
|
86
72
|
default:
|
87
|
-
rb_raise(rb_eTypeError,
|
88
|
-
|
89
|
-
|
73
|
+
rb_raise(rb_eTypeError,
|
74
|
+
"wrong type of argument %s (String or Fixnum expected)",
|
75
|
+
rb_class2name(CLASS_OF(t)));
|
90
76
|
break;
|
91
77
|
}
|
92
78
|
return T;
|
@@ -174,19 +160,19 @@ static VALUE rb_gsl_wavelet_workspace_new(VALUE klass, VALUE nn)
|
|
174
160
|
}
|
175
161
|
|
176
162
|
static VALUE rb_gsl_wavelet2d_trans(int argc, VALUE *argv, VALUE obj,
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
163
|
+
int (*trans)(const gsl_wavelet *,
|
164
|
+
gsl_matrix *,
|
165
|
+
gsl_wavelet_workspace *),
|
166
|
+
int sss);
|
181
167
|
static VALUE rb_gsl_wavelet2d(int argc, VALUE *argv, VALUE obj,
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
168
|
+
int (*trans)(const gsl_wavelet *,
|
169
|
+
gsl_matrix *,
|
170
|
+
gsl_wavelet_direction,
|
171
|
+
gsl_wavelet_workspace *),
|
172
|
+
int sss);
|
187
173
|
|
188
174
|
static VALUE rb_gsl_wavelet_transform0(int argc, VALUE *argv, VALUE obj,
|
189
|
-
|
175
|
+
int sss)
|
190
176
|
{
|
191
177
|
gsl_wavelet *w = NULL;
|
192
178
|
gsl_vector *v = NULL, *vnew;
|
@@ -212,7 +198,7 @@ static VALUE rb_gsl_wavelet_transform0(int argc, VALUE *argv, VALUE obj,
|
|
212
198
|
|
213
199
|
if (MATRIX_P(argv[1])) {
|
214
200
|
return rb_gsl_wavelet2d(argc, argv, obj,
|
215
|
-
|
201
|
+
gsl_wavelet2d_transform_matrix, sss);
|
216
202
|
}
|
217
203
|
if (VECTOR_P(argv[1])) {
|
218
204
|
Data_Get_Struct(argv[0], gsl_wavelet, w);
|
@@ -237,10 +223,9 @@ static VALUE rb_gsl_wavelet_transform0(int argc, VALUE *argv, VALUE obj,
|
|
237
223
|
break;
|
238
224
|
default:
|
239
225
|
if (argc < 1) rb_raise(rb_eArgError, "too few arguments");
|
240
|
-
|
241
226
|
if (MATRIX_P(argv[0])) {
|
242
227
|
return rb_gsl_wavelet2d(argc, argv, obj,
|
243
|
-
|
228
|
+
gsl_wavelet2d_transform_matrix, sss);
|
244
229
|
}
|
245
230
|
if (VECTOR_P(obj)) {
|
246
231
|
CHECK_WAVELET(argv[0]);
|
@@ -312,7 +297,7 @@ static VALUE rb_gsl_wavelet_transform0(int argc, VALUE *argv, VALUE obj,
|
|
312
297
|
break;
|
313
298
|
}
|
314
299
|
if (naflag == 0) {
|
315
|
-
if (sss == RB_GSL_DWT_COPY) {
|
300
|
+
if (sss == RB_GSL_DWT_COPY) {
|
316
301
|
vnew = gsl_vector_alloc(v->size);
|
317
302
|
gsl_vector_memcpy(vnew, v);
|
318
303
|
ary = Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, vnew);
|
@@ -349,10 +334,10 @@ static VALUE rb_gsl_wavelet_transform2(int argc, VALUE *argv, VALUE obj)
|
|
349
334
|
}
|
350
335
|
|
351
336
|
static VALUE rb_gsl_wavelet_trans(int argc, VALUE *argv, VALUE obj,
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
337
|
+
int (*trans)(const gsl_wavelet *,
|
338
|
+
double *, size_t, size_t,
|
339
|
+
gsl_wavelet_workspace *),
|
340
|
+
int sss)
|
356
341
|
{
|
357
342
|
gsl_wavelet *w = NULL;
|
358
343
|
gsl_vector *v = NULL, *vnew;
|
@@ -375,11 +360,11 @@ static VALUE rb_gsl_wavelet_trans(int argc, VALUE *argv, VALUE obj,
|
|
375
360
|
|
376
361
|
if (MATRIX_P(argv[1])) {
|
377
362
|
if (trans == gsl_wavelet_transform_forward) {
|
378
|
-
|
379
|
-
|
363
|
+
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
364
|
+
gsl_wavelet2d_transform_matrix_forward, sss);
|
380
365
|
} else {
|
381
|
-
|
382
|
-
|
366
|
+
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
367
|
+
gsl_wavelet2d_transform_matrix_inverse, sss);
|
383
368
|
}
|
384
369
|
}
|
385
370
|
if (VECTOR_P(argv[1])) {
|
@@ -405,14 +390,13 @@ static VALUE rb_gsl_wavelet_trans(int argc, VALUE *argv, VALUE obj,
|
|
405
390
|
break;
|
406
391
|
default:
|
407
392
|
if (argc < 1) rb_raise(rb_eArgError, "too few arguments");
|
408
|
-
|
409
393
|
if (MATRIX_P(argv[0])) {
|
410
394
|
if (trans == gsl_wavelet_transform_forward) {
|
411
|
-
|
412
|
-
|
395
|
+
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
396
|
+
gsl_wavelet2d_transform_matrix_forward, sss);
|
413
397
|
} else {
|
414
|
-
|
415
|
-
|
398
|
+
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
399
|
+
gsl_wavelet2d_transform_matrix_inverse, sss);
|
416
400
|
}
|
417
401
|
}
|
418
402
|
if (VECTOR_P(obj)) {
|
@@ -500,33 +484,33 @@ static VALUE rb_gsl_wavelet_trans(int argc, VALUE *argv, VALUE obj,
|
|
500
484
|
static VALUE rb_gsl_wavelet_transform_forward(int argc, VALUE *argv, VALUE obj)
|
501
485
|
{
|
502
486
|
return rb_gsl_wavelet_trans(argc, argv, obj, gsl_wavelet_transform_forward,
|
503
|
-
|
487
|
+
RB_GSL_DWT_COPY);
|
504
488
|
}
|
505
489
|
|
506
490
|
static VALUE rb_gsl_wavelet_transform_inverse(int argc, VALUE *argv, VALUE obj)
|
507
491
|
{
|
508
492
|
return rb_gsl_wavelet_trans(argc, argv, obj, gsl_wavelet_transform_inverse,
|
509
|
-
|
493
|
+
RB_GSL_DWT_COPY);
|
510
494
|
}
|
511
495
|
|
512
496
|
static VALUE rb_gsl_wavelet_transform_forward2(int argc, VALUE *argv, VALUE obj)
|
513
497
|
{
|
514
498
|
return rb_gsl_wavelet_trans(argc, argv, obj, gsl_wavelet_transform_forward,
|
515
|
-
|
499
|
+
RB_GSL_DWT_INPLACE);
|
516
500
|
}
|
517
501
|
|
518
502
|
static VALUE rb_gsl_wavelet_transform_inverse2(int argc, VALUE *argv, VALUE obj)
|
519
503
|
{
|
520
504
|
return rb_gsl_wavelet_trans(argc, argv, obj, gsl_wavelet_transform_inverse,
|
521
|
-
|
505
|
+
RB_GSL_DWT_INPLACE);
|
522
506
|
}
|
523
507
|
|
524
508
|
static VALUE rb_gsl_wavelet2d(int argc, VALUE *argv, VALUE obj,
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
509
|
+
int (*trans)(const gsl_wavelet *,
|
510
|
+
gsl_matrix *,
|
511
|
+
gsl_wavelet_direction,
|
512
|
+
gsl_wavelet_workspace *),
|
513
|
+
int sss)
|
530
514
|
{
|
531
515
|
gsl_wavelet *w = NULL;
|
532
516
|
gsl_matrix *m = NULL, *mnew;
|
@@ -605,20 +589,20 @@ static VALUE rb_gsl_wavelet2d(int argc, VALUE *argv, VALUE obj,
|
|
605
589
|
static VALUE rb_gsl_wavelet2d_transform_matrix(int argc, VALUE *argv, VALUE obj)
|
606
590
|
{
|
607
591
|
return rb_gsl_wavelet2d(argc, argv, obj, gsl_wavelet2d_transform_matrix,
|
608
|
-
|
592
|
+
RB_GSL_DWT_COPY);
|
609
593
|
}
|
610
594
|
|
611
595
|
static VALUE rb_gsl_wavelet2d_transform_matrix2(int argc, VALUE *argv, VALUE obj)
|
612
596
|
{
|
613
597
|
return rb_gsl_wavelet2d(argc, argv, obj, gsl_wavelet2d_transform_matrix,
|
614
|
-
|
598
|
+
RB_GSL_DWT_INPLACE);
|
615
599
|
}
|
616
600
|
|
617
601
|
static VALUE rb_gsl_wavelet2d_trans(int argc, VALUE *argv, VALUE obj,
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
602
|
+
int (*trans)(const gsl_wavelet *,
|
603
|
+
gsl_matrix *,
|
604
|
+
gsl_wavelet_workspace *),
|
605
|
+
int sss)
|
622
606
|
{
|
623
607
|
gsl_wavelet *w = NULL;
|
624
608
|
gsl_matrix *m = NULL, *mnew;
|
@@ -682,75 +666,73 @@ static VALUE rb_gsl_wavelet2d_trans(int argc, VALUE *argv, VALUE obj,
|
|
682
666
|
|
683
667
|
static VALUE rb_gsl_wavelet2d_transform_matrix_forward(int argc, VALUE *argv, VALUE obj)
|
684
668
|
{
|
685
|
-
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
686
|
-
|
687
|
-
|
669
|
+
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
670
|
+
gsl_wavelet2d_transform_matrix_forward,
|
671
|
+
RB_GSL_DWT_COPY);
|
688
672
|
}
|
689
673
|
|
690
674
|
static VALUE rb_gsl_wavelet2d_transform_matrix_forward2(int argc, VALUE *argv, VALUE obj)
|
691
675
|
{
|
692
|
-
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
693
|
-
|
694
|
-
|
676
|
+
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
677
|
+
gsl_wavelet2d_transform_matrix_forward,
|
678
|
+
RB_GSL_DWT_INPLACE);
|
695
679
|
}
|
696
680
|
|
697
681
|
static VALUE rb_gsl_wavelet2d_transform_matrix_inverse(int argc, VALUE *argv, VALUE obj)
|
698
682
|
{
|
699
|
-
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
700
|
-
|
701
|
-
|
683
|
+
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
684
|
+
gsl_wavelet2d_transform_matrix_inverse,
|
685
|
+
RB_GSL_DWT_COPY);
|
702
686
|
}
|
703
687
|
|
704
688
|
static VALUE rb_gsl_wavelet2d_transform_matrix_inverse2(int argc, VALUE *argv, VALUE obj)
|
705
689
|
{
|
706
|
-
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
707
|
-
|
708
|
-
|
690
|
+
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
691
|
+
gsl_wavelet2d_transform_matrix_inverse,
|
692
|
+
RB_GSL_DWT_INPLACE);
|
709
693
|
}
|
710
694
|
|
711
695
|
/** nstransform **/
|
712
696
|
static VALUE rb_gsl_wavelet2d_nstransform_matrix(int argc, VALUE *argv, VALUE obj)
|
713
697
|
{
|
714
698
|
return rb_gsl_wavelet2d(argc, argv, obj, gsl_wavelet2d_nstransform_matrix,
|
715
|
-
|
699
|
+
RB_GSL_DWT_COPY);
|
716
700
|
}
|
717
701
|
|
718
702
|
static VALUE rb_gsl_wavelet2d_nstransform_matrix2(int argc, VALUE *argv, VALUE obj)
|
719
703
|
{
|
720
704
|
return rb_gsl_wavelet2d(argc, argv, obj, gsl_wavelet2d_nstransform_matrix,
|
721
|
-
|
705
|
+
RB_GSL_DWT_INPLACE);
|
722
706
|
}
|
723
707
|
|
724
708
|
static VALUE rb_gsl_wavelet2d_nstransform_matrix_forward(int argc, VALUE *argv, VALUE obj)
|
725
709
|
{
|
726
|
-
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
727
|
-
|
728
|
-
|
710
|
+
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
711
|
+
gsl_wavelet2d_nstransform_matrix_forward,
|
712
|
+
RB_GSL_DWT_COPY);
|
729
713
|
}
|
730
714
|
|
731
715
|
static VALUE rb_gsl_wavelet2d_nstransform_matrix_forward2(int argc, VALUE *argv, VALUE obj)
|
732
716
|
{
|
733
|
-
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
734
|
-
|
735
|
-
|
717
|
+
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
718
|
+
gsl_wavelet2d_nstransform_matrix_forward,
|
719
|
+
RB_GSL_DWT_INPLACE);
|
736
720
|
}
|
737
721
|
|
738
722
|
static VALUE rb_gsl_wavelet2d_nstransform_matrix_inverse(int argc, VALUE *argv, VALUE obj)
|
739
723
|
{
|
740
|
-
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
741
|
-
|
742
|
-
|
724
|
+
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
725
|
+
gsl_wavelet2d_nstransform_matrix_inverse,
|
726
|
+
RB_GSL_DWT_COPY);
|
743
727
|
}
|
744
728
|
|
745
729
|
static VALUE rb_gsl_wavelet2d_nstransform_matrix_inverse2(int argc, VALUE *argv, VALUE obj)
|
746
730
|
{
|
747
|
-
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
748
|
-
|
749
|
-
|
731
|
+
return rb_gsl_wavelet2d_trans(argc, argv, obj,
|
732
|
+
gsl_wavelet2d_nstransform_matrix_inverse,
|
733
|
+
RB_GSL_DWT_INPLACE);
|
750
734
|
}
|
751
735
|
|
752
|
-
#endif
|
753
|
-
|
754
736
|
void Init_wavelet(VALUE module)
|
755
737
|
{
|
756
738
|
VALUE cgsl_wavelet2d;
|
@@ -760,183 +742,180 @@ void Init_wavelet(VALUE module)
|
|
760
742
|
|
761
743
|
rb_define_singleton_method(cgsl_wavelet, "alloc", rb_gsl_wavelet_new, 2);
|
762
744
|
|
763
|
-
#ifdef GSL_1_6_LATER
|
764
745
|
rb_gsl_wavelet_define_const(cgsl_wavelet);
|
765
746
|
rb_define_method(cgsl_wavelet, "name", rb_gsl_wavelet_name, 0);
|
766
747
|
|
767
748
|
cgsl_wavelet_workspace = rb_define_class_under(cgsl_wavelet, "Workspace", cGSL_Object);
|
768
|
-
rb_define_singleton_method(cgsl_wavelet_workspace, "alloc",
|
769
|
-
|
749
|
+
rb_define_singleton_method(cgsl_wavelet_workspace, "alloc",
|
750
|
+
rb_gsl_wavelet_workspace_new, 1);
|
770
751
|
|
771
752
|
/*****/
|
772
753
|
|
773
|
-
rb_define_singleton_method(cgsl_wavelet, "transform",
|
774
|
-
|
754
|
+
rb_define_singleton_method(cgsl_wavelet, "transform",
|
755
|
+
rb_gsl_wavelet_transform, -1);
|
775
756
|
rb_define_method(cgsl_wavelet, "transform", rb_gsl_wavelet_transform, -1);
|
776
757
|
rb_define_method(cgsl_vector, "wavelet_transform", rb_gsl_wavelet_transform, -1);
|
777
|
-
rb_define_singleton_method(cgsl_wavelet, "transform!",
|
778
|
-
|
758
|
+
rb_define_singleton_method(cgsl_wavelet, "transform!",
|
759
|
+
rb_gsl_wavelet_transform2, -1);
|
779
760
|
rb_define_method(cgsl_wavelet, "transform!", rb_gsl_wavelet_transform2, -1);
|
780
761
|
rb_define_method(cgsl_vector, "wavelet_transform!", rb_gsl_wavelet_transform2, -1);
|
781
762
|
|
782
763
|
/**/
|
783
764
|
|
784
|
-
rb_define_singleton_method(cgsl_wavelet, "transform_forward",
|
785
|
-
|
786
|
-
rb_define_method(cgsl_wavelet, "transform_forward",
|
787
|
-
|
765
|
+
rb_define_singleton_method(cgsl_wavelet, "transform_forward",
|
766
|
+
rb_gsl_wavelet_transform_forward, -1);
|
767
|
+
rb_define_method(cgsl_wavelet, "transform_forward",
|
768
|
+
rb_gsl_wavelet_transform_forward, -1);
|
788
769
|
rb_define_alias(cgsl_wavelet, "forward", "transform_forward");
|
789
|
-
rb_define_method(cgsl_vector, "wavelet_transform_forward",
|
790
|
-
|
770
|
+
rb_define_method(cgsl_vector, "wavelet_transform_forward",
|
771
|
+
rb_gsl_wavelet_transform_forward, -1);
|
791
772
|
|
792
|
-
rb_define_singleton_method(cgsl_wavelet, "transform_inverse",
|
793
|
-
|
794
|
-
rb_define_method(cgsl_wavelet, "transform_inverse",
|
795
|
-
|
773
|
+
rb_define_singleton_method(cgsl_wavelet, "transform_inverse",
|
774
|
+
rb_gsl_wavelet_transform_inverse, -1);
|
775
|
+
rb_define_method(cgsl_wavelet, "transform_inverse",
|
776
|
+
rb_gsl_wavelet_transform_inverse, -1);
|
796
777
|
rb_define_alias(cgsl_wavelet, "inverse", "transform_inverse");
|
797
|
-
rb_define_method(cgsl_vector, "wavelet_transform_inverse",
|
798
|
-
|
778
|
+
rb_define_method(cgsl_vector, "wavelet_transform_inverse",
|
779
|
+
rb_gsl_wavelet_transform_inverse, -1);
|
799
780
|
|
800
|
-
rb_define_singleton_method(cgsl_wavelet, "transform_forward!",
|
801
|
-
|
802
|
-
rb_define_method(cgsl_wavelet, "transform_forward!",
|
803
|
-
|
781
|
+
rb_define_singleton_method(cgsl_wavelet, "transform_forward!",
|
782
|
+
rb_gsl_wavelet_transform_forward2, -1);
|
783
|
+
rb_define_method(cgsl_wavelet, "transform_forward!",
|
784
|
+
rb_gsl_wavelet_transform_forward2, -1);
|
804
785
|
rb_define_alias(cgsl_wavelet, "forward!", "transform_forward!");
|
805
|
-
rb_define_method(cgsl_vector, "wavelet_transform_forward!",
|
806
|
-
|
786
|
+
rb_define_method(cgsl_vector, "wavelet_transform_forward!",
|
787
|
+
rb_gsl_wavelet_transform_forward2, -1);
|
807
788
|
|
808
|
-
rb_define_singleton_method(cgsl_wavelet, "transform_inverse!",
|
809
|
-
|
810
|
-
rb_define_method(cgsl_wavelet, "transform_inverse!",
|
811
|
-
|
789
|
+
rb_define_singleton_method(cgsl_wavelet, "transform_inverse!",
|
790
|
+
rb_gsl_wavelet_transform_inverse2, -1);
|
791
|
+
rb_define_method(cgsl_wavelet, "transform_inverse!",
|
792
|
+
rb_gsl_wavelet_transform_inverse2, -1);
|
812
793
|
rb_define_alias(cgsl_wavelet, "inverse!", "transform_inverse!");
|
813
|
-
rb_define_method(cgsl_vector, "wavelet_transform_inverse!",
|
814
|
-
|
794
|
+
rb_define_method(cgsl_vector, "wavelet_transform_inverse!",
|
795
|
+
rb_gsl_wavelet_transform_inverse2, -1);
|
815
796
|
/***** 2d *****/
|
816
|
-
rb_define_singleton_method(cgsl_wavelet, "transform_matrix",
|
817
|
-
|
818
|
-
rb_define_singleton_method(cgsl_wavelet2d, "transform",
|
819
|
-
|
797
|
+
rb_define_singleton_method(cgsl_wavelet, "transform_matrix",
|
798
|
+
rb_gsl_wavelet2d_transform_matrix, -1);
|
799
|
+
rb_define_singleton_method(cgsl_wavelet2d, "transform",
|
800
|
+
rb_gsl_wavelet2d_transform_matrix, -1);
|
820
801
|
rb_define_method(cgsl_wavelet, "transform_matrix",
|
821
|
-
|
822
|
-
rb_define_method(cgsl_wavelet2d, "transform",
|
823
|
-
|
824
|
-
rb_define_method(cgsl_matrix, "wavelet_transform",
|
825
|
-
|
826
|
-
|
827
|
-
rb_define_singleton_method(cgsl_wavelet, "transform_matrix!",
|
828
|
-
|
829
|
-
rb_define_singleton_method(cgsl_wavelet2d, "transform!",
|
830
|
-
|
802
|
+
rb_gsl_wavelet2d_transform_matrix, -1);
|
803
|
+
rb_define_method(cgsl_wavelet2d, "transform",
|
804
|
+
rb_gsl_wavelet2d_transform_matrix, -1);
|
805
|
+
rb_define_method(cgsl_matrix, "wavelet_transform",
|
806
|
+
rb_gsl_wavelet2d_transform_matrix, -1);
|
807
|
+
|
808
|
+
rb_define_singleton_method(cgsl_wavelet, "transform_matrix!",
|
809
|
+
rb_gsl_wavelet2d_transform_matrix2, -1);
|
810
|
+
rb_define_singleton_method(cgsl_wavelet2d, "transform!",
|
811
|
+
rb_gsl_wavelet2d_transform_matrix2, -1);
|
831
812
|
rb_define_method(cgsl_wavelet, "transform_matrix!",
|
832
|
-
|
833
|
-
rb_define_method(cgsl_wavelet2d, "transform!",
|
834
|
-
|
835
|
-
rb_define_method(cgsl_matrix, "wavelet_transform!",
|
836
|
-
|
813
|
+
rb_gsl_wavelet2d_transform_matrix2, -1);
|
814
|
+
rb_define_method(cgsl_wavelet2d, "transform!",
|
815
|
+
rb_gsl_wavelet2d_transform_matrix2, -1);
|
816
|
+
rb_define_method(cgsl_matrix, "wavelet_transform!",
|
817
|
+
rb_gsl_wavelet2d_transform_matrix2, -1);
|
837
818
|
/**/
|
838
819
|
|
839
|
-
rb_define_singleton_method(cgsl_wavelet, "transform_matrix_forward",
|
840
|
-
|
841
|
-
rb_define_singleton_method(cgsl_wavelet2d, "transform_forward",
|
842
|
-
|
843
|
-
rb_define_method(cgsl_wavelet, "transform_matrix_forward",
|
844
|
-
|
845
|
-
rb_define_method(cgsl_wavelet2d, "transform_forward",
|
846
|
-
|
847
|
-
rb_define_method(cgsl_matrix, "wavelet_transform_forward",
|
848
|
-
|
849
|
-
|
850
|
-
rb_define_singleton_method(cgsl_wavelet, "transform_matrix_forward!",
|
851
|
-
|
852
|
-
rb_define_singleton_method(cgsl_wavelet2d, "transform_forward!",
|
853
|
-
|
854
|
-
rb_define_method(cgsl_wavelet, "transform_matrix_forward!",
|
855
|
-
|
856
|
-
rb_define_method(cgsl_wavelet2d, "transform_forward!",
|
857
|
-
|
858
|
-
rb_define_method(cgsl_matrix, "wavelet_transform_forward!",
|
859
|
-
|
860
|
-
|
861
|
-
rb_define_singleton_method(cgsl_wavelet, "transform_matrix_inverse",
|
862
|
-
|
863
|
-
rb_define_singleton_method(cgsl_wavelet2d, "transform_inverse",
|
864
|
-
|
865
|
-
rb_define_method(cgsl_wavelet, "transform_matrix_inverse",
|
866
|
-
|
867
|
-
rb_define_method(cgsl_wavelet2d, "transform_inverse",
|
868
|
-
|
869
|
-
rb_define_method(cgsl_matrix, "wavelet_transform_inverse",
|
870
|
-
|
871
|
-
|
872
|
-
rb_define_singleton_method(cgsl_wavelet, "transform_matrix_inverse!",
|
873
|
-
|
874
|
-
rb_define_singleton_method(cgsl_wavelet2d, "transform_inverse!",
|
875
|
-
|
876
|
-
rb_define_method(cgsl_wavelet, "transform_matrix_inverse!",
|
877
|
-
|
878
|
-
rb_define_method(cgsl_wavelet2d, "transform_inverse!",
|
879
|
-
|
880
|
-
rb_define_method(cgsl_matrix, "wavelet_transform_inverse!",
|
881
|
-
|
820
|
+
rb_define_singleton_method(cgsl_wavelet, "transform_matrix_forward",
|
821
|
+
rb_gsl_wavelet2d_transform_matrix_forward, -1);
|
822
|
+
rb_define_singleton_method(cgsl_wavelet2d, "transform_forward",
|
823
|
+
rb_gsl_wavelet2d_transform_matrix_forward, -1);
|
824
|
+
rb_define_method(cgsl_wavelet, "transform_matrix_forward",
|
825
|
+
rb_gsl_wavelet2d_transform_matrix_forward, -1);
|
826
|
+
rb_define_method(cgsl_wavelet2d, "transform_forward",
|
827
|
+
rb_gsl_wavelet2d_transform_matrix_forward, -1);
|
828
|
+
rb_define_method(cgsl_matrix, "wavelet_transform_forward",
|
829
|
+
rb_gsl_wavelet2d_transform_matrix_forward, -1);
|
830
|
+
|
831
|
+
rb_define_singleton_method(cgsl_wavelet, "transform_matrix_forward!",
|
832
|
+
rb_gsl_wavelet2d_transform_matrix_forward2, -1);
|
833
|
+
rb_define_singleton_method(cgsl_wavelet2d, "transform_forward!",
|
834
|
+
rb_gsl_wavelet2d_transform_matrix_forward2, -1);
|
835
|
+
rb_define_method(cgsl_wavelet, "transform_matrix_forward!",
|
836
|
+
rb_gsl_wavelet2d_transform_matrix_forward2, -1);
|
837
|
+
rb_define_method(cgsl_wavelet2d, "transform_forward!",
|
838
|
+
rb_gsl_wavelet2d_transform_matrix_forward2, -1);
|
839
|
+
rb_define_method(cgsl_matrix, "wavelet_transform_forward!",
|
840
|
+
rb_gsl_wavelet2d_transform_matrix_forward2, -1);
|
841
|
+
|
842
|
+
rb_define_singleton_method(cgsl_wavelet, "transform_matrix_inverse",
|
843
|
+
rb_gsl_wavelet2d_transform_matrix_inverse, -1);
|
844
|
+
rb_define_singleton_method(cgsl_wavelet2d, "transform_inverse",
|
845
|
+
rb_gsl_wavelet2d_transform_matrix_inverse, -1);
|
846
|
+
rb_define_method(cgsl_wavelet, "transform_matrix_inverse",
|
847
|
+
rb_gsl_wavelet2d_transform_matrix_inverse, -1);
|
848
|
+
rb_define_method(cgsl_wavelet2d, "transform_inverse",
|
849
|
+
rb_gsl_wavelet2d_transform_matrix_inverse, -1);
|
850
|
+
rb_define_method(cgsl_matrix, "wavelet_transform_inverse",
|
851
|
+
rb_gsl_wavelet2d_transform_matrix_inverse, -1);
|
852
|
+
|
853
|
+
rb_define_singleton_method(cgsl_wavelet, "transform_matrix_inverse!",
|
854
|
+
rb_gsl_wavelet2d_transform_matrix_inverse2, -1);
|
855
|
+
rb_define_singleton_method(cgsl_wavelet2d, "transform_inverse!",
|
856
|
+
rb_gsl_wavelet2d_transform_matrix_inverse2, -1);
|
857
|
+
rb_define_method(cgsl_wavelet, "transform_matrix_inverse!",
|
858
|
+
rb_gsl_wavelet2d_transform_matrix_inverse2, -1);
|
859
|
+
rb_define_method(cgsl_wavelet2d, "transform_inverse!",
|
860
|
+
rb_gsl_wavelet2d_transform_matrix_inverse2, -1);
|
861
|
+
rb_define_method(cgsl_matrix, "wavelet_transform_inverse!",
|
862
|
+
rb_gsl_wavelet2d_transform_matrix_inverse2, -1);
|
882
863
|
|
883
864
|
/** nstransform **/
|
884
|
-
rb_define_singleton_method(cgsl_wavelet, "nstransform_matrix",
|
885
|
-
|
886
|
-
rb_define_singleton_method(cgsl_wavelet2d, "nstransform",
|
887
|
-
|
888
|
-
rb_define_method(cgsl_wavelet, "nstransform_matrix",
|
889
|
-
|
890
|
-
rb_define_method(cgsl_wavelet2d, "nstransform",
|
891
|
-
|
892
|
-
|
893
|
-
rb_define_singleton_method(cgsl_wavelet, "nstransform_matrix!",
|
894
|
-
|
895
|
-
rb_define_singleton_method(cgsl_wavelet2d, "nstransform!",
|
896
|
-
|
897
|
-
rb_define_method(cgsl_wavelet, "nstransform_matrix!",
|
898
|
-
|
899
|
-
rb_define_method(cgsl_wavelet2d, "nstransform!",
|
900
|
-
|
865
|
+
rb_define_singleton_method(cgsl_wavelet, "nstransform_matrix",
|
866
|
+
rb_gsl_wavelet2d_nstransform_matrix, -1);
|
867
|
+
rb_define_singleton_method(cgsl_wavelet2d, "nstransform",
|
868
|
+
rb_gsl_wavelet2d_nstransform_matrix, -1);
|
869
|
+
rb_define_method(cgsl_wavelet, "nstransform_matrix",
|
870
|
+
rb_gsl_wavelet2d_nstransform_matrix, -1);
|
871
|
+
rb_define_method(cgsl_wavelet2d, "nstransform",
|
872
|
+
rb_gsl_wavelet2d_nstransform_matrix, -1);
|
873
|
+
|
874
|
+
rb_define_singleton_method(cgsl_wavelet, "nstransform_matrix!",
|
875
|
+
rb_gsl_wavelet2d_nstransform_matrix2, -1);
|
876
|
+
rb_define_singleton_method(cgsl_wavelet2d, "nstransform!",
|
877
|
+
rb_gsl_wavelet2d_nstransform_matrix2, -1);
|
878
|
+
rb_define_method(cgsl_wavelet, "nstransform_matrix!",
|
879
|
+
rb_gsl_wavelet2d_nstransform_matrix2, -1);
|
880
|
+
rb_define_method(cgsl_wavelet2d, "nstransform!",
|
881
|
+
rb_gsl_wavelet2d_nstransform_matrix2, -1);
|
901
882
|
/**/
|
902
883
|
|
903
|
-
rb_define_singleton_method(cgsl_wavelet, "nstransform_matrix_forward",
|
904
|
-
|
905
|
-
rb_define_singleton_method(cgsl_wavelet2d, "nstransform_forward",
|
906
|
-
|
907
|
-
rb_define_method(cgsl_wavelet, "nstransform_matrix_forward",
|
908
|
-
|
909
|
-
rb_define_method(cgsl_wavelet2d, "nstransform_forward",
|
910
|
-
|
911
|
-
|
912
|
-
rb_define_singleton_method(cgsl_wavelet, "nstransform_matrix_forward!",
|
913
|
-
|
914
|
-
rb_define_singleton_method(cgsl_wavelet2d, "nstransform_forward!",
|
915
|
-
|
916
|
-
rb_define_method(cgsl_wavelet, "nstransform_matrix_forward!",
|
917
|
-
|
918
|
-
rb_define_method(cgsl_wavelet2d, "nstransform_forward!",
|
919
|
-
|
920
|
-
|
921
|
-
rb_define_singleton_method(cgsl_wavelet, "nstransform_matrix_inverse",
|
922
|
-
|
923
|
-
rb_define_singleton_method(cgsl_wavelet2d, "nstransform_inverse",
|
924
|
-
|
925
|
-
rb_define_method(cgsl_wavelet, "nstransform_matrix_inverse",
|
926
|
-
|
927
|
-
rb_define_method(cgsl_wavelet2d, "nstransform_inverse",
|
928
|
-
|
929
|
-
|
930
|
-
rb_define_singleton_method(cgsl_wavelet, "nstransform_matrix_inverse!",
|
931
|
-
|
932
|
-
rb_define_singleton_method(cgsl_wavelet2d, "nstransform_inverse!",
|
933
|
-
|
934
|
-
rb_define_method(cgsl_wavelet, "nstransform_matrix_inverse!",
|
935
|
-
|
936
|
-
rb_define_method(cgsl_wavelet2d, "nstransform_inverse!",
|
937
|
-
|
938
|
-
|
939
|
-
#endif
|
884
|
+
rb_define_singleton_method(cgsl_wavelet, "nstransform_matrix_forward",
|
885
|
+
rb_gsl_wavelet2d_nstransform_matrix_forward, -1);
|
886
|
+
rb_define_singleton_method(cgsl_wavelet2d, "nstransform_forward",
|
887
|
+
rb_gsl_wavelet2d_nstransform_matrix_forward, -1);
|
888
|
+
rb_define_method(cgsl_wavelet, "nstransform_matrix_forward",
|
889
|
+
rb_gsl_wavelet2d_nstransform_matrix_forward, -1);
|
890
|
+
rb_define_method(cgsl_wavelet2d, "nstransform_forward",
|
891
|
+
rb_gsl_wavelet2d_nstransform_matrix_forward, -1);
|
892
|
+
|
893
|
+
rb_define_singleton_method(cgsl_wavelet, "nstransform_matrix_forward!",
|
894
|
+
rb_gsl_wavelet2d_nstransform_matrix_forward2, -1);
|
895
|
+
rb_define_singleton_method(cgsl_wavelet2d, "nstransform_forward!",
|
896
|
+
rb_gsl_wavelet2d_nstransform_matrix_forward2, -1);
|
897
|
+
rb_define_method(cgsl_wavelet, "nstransform_matrix_forward!",
|
898
|
+
rb_gsl_wavelet2d_nstransform_matrix_forward2, -1);
|
899
|
+
rb_define_method(cgsl_wavelet2d, "nstransform_forward!",
|
900
|
+
rb_gsl_wavelet2d_nstransform_matrix_forward2, -1);
|
901
|
+
|
902
|
+
rb_define_singleton_method(cgsl_wavelet, "nstransform_matrix_inverse",
|
903
|
+
rb_gsl_wavelet2d_nstransform_matrix_inverse, -1);
|
904
|
+
rb_define_singleton_method(cgsl_wavelet2d, "nstransform_inverse",
|
905
|
+
rb_gsl_wavelet2d_nstransform_matrix_inverse, -1);
|
906
|
+
rb_define_method(cgsl_wavelet, "nstransform_matrix_inverse",
|
907
|
+
rb_gsl_wavelet2d_nstransform_matrix_inverse, -1);
|
908
|
+
rb_define_method(cgsl_wavelet2d, "nstransform_inverse",
|
909
|
+
rb_gsl_wavelet2d_nstransform_matrix_inverse, -1);
|
910
|
+
|
911
|
+
rb_define_singleton_method(cgsl_wavelet, "nstransform_matrix_inverse!",
|
912
|
+
rb_gsl_wavelet2d_nstransform_matrix_inverse2, -1);
|
913
|
+
rb_define_singleton_method(cgsl_wavelet2d, "nstransform_inverse!",
|
914
|
+
rb_gsl_wavelet2d_nstransform_matrix_inverse2, -1);
|
915
|
+
rb_define_method(cgsl_wavelet, "nstransform_matrix_inverse!",
|
916
|
+
rb_gsl_wavelet2d_nstransform_matrix_inverse2, -1);
|
917
|
+
rb_define_method(cgsl_wavelet2d, "nstransform_inverse!",
|
918
|
+
rb_gsl_wavelet2d_nstransform_matrix_inverse2, -1);
|
940
919
|
}
|
941
920
|
|
942
921
|
#undef CHECK_WAVELET
|