rb-gsl 1.16.0 → 1.16.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +6 -0
- data/README +11 -15
- data/Rakefile +6 -10
- data/ext/{alf.c → gsl/alf.c} +1 -1
- data/ext/{array.c → gsl/array.c} +4 -6
- data/ext/{array_complex.c → gsl/array_complex.c} +2 -3
- data/ext/{blas.c → gsl/blas.c} +2 -3
- data/ext/{blas1.c → gsl/blas1.c} +3 -4
- data/ext/{blas2.c → gsl/blas2.c} +3 -4
- data/ext/{blas3.c → gsl/blas3.c} +3 -4
- data/ext/{block.c → gsl/block.c} +11 -12
- data/ext/{block_source.c → gsl/block_source.c} +0 -0
- data/ext/{bspline.c → gsl/bspline.c} +1 -1
- data/ext/{bundle.c → gsl/bundle.c} +0 -0
- data/ext/{cdf.c → gsl/cdf.c} +3 -5
- data/ext/{cheb.c → gsl/cheb.c} +4 -4
- data/ext/{combination.c → gsl/combination.c} +2 -3
- data/ext/{common.c → gsl/common.c} +8 -10
- data/ext/{complex.c → gsl/complex.c} +3 -3
- data/ext/{const.c → gsl/const.c} +2 -3
- data/ext/{const_additional.c → gsl/const_additional.c} +2 -2
- data/ext/{cqp.c → gsl/cqp.c} +1 -1
- data/ext/{deriv.c → gsl/deriv.c} +3 -3
- data/ext/{dht.c → gsl/dht.c} +3 -3
- data/ext/{diff.c → gsl/diff.c} +3 -3
- data/ext/{dirac.c → gsl/dirac.c} +1 -1
- data/ext/{eigen.c → gsl/eigen.c} +16 -16
- data/ext/{error.c → gsl/error.c} +5 -5
- data/ext/gsl/extconf.rb +121 -0
- data/ext/{fcmp.c → gsl/fcmp.c} +0 -2
- data/ext/{fft.c → gsl/fft.c} +1 -2
- data/ext/{fit.c → gsl/fit.c} +1 -2
- data/ext/{fresnel.c → gsl/fresnel.c} +2 -2
- data/ext/{function.c → gsl/function.c} +3 -3
- data/ext/{geometry.c → gsl/geometry.c} +1 -1
- data/ext/{graph.c → gsl/graph.c} +2 -2
- data/ext/{gsl.c → gsl/gsl.c} +2 -10
- data/ext/{gsl_narray.c → gsl/gsl_narray.c} +2 -3
- data/ext/{histogram.c → gsl/histogram.c} +3 -4
- data/ext/{histogram2d.c → gsl/histogram2d.c} +3 -4
- data/ext/{histogram3d.c → gsl/histogram3d.c} +4 -4
- data/ext/{histogram3d_source.c → gsl/histogram3d_source.c} +1 -1
- data/ext/{histogram_find.c → gsl/histogram_find.c} +1 -1
- data/ext/{histogram_oper.c → gsl/histogram_oper.c} +0 -0
- data/ext/{ieee.c → gsl/ieee.c} +4 -8
- data/{include → ext/gsl/include}/rb_gsl.h +4 -19
- data/{include → ext/gsl/include}/rb_gsl_array.h +0 -14
- data/{include → ext/gsl/include}/rb_gsl_cheb.h +0 -2
- data/{include → ext/gsl/include}/rb_gsl_common.h +11 -15
- data/{include → ext/gsl/include}/rb_gsl_complex.h +1 -1
- data/{include → ext/gsl/include}/rb_gsl_const.h +1 -2
- data/ext/gsl/include/rb_gsl_dirac.h +6 -0
- data/{include → ext/gsl/include}/rb_gsl_eigen.h +1 -1
- data/{include → ext/gsl/include}/rb_gsl_fft.h +0 -10
- data/{include → ext/gsl/include}/rb_gsl_fit.h +0 -2
- data/{include → ext/gsl/include}/rb_gsl_function.h +0 -4
- data/{include → ext/gsl/include}/rb_gsl_graph.h +0 -2
- data/{include → ext/gsl/include}/rb_gsl_histogram.h +0 -0
- data/{include → ext/gsl/include}/rb_gsl_histogram3d.h +0 -0
- data/{include → ext/gsl/include}/rb_gsl_integration.h +1 -1
- data/{include → ext/gsl/include}/rb_gsl_interp.h +0 -5
- data/{include → ext/gsl/include}/rb_gsl_linalg.h +2 -5
- data/{include → ext/gsl/include}/rb_gsl_math.h +0 -2
- data/{include → ext/gsl/include}/rb_gsl_odeiv.h +0 -3
- data/{include → ext/gsl/include}/rb_gsl_poly.h +0 -4
- data/{include → ext/gsl/include}/rb_gsl_rational.h +0 -7
- data/{include → ext/gsl/include}/rb_gsl_rng.h +0 -1
- data/{include → ext/gsl/include}/rb_gsl_root.h +1 -1
- data/{include → ext/gsl/include}/rb_gsl_sf.h +0 -5
- data/{include → ext/gsl/include}/rb_gsl_statistics.h +1 -1
- data/{include → ext/gsl/include}/rb_gsl_tensor.h +0 -2
- data/{include → ext/gsl/include}/rb_gsl_with_narray.h +3 -1
- data/{include → ext/gsl/include}/templates_off.h +0 -0
- data/{include → ext/gsl/include}/templates_on.h +0 -0
- data/ext/{integration.c → gsl/integration.c} +4 -6
- data/ext/{interp.c → gsl/interp.c} +1 -6
- data/ext/{jacobi.c → gsl/jacobi.c} +1 -1
- data/ext/{linalg.c → gsl/linalg.c} +3 -4
- data/ext/{linalg_complex.c → gsl/linalg_complex.c} +3 -4
- data/ext/{math.c → gsl/math.c} +2 -3
- data/ext/{matrix.c → gsl/matrix.c} +9 -10
- data/ext/{matrix_complex.c → gsl/matrix_complex.c} +2 -3
- data/ext/{matrix_double.c → gsl/matrix_double.c} +5 -5
- data/ext/{matrix_int.c → gsl/matrix_int.c} +4 -4
- data/ext/{matrix_source.c → gsl/matrix_source.c} +2 -6
- data/ext/{min.c → gsl/min.c} +2 -2
- data/ext/{monte.c → gsl/monte.c} +3 -3
- data/ext/{multifit.c → gsl/multifit.c} +4 -4
- data/ext/{multimin.c → gsl/multimin.c} +5 -5
- data/ext/{multimin_fsdf.c → gsl/multimin_fsdf.c} +1 -1
- data/ext/{multiroots.c → gsl/multiroots.c} +6 -6
- data/ext/{multiset.c → gsl/multiset.c} +1 -1
- data/ext/{ndlinear.c → gsl/ndlinear.c} +1 -1
- data/ext/{nmf.c → gsl/nmf.c} +0 -0
- data/ext/{nmf_wrap.c → gsl/nmf_wrap.c} +0 -0
- data/ext/{ntuple.c → gsl/ntuple.c} +6 -6
- data/ext/{odeiv.c → gsl/odeiv.c} +4 -8
- data/ext/{ool.c → gsl/ool.c} +2 -2
- data/ext/{oper_complex_source.c → gsl/oper_complex_source.c} +2 -4
- data/ext/{permutation.c → gsl/permutation.c} +2 -2
- data/ext/{poly.c → gsl/poly.c} +8 -8
- data/ext/{poly2.c → gsl/poly2.c} +4 -4
- data/ext/{poly_source.c → gsl/poly_source.c} +7 -11
- data/ext/{qrng.c → gsl/qrng.c} +3 -3
- data/ext/{randist.c → gsl/randist.c} +4 -4
- data/ext/{rational.c → gsl/rational.c} +3 -3
- data/ext/{rng.c → gsl/rng.c} +1 -2
- data/ext/{root.c → gsl/root.c} +4 -5
- data/ext/{sf.c → gsl/sf.c} +2 -2
- data/ext/{sf_airy.c → gsl/sf_airy.c} +2 -2
- data/ext/{sf_bessel.c → gsl/sf_bessel.c} +1 -1
- data/ext/{sf_clausen.c → gsl/sf_clausen.c} +1 -1
- data/ext/{sf_coulomb.c → gsl/sf_coulomb.c} +1 -1
- data/ext/{sf_coupling.c → gsl/sf_coupling.c} +1 -1
- data/ext/{sf_dawson.c → gsl/sf_dawson.c} +1 -1
- data/ext/{sf_debye.c → gsl/sf_debye.c} +1 -1
- data/ext/{sf_dilog.c → gsl/sf_dilog.c} +1 -1
- data/ext/{sf_elementary.c → gsl/sf_elementary.c} +1 -1
- data/ext/{sf_ellint.c → gsl/sf_ellint.c} +1 -1
- data/ext/{sf_elljac.c → gsl/sf_elljac.c} +1 -1
- data/ext/{sf_erfc.c → gsl/sf_erfc.c} +1 -1
- data/ext/{sf_exp.c → gsl/sf_exp.c} +1 -1
- data/ext/{sf_expint.c → gsl/sf_expint.c} +1 -1
- data/ext/{sf_fermi_dirac.c → gsl/sf_fermi_dirac.c} +1 -1
- data/ext/{sf_gamma.c → gsl/sf_gamma.c} +1 -1
- data/ext/{sf_gegenbauer.c → gsl/sf_gegenbauer.c} +1 -1
- data/ext/{sf_hyperg.c → gsl/sf_hyperg.c} +1 -1
- data/ext/{sf_laguerre.c → gsl/sf_laguerre.c} +1 -1
- data/ext/{sf_lambert.c → gsl/sf_lambert.c} +1 -1
- data/ext/{sf_legendre.c → gsl/sf_legendre.c} +1 -1
- data/ext/{sf_log.c → gsl/sf_log.c} +1 -1
- data/ext/{sf_mathieu.c → gsl/sf_mathieu.c} +1 -1
- data/ext/{sf_power.c → gsl/sf_power.c} +1 -1
- data/ext/{sf_psi.c → gsl/sf_psi.c} +1 -1
- data/ext/{sf_synchrotron.c → gsl/sf_synchrotron.c} +1 -1
- data/ext/{sf_transport.c → gsl/sf_transport.c} +1 -1
- data/ext/{sf_trigonometric.c → gsl/sf_trigonometric.c} +1 -1
- data/ext/{sf_zeta.c → gsl/sf_zeta.c} +1 -1
- data/ext/{signal.c → gsl/signal.c} +2 -3
- data/ext/{siman.c → gsl/siman.c} +9 -9
- data/ext/{sort.c → gsl/sort.c} +4 -4
- data/ext/{spline.c → gsl/spline.c} +3 -3
- data/ext/{stats.c → gsl/stats.c} +3 -3
- data/ext/{sum.c → gsl/sum.c} +2 -2
- data/ext/{tamu_anova.c → gsl/tamu_anova.c} +1 -1
- data/ext/{tensor.c → gsl/tensor.c} +6 -7
- data/ext/{tensor_source.c → gsl/tensor_source.c} +3 -4
- data/ext/{vector.c → gsl/vector.c} +9 -10
- data/ext/{vector_complex.c → gsl/vector_complex.c} +3 -3
- data/ext/{vector_double.c → gsl/vector_double.c} +5 -6
- data/ext/{vector_int.c → gsl/vector_int.c} +4 -4
- data/ext/{vector_source.c → gsl/vector_source.c} +1 -5
- data/ext/{wavelet.c → gsl/wavelet.c} +3 -4
- data/lib/gsl.rb +13 -3
- data/lib/gsl/gnuplot.rb +1 -1
- data/lib/gsl/version.rb +5 -0
- data/lib/rbgsl.rb +1 -3
- data/rdoc/index.rdoc +0 -9
- metadata +199 -160
- data/VERSION +0 -1
- data/ext/extconf.rb +0 -309
- data/include/rb_gsl_config.h +0 -71
- data/include/rb_gsl_dirac.h +0 -13
@@ -11,13 +11,8 @@
|
|
11
11
|
#ifndef ___RB_GSL_SF_H___
|
12
12
|
#define ___RB_GSL_SF_H___
|
13
13
|
|
14
|
-
#include "ruby.h"
|
15
14
|
#include <gsl/gsl_sf.h>
|
16
|
-
#include <gsl/gsl_errno.h>
|
17
|
-
#include <gsl/gsl_vector.h>
|
18
|
-
#include <gsl/gsl_math.h>
|
19
15
|
#include <gsl/gsl_complex.h>
|
20
|
-
#include "rb_gsl_config.h"
|
21
16
|
#include "rb_gsl.h"
|
22
17
|
|
23
18
|
EXTERN VALUE cgsl_sf_result, cgsl_sf_result_e10;
|
@@ -1,10 +1,11 @@
|
|
1
1
|
#ifndef RB_GSL_WITH_NARRAY_H
|
2
2
|
#define RB_GSL_WITH_NARRAY_H
|
3
3
|
|
4
|
+
#include <gsl/gsl_vector.h>
|
5
|
+
|
4
6
|
#ifdef HAVE_NARRAY_H
|
5
7
|
|
6
8
|
#include "narray.h"
|
7
|
-
#include "gsl/gsl_vector.h"
|
8
9
|
|
9
10
|
gsl_vector* make_cvector_from_narray(VALUE);
|
10
11
|
void cvector_set_from_narray(gsl_vector*, VALUE);
|
@@ -25,5 +26,6 @@ extern VALUE cNVector, cNMatrix;
|
|
25
26
|
|
26
27
|
gsl_vector_complex* na_to_gv_complex(VALUE na);
|
27
28
|
gsl_vector_complex_view* na_to_gv_complex_view(VALUE na);
|
29
|
+
|
28
30
|
#endif // HAVE_NARRAY_H
|
29
31
|
#endif // RB_GSL_WITH_NARRAY_H
|
File without changes
|
File without changes
|
@@ -9,12 +9,10 @@
|
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
11
|
|
12
|
-
#include "
|
13
|
-
|
14
|
-
#include "
|
15
|
-
#include "
|
16
|
-
#include "rb_gsl_integration.h"
|
17
|
-
#include "rb_gsl_common.h"
|
12
|
+
#include "include/rb_gsl_array.h"
|
13
|
+
#include "include/rb_gsl_function.h"
|
14
|
+
#include "include/rb_gsl_integration.h"
|
15
|
+
#include "include/rb_gsl_common.h"
|
18
16
|
|
19
17
|
#ifndef CHECK_WORKSPACE
|
20
18
|
#define CHECK_WORKSPACE(x) if(CLASS_OF(x)!=cgsl_integration_workspace)\
|
@@ -9,8 +9,7 @@
|
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
11
|
|
12
|
-
#include "
|
13
|
-
#include "rb_gsl_interp.h"
|
12
|
+
#include "include/rb_gsl_interp.h"
|
14
13
|
|
15
14
|
VALUE cgsl_interp_accel; /* this is used also in spline.c */
|
16
15
|
EXTERN VALUE cgsl_vector, cgsl_matrix;
|
@@ -437,11 +436,7 @@ static VALUE rb_gsl_interp_info(VALUE obj)
|
|
437
436
|
char buf[256];
|
438
437
|
Data_Get_Struct(obj, rb_gsl_interp, p);
|
439
438
|
sprintf(buf, "Class: %s\n", rb_class2name(CLASS_OF(obj)));
|
440
|
-
#ifdef RUBY_1_9_LATER
|
441
439
|
sprintf(buf, "%sSuperClass: %s\n", buf, rb_class2name(RCLASS_SUPER(CLASS_OF(obj))));
|
442
|
-
#else
|
443
|
-
sprintf(buf, "%sSuperClass: %s\n", buf, rb_class2name(RCLASS(CLASS_OF(obj))->super));
|
444
|
-
#endif
|
445
440
|
sprintf(buf, "%sType: %s\n", buf, gsl_interp_name(p->p));
|
446
441
|
sprintf(buf, "%sxmin: %f\n", buf, p->p->xmin);
|
447
442
|
sprintf(buf, "%sxmax: %f\n", buf, p->p->xmax);
|
@@ -9,11 +9,10 @@
|
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
11
|
|
12
|
-
#include "rb_gsl_config.h"
|
13
12
|
#include <gsl/gsl_math.h>
|
14
|
-
#include "rb_gsl_array.h"
|
15
|
-
#include "rb_gsl_common.h"
|
16
|
-
#include "rb_gsl_linalg.h"
|
13
|
+
#include "include/rb_gsl_array.h"
|
14
|
+
#include "include/rb_gsl_common.h"
|
15
|
+
#include "include/rb_gsl_linalg.h"
|
17
16
|
|
18
17
|
static VALUE cgsl_matrix_LU;
|
19
18
|
static VALUE cgsl_matrix_QR;
|
@@ -9,11 +9,10 @@
|
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
11
|
|
12
|
-
#include "rb_gsl_config.h"
|
13
12
|
#include <gsl/gsl_math.h>
|
14
|
-
#include "rb_gsl_array.h"
|
15
|
-
#include "rb_gsl_common.h"
|
16
|
-
#include "rb_gsl_linalg.h"
|
13
|
+
#include "include/rb_gsl_array.h"
|
14
|
+
#include "include/rb_gsl_common.h"
|
15
|
+
#include "include/rb_gsl_linalg.h"
|
17
16
|
|
18
17
|
EXTERN VALUE mgsl_linalg;
|
19
18
|
EXTERN VALUE cgsl_complex;
|
data/ext/{math.c → gsl/math.c}
RENAMED
@@ -10,9 +10,8 @@
|
|
10
10
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
11
11
|
*/
|
12
12
|
|
13
|
-
#include "
|
14
|
-
#include "
|
15
|
-
#include "rb_gsl_complex.h"
|
13
|
+
#include "include/rb_gsl_math.h"
|
14
|
+
#include "include/rb_gsl_complex.h"
|
16
15
|
#ifdef HAVE_NARRAY_H
|
17
16
|
#include "narray.h"
|
18
17
|
#endif
|
@@ -14,26 +14,25 @@
|
|
14
14
|
which are provided by the GSL source.
|
15
15
|
*/
|
16
16
|
|
17
|
-
#include "
|
18
|
-
#include "
|
19
|
-
#include "
|
20
|
-
#include "
|
21
|
-
#include "rb_gsl_poly.h"
|
17
|
+
#include "include/rb_gsl_array.h"
|
18
|
+
#include "include/rb_gsl_histogram.h"
|
19
|
+
#include "include/rb_gsl_complex.h"
|
20
|
+
#include "include/rb_gsl_poly.h"
|
22
21
|
#ifdef HAVE_NARRAY_H
|
23
|
-
#include "rb_gsl_with_narray.h"
|
22
|
+
#include "include/rb_gsl_with_narray.h"
|
24
23
|
#endif
|
25
24
|
|
26
25
|
int gsl_linalg_matmult_int(const gsl_matrix_int *A,
|
27
26
|
const gsl_matrix_int *B, gsl_matrix_int *C);
|
28
27
|
|
29
28
|
#define BASE_DOUBLE
|
30
|
-
#include "templates_on.h"
|
29
|
+
#include "include/templates_on.h"
|
31
30
|
#include "matrix_source.c"
|
32
|
-
#include "templates_off.h"
|
31
|
+
#include "include/templates_off.h"
|
33
32
|
#undef BASE_DOUBLE
|
34
33
|
|
35
34
|
#define BASE_INT
|
36
|
-
#include "templates_on.h"
|
35
|
+
#include "include/templates_on.h"
|
37
36
|
#include "matrix_source.c"
|
38
|
-
#include "templates_off.h"
|
37
|
+
#include "include/templates_off.h"
|
39
38
|
#undef BASE_INT
|
@@ -8,11 +8,11 @@
|
|
8
8
|
This library is distributed in the hope that it will be useful, but
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
|
-
|
12
|
-
#include "rb_gsl_array.h"
|
13
|
-
#include "rb_gsl_complex.h"
|
11
|
+
|
12
|
+
#include "include/rb_gsl_array.h"
|
13
|
+
#include "include/rb_gsl_complex.h"
|
14
14
|
#ifdef HAVE_NARRAY_H
|
15
|
-
#include "rb_gsl_with_narray.h"
|
15
|
+
#include "include/rb_gsl_with_narray.h"
|
16
16
|
#endif
|
17
17
|
|
18
18
|
enum {
|
@@ -465,7 +465,7 @@ static VALUE rb_gsl_matrix_log10(VALUE obj)
|
|
465
465
|
|
466
466
|
#include <gsl/gsl_rng.h>
|
467
467
|
#include <gsl/gsl_randist.h>
|
468
|
-
#include "rb_gsl_rng.h"
|
468
|
+
#include "include/rb_gsl_rng.h"
|
469
469
|
static VALUE rb_gsl_matrix_randx(int argc, VALUE *argv, VALUE klass,
|
470
470
|
double (*f)(const gsl_rng*));
|
471
471
|
static VALUE rb_gsl_matrix_rand(int argc, VALUE *argv, VALUE klass)
|
@@ -8,11 +8,11 @@
|
|
8
8
|
This library is distributed in the hope that it will be useful, but
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
|
-
|
12
|
-
#include "rb_gsl_array.h"
|
13
|
-
#include "rb_gsl_complex.h"
|
11
|
+
|
12
|
+
#include "include/rb_gsl_array.h"
|
13
|
+
#include "include/rb_gsl_complex.h"
|
14
14
|
#ifdef HAVE_NARRAY_H
|
15
|
-
#include "rb_gsl_with_narray.h"
|
15
|
+
#include "include/rb_gsl_with_narray.h"
|
16
16
|
#endif
|
17
17
|
|
18
18
|
int gsl_linalg_matmult_int(const gsl_matrix_int *A,
|
@@ -1005,7 +1005,7 @@ static VALUE FUNCTION(rb_gsl_matrix,set_diagonal)(VALUE obj, VALUE diag)
|
|
1005
1005
|
for (i = 0; i < m->size1; i++) FUNCTION(gsl_matrix,set)(m, i, i, x);
|
1006
1006
|
break;
|
1007
1007
|
case T_ARRAY:
|
1008
|
-
len = GSL_MIN_INT(m->size1, RARRAY_LEN(diag));
|
1008
|
+
len = GSL_MIN_INT((int) m->size1, RARRAY_LEN(diag));
|
1009
1009
|
for (i = 0; i < len; i++) {
|
1010
1010
|
FUNCTION(gsl_matrix,set)(m, i, i, NUMCONV2(rb_ary_entry(diag, i)));
|
1011
1011
|
}
|
@@ -1626,7 +1626,7 @@ static VALUE FUNCTION(rb_gsl_matrix,equal_singleton)(int argc, VALUE *argv, VALU
|
|
1626
1626
|
}
|
1627
1627
|
|
1628
1628
|
#ifdef HAVE_TENSOR_TENSOR_H
|
1629
|
-
#include "rb_gsl_tensor.h"
|
1629
|
+
#include "include/rb_gsl_tensor.h"
|
1630
1630
|
static VALUE FUNCTION(rb_gsl_matrix,to_tensor)(VALUE obj)
|
1631
1631
|
{
|
1632
1632
|
GSL_TYPE(gsl_matrix) *m;
|
@@ -2074,11 +2074,7 @@ static VALUE FUNCTION(rb_gsl_matrix,info)(VALUE obj)
|
|
2074
2074
|
char buf[256];
|
2075
2075
|
Data_Get_Struct(obj, GSL_TYPE(gsl_matrix), m);
|
2076
2076
|
sprintf(buf, "Class: %s\n", rb_class2name(CLASS_OF(obj)));
|
2077
|
-
#ifdef RUBY_1_9_LATER
|
2078
2077
|
sprintf(buf, "%sSuperClass: %s\n", buf, rb_class2name(RCLASS_SUPER(CLASS_OF(obj))));
|
2079
|
-
#else
|
2080
|
-
sprintf(buf, "%sSuperClass: %s\n", buf, rb_class2name(RCLASS(CLASS_OF(obj))->super));
|
2081
|
-
#endif
|
2082
2078
|
sprintf(buf, "%sDimension: %dx%d\n", buf, (int) m->size1, (int) m->size2);
|
2083
2079
|
sprintf(buf, "%sSize: %d\n", buf, (int) (m->size1*m->size2));
|
2084
2080
|
return rb_str_new2(buf);
|
data/ext/{min.c → gsl/min.c}
RENAMED
data/ext/{monte.c → gsl/monte.c}
RENAMED
@@ -9,8 +9,8 @@
|
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
11
|
|
12
|
-
#include "rb_gsl.h"
|
13
|
-
#include "rb_gsl_rng.h"
|
12
|
+
#include "include/rb_gsl.h"
|
13
|
+
#include "include/rb_gsl_rng.h"
|
14
14
|
#include <gsl/gsl_monte_plain.h>
|
15
15
|
#include <gsl/gsl_monte_miser.h>
|
16
16
|
#include <gsl/gsl_monte_vegas.h>
|
@@ -76,7 +76,7 @@ static VALUE rb_gsl_monte_function_set_f(int argc, VALUE *argv, VALUE obj)
|
|
76
76
|
rb_ary_store(ary, 1, ary2);
|
77
77
|
break;
|
78
78
|
}
|
79
|
-
if (rb_block_given_p()) rb_ary_store(ary, 0,
|
79
|
+
if (rb_block_given_p()) rb_ary_store(ary, 0, rb_block_proc());
|
80
80
|
return obj;
|
81
81
|
}
|
82
82
|
|
@@ -8,10 +8,10 @@
|
|
8
8
|
This library is distributed in the hope that it will be useful, but
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
|
-
|
12
|
-
#include "rb_gsl_fit.h"
|
13
|
-
#include "rb_gsl_function.h"
|
14
|
-
#include "rb_gsl_common.h"
|
11
|
+
|
12
|
+
#include "include/rb_gsl_fit.h"
|
13
|
+
#include "include/rb_gsl_function.h"
|
14
|
+
#include "include/rb_gsl_common.h"
|
15
15
|
|
16
16
|
#ifdef HAVE_NDLINEAR_GSL_MULTIFIT_NDLINEAR_H
|
17
17
|
#include <ndlinear/gsl_multifit_ndlinear.h>
|
@@ -9,9 +9,9 @@
|
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
11
|
|
12
|
-
#include "rb_gsl.h"
|
13
|
-
#include "rb_gsl_array.h"
|
14
|
-
#include "rb_gsl_function.h"
|
12
|
+
#include "include/rb_gsl.h"
|
13
|
+
#include "include/rb_gsl_array.h"
|
14
|
+
#include "include/rb_gsl_function.h"
|
15
15
|
#include <gsl/gsl_multimin.h>
|
16
16
|
|
17
17
|
#ifndef CHECK_MULTIMIN_FUNCTION
|
@@ -88,7 +88,7 @@ static VALUE rb_gsl_multimin_function_new(int argc, VALUE *argv, VALUE klass)
|
|
88
88
|
ary = rb_ary_new2(2);
|
89
89
|
/* (VALUE) F->params = ary;*/
|
90
90
|
F->params = (void *) ary;
|
91
|
-
if (rb_block_given_p()) rb_ary_store(ary, 0,
|
91
|
+
if (rb_block_given_p()) rb_ary_store(ary, 0, rb_block_proc());
|
92
92
|
else rb_ary_store(ary, 0, Qnil);
|
93
93
|
rb_ary_store(ary, 1, Qnil);
|
94
94
|
switch (argc) {
|
@@ -165,7 +165,7 @@ static VALUE rb_gsl_multimin_function_set_f(int argc, VALUE *argv, VALUE obj)
|
|
165
165
|
size_t i;
|
166
166
|
Data_Get_Struct(obj, gsl_multimin_function, F);
|
167
167
|
ary = (VALUE) F->params;
|
168
|
-
if (rb_block_given_p()) rb_ary_store(ary, 0,
|
168
|
+
if (rb_block_given_p()) rb_ary_store(ary, 0, rb_block_proc());
|
169
169
|
switch (argc) {
|
170
170
|
case 1:
|
171
171
|
set_function(0, argv, F);
|
@@ -8,10 +8,10 @@
|
|
8
8
|
This library is distributed in the hope that it will be useful, but
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
|
-
#include "rb_gsl.h"
|
12
|
-
#include "rb_gsl_common.h"
|
13
|
-
#include "rb_gsl_array.h"
|
14
|
-
#include "rb_gsl_function.h"
|
11
|
+
#include "include/rb_gsl.h"
|
12
|
+
#include "include/rb_gsl_common.h"
|
13
|
+
#include "include/rb_gsl_array.h"
|
14
|
+
#include "include/rb_gsl_function.h"
|
15
15
|
#include <gsl/gsl_multiroots.h>
|
16
16
|
|
17
17
|
#ifndef CHECK_MULTIROOT_FUNCTION
|
@@ -69,7 +69,7 @@ static VALUE rb_gsl_multiroot_function_new(int argc, VALUE *argv, VALUE klass)
|
|
69
69
|
ary = rb_ary_new2(2);
|
70
70
|
/* (VALUE) F->params = ary;*/
|
71
71
|
F->params = (void *) ary;
|
72
|
-
if (rb_block_given_p()) rb_ary_store(ary, 0,
|
72
|
+
if (rb_block_given_p()) rb_ary_store(ary, 0, rb_block_proc());
|
73
73
|
else rb_ary_store(ary, 0, Qnil);
|
74
74
|
rb_ary_store(ary, 1, Qnil);
|
75
75
|
switch (argc) {
|
@@ -154,7 +154,7 @@ static VALUE rb_gsl_multiroot_function_set_f(int argc, VALUE *argv, VALUE obj)
|
|
154
154
|
size_t i;
|
155
155
|
Data_Get_Struct(obj, gsl_multiroot_function, F);
|
156
156
|
ary = (VALUE) F->params;
|
157
|
-
if (rb_block_given_p()) rb_ary_store(ary, 0,
|
157
|
+
if (rb_block_given_p()) rb_ary_store(ary, 0, rb_block_proc());
|
158
158
|
switch (argc) {
|
159
159
|
case 1:
|
160
160
|
set_function(0, argv, F);
|
data/ext/{nmf.c → gsl/nmf.c}
RENAMED
File without changes
|
File without changes
|
@@ -9,10 +9,10 @@
|
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
11
|
|
12
|
-
#include "rb_gsl.h"
|
13
|
-
#include "rb_gsl_array.h"
|
14
|
-
#include "rb_gsl_function.h"
|
15
|
-
#include "rb_gsl_histogram.h"
|
12
|
+
#include "include/rb_gsl.h"
|
13
|
+
#include "include/rb_gsl_array.h"
|
14
|
+
#include "include/rb_gsl_function.h"
|
15
|
+
#include "include/rb_gsl_histogram.h"
|
16
16
|
#include <gsl/gsl_ntuple.h>
|
17
17
|
|
18
18
|
static VALUE cgsl_ntuple;
|
@@ -195,7 +195,7 @@ static VALUE rb_gsl_ntuple_select_fn_set_f(int argc, VALUE *argv, VALUE obj)
|
|
195
195
|
rb_ary_store(ary, 1, ary2);
|
196
196
|
break;
|
197
197
|
}
|
198
|
-
if (rb_block_given_p()) rb_ary_store(ary, 0,
|
198
|
+
if (rb_block_given_p()) rb_ary_store(ary, 0, rb_block_proc());
|
199
199
|
return obj;
|
200
200
|
}
|
201
201
|
|
@@ -314,7 +314,7 @@ static VALUE rb_gsl_ntuple_value_fn_set_f(int argc, VALUE *argv, VALUE obj)
|
|
314
314
|
rb_ary_store(ary, 1, ary2);
|
315
315
|
break;
|
316
316
|
}
|
317
|
-
if (rb_block_given_p()) rb_ary_store(ary, 0,
|
317
|
+
if (rb_block_given_p()) rb_ary_store(ary, 0, rb_block_proc());
|
318
318
|
return obj;
|
319
319
|
}
|
320
320
|
|
data/ext/{odeiv.c → gsl/odeiv.c}
RENAMED
@@ -8,10 +8,10 @@
|
|
8
8
|
This library is distributed in the hope that it will be useful, but
|
9
9
|
WITHOUT ANY WARRANTY.
|
10
10
|
*/
|
11
|
-
|
12
|
-
#include "rb_gsl_odeiv.h"
|
13
|
-
#include "rb_gsl_array.h"
|
14
|
-
#include "rb_gsl_function.h"
|
11
|
+
|
12
|
+
#include "include/rb_gsl_odeiv.h"
|
13
|
+
#include "include/rb_gsl_array.h"
|
14
|
+
#include "include/rb_gsl_function.h"
|
15
15
|
|
16
16
|
#ifndef CHECK_SYSTEM
|
17
17
|
#define CHECK_SYSTEM(x) if(CLASS_OF(x)!=cgsl_odeiv_system)\
|
@@ -450,11 +450,7 @@ static VALUE rb_gsl_odeiv_step_info(VALUE obj)
|
|
450
450
|
char buf[256];
|
451
451
|
Data_Get_Struct(obj, gsl_odeiv_step, s);
|
452
452
|
sprintf(buf, "Class: %s\n", rb_class2name(CLASS_OF(obj)));
|
453
|
-
#ifdef RUBY_1_9_LATER
|
454
453
|
sprintf(buf, "%sSuperClass: %s\n", buf, rb_class2name(RCLASS_SUPER(CLASS_OF(obj))));
|
455
|
-
#else
|
456
|
-
sprintf(buf, "%sSuperClass: %s\n", buf, rb_class2name(RCLASS(CLASS_OF(obj))->super));
|
457
|
-
#endif
|
458
454
|
sprintf(buf, "%sType: %s\n", buf, gsl_odeiv_step_name(s));
|
459
455
|
sprintf(buf, "%sDimension: %d\n", buf, (int) s->dimension);
|
460
456
|
return rb_str_new2(buf);
|