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
@@ -0,0 +1,331 @@
|
|
1
|
+
/*
|
2
|
+
const.c
|
3
|
+
Ruby/GSL: Ruby extension library for GSL (GNU Scientific Library)
|
4
|
+
(C) Copyright 2001-2006 by Yoshiki Tsunesada
|
5
|
+
|
6
|
+
Ruby/GSL is free software: you can redistribute it and/or modify it
|
7
|
+
under the terms of the GNU General Public License.
|
8
|
+
This library is distributed in the hope that it will be useful, but
|
9
|
+
WITHOUT ANY WARRANTY.
|
10
|
+
*/
|
11
|
+
|
12
|
+
#include "include/rb_gsl_const.h"
|
13
|
+
|
14
|
+
static void rb_gsl_const_mks(VALUE module);
|
15
|
+
static void rb_gsl_const_cgs(VALUE module);
|
16
|
+
static void rb_gsl_const_num(VALUE module);
|
17
|
+
void Init_gsl_const_additional(VALUE mmks, VALUE mcgs, VALUE mnum);
|
18
|
+
|
19
|
+
static void rb_gsl_const_mks(VALUE module)
|
20
|
+
{
|
21
|
+
rb_define_const(module, "SPEED_OF_LIGHT",
|
22
|
+
rb_float_new(GSL_CONST_MKSA_SPEED_OF_LIGHT));
|
23
|
+
rb_define_const(module, "GRAVITATIONAL_CONSTANT",
|
24
|
+
rb_float_new(GSL_CONST_MKSA_GRAVITATIONAL_CONSTANT));
|
25
|
+
rb_define_const(module, "PLANCKS_CONSTANT_H",
|
26
|
+
rb_float_new(GSL_CONST_MKSA_PLANCKS_CONSTANT_H));
|
27
|
+
rb_define_const(module, "PLANCKS_CONSTANT_HBAR",
|
28
|
+
rb_float_new(GSL_CONST_MKSA_PLANCKS_CONSTANT_HBAR));
|
29
|
+
rb_define_const(module, "VACUUM_PERMEABILITY",
|
30
|
+
rb_float_new(GSL_CONST_MKSA_VACUUM_PERMEABILITY));
|
31
|
+
rb_define_const(module, "VACUUM_PERMITTIVITY",
|
32
|
+
rb_float_new(GSL_CONST_MKSA_VACUUM_PERMITTIVITY));
|
33
|
+
rb_define_const(module, "ASTRONOMICAL_UNIT",
|
34
|
+
rb_float_new(GSL_CONST_MKSA_ASTRONOMICAL_UNIT));
|
35
|
+
rb_define_const(module, "LIGHT_YEAR", rb_float_new(GSL_CONST_MKSA_LIGHT_YEAR));
|
36
|
+
rb_define_const(module, "PARSEC", rb_float_new(GSL_CONST_MKSA_PARSEC));
|
37
|
+
rb_define_const(module, "GRAV_ACCEL", rb_float_new(GSL_CONST_MKSA_GRAV_ACCEL));
|
38
|
+
rb_define_const(module, "ELECTRON_VOLT",
|
39
|
+
rb_float_new(GSL_CONST_MKSA_ELECTRON_VOLT));
|
40
|
+
rb_define_const(module, "MASS_ELECTRON",
|
41
|
+
rb_float_new(GSL_CONST_MKSA_MASS_ELECTRON));
|
42
|
+
rb_define_const(module, "MASS_MUON", rb_float_new(GSL_CONST_MKSA_MASS_MUON));
|
43
|
+
rb_define_const(module, "MASS_PROTON", rb_float_new(GSL_CONST_MKSA_MASS_PROTON));
|
44
|
+
rb_define_const(module, "MASS_NEUTRON", rb_float_new(GSL_CONST_MKSA_MASS_NEUTRON));
|
45
|
+
rb_define_const(module, "RYDBERG", rb_float_new(GSL_CONST_MKSA_RYDBERG));
|
46
|
+
rb_define_const(module, "BOHR_MAGNETON",
|
47
|
+
rb_float_new(GSL_CONST_MKSA_BOHR_MAGNETON));
|
48
|
+
rb_define_const(module, "NUCLEAR_MAGNETON",
|
49
|
+
rb_float_new(GSL_CONST_MKSA_NUCLEAR_MAGNETON));
|
50
|
+
rb_define_const(module, "ELECTRON_MAGNETIC_MOMENT",
|
51
|
+
rb_float_new(GSL_CONST_MKSA_ELECTRON_MAGNETIC_MOMENT));
|
52
|
+
rb_define_const(module, "PROTON_MAGNETIC_MOMENT",
|
53
|
+
rb_float_new(GSL_CONST_MKSA_PROTON_MAGNETIC_MOMENT));
|
54
|
+
rb_define_const(module, "STANDARD_GAS_VOLUME",
|
55
|
+
rb_float_new(GSL_CONST_MKSA_STANDARD_GAS_VOLUME));
|
56
|
+
|
57
|
+
rb_define_const(module, "MINUTE", rb_float_new(GSL_CONST_MKSA_MINUTE));
|
58
|
+
rb_define_const(module, "HOUR", rb_float_new(GSL_CONST_MKSA_HOUR));
|
59
|
+
rb_define_const(module, "DAY", rb_float_new(GSL_CONST_MKSA_DAY));
|
60
|
+
rb_define_const(module, "WEEK", rb_float_new(GSL_CONST_MKSA_WEEK));
|
61
|
+
rb_define_const(module, "INCH", rb_float_new(GSL_CONST_MKSA_INCH));
|
62
|
+
rb_define_const(module, "FOOT", rb_float_new(GSL_CONST_MKSA_FOOT));
|
63
|
+
rb_define_const(module, "YARD", rb_float_new(GSL_CONST_MKSA_YARD));
|
64
|
+
rb_define_const(module, "MILE", rb_float_new(GSL_CONST_MKSA_MILE));
|
65
|
+
rb_define_const(module, "NAUTICAL_MILE",
|
66
|
+
rb_float_new(GSL_CONST_MKSA_NAUTICAL_MILE));
|
67
|
+
rb_define_const(module, "FATHOM", rb_float_new(GSL_CONST_MKSA_FATHOM));
|
68
|
+
rb_define_const(module, "MIL", rb_float_new(GSL_CONST_MKSA_MIL));
|
69
|
+
rb_define_const(module, "POINT", rb_float_new(GSL_CONST_MKSA_POINT));
|
70
|
+
rb_define_const(module, "TEXPOINT", rb_float_new(GSL_CONST_MKSA_TEXPOINT));
|
71
|
+
rb_define_const(module, "MICRON", rb_float_new(GSL_CONST_MKSA_MICRON));
|
72
|
+
rb_define_const(module, "ANGSTROM", rb_float_new(GSL_CONST_MKSA_ANGSTROM));
|
73
|
+
rb_define_const(module, "HECTARE", rb_float_new(GSL_CONST_MKSA_HECTARE));
|
74
|
+
rb_define_const(module, "ACRE", rb_float_new(GSL_CONST_MKSA_ACRE));
|
75
|
+
rb_define_const(module, "BARN", rb_float_new(GSL_CONST_MKSA_BARN));
|
76
|
+
rb_define_const(module, "LITER", rb_float_new(GSL_CONST_MKSA_LITER));
|
77
|
+
rb_define_const(module, "US_GALLON", rb_float_new(GSL_CONST_MKSA_US_GALLON));
|
78
|
+
rb_define_const(module, "QUART", rb_float_new(GSL_CONST_MKSA_QUART));
|
79
|
+
rb_define_const(module, "PINT", rb_float_new(GSL_CONST_MKSA_PINT));
|
80
|
+
rb_define_const(module, "CUP", rb_float_new(GSL_CONST_MKSA_CUP));
|
81
|
+
rb_define_const(module, "FLUID_OUNCE", rb_float_new(GSL_CONST_MKSA_FLUID_OUNCE));
|
82
|
+
rb_define_const(module, "TABLESPOON", rb_float_new(GSL_CONST_MKSA_TABLESPOON));
|
83
|
+
rb_define_const(module, "CANADIAN_GALLON",
|
84
|
+
rb_float_new(GSL_CONST_MKSA_CANADIAN_GALLON));
|
85
|
+
|
86
|
+
rb_define_const(module, "UK_GALLON", rb_float_new(GSL_CONST_MKSA_UK_GALLON));
|
87
|
+
rb_define_const(module, "KILOMETERS_PER_HOUR",
|
88
|
+
rb_float_new(GSL_CONST_MKSA_MILES_PER_HOUR));
|
89
|
+
rb_define_const(module, "MILES_PER_HOUR",
|
90
|
+
rb_float_new(GSL_CONST_MKSA_KILOMETERS_PER_HOUR));
|
91
|
+
rb_define_const(module, "KNOT", rb_float_new(GSL_CONST_MKSA_KNOT));
|
92
|
+
rb_define_const(module, "POUND_MASS", rb_float_new(GSL_CONST_MKSA_POUND_MASS));
|
93
|
+
rb_define_const(module, "POUND_OUNCE", rb_float_new(GSL_CONST_MKSA_OUNCE_MASS));
|
94
|
+
rb_define_const(module, "POUND_TON", rb_float_new(GSL_CONST_MKSA_TON));
|
95
|
+
rb_define_const(module, "POUND_METRIC_TON",
|
96
|
+
rb_float_new(GSL_CONST_MKSA_METRIC_TON));
|
97
|
+
rb_define_const(module, "POUND_UK_TON", rb_float_new(GSL_CONST_MKSA_UK_TON));
|
98
|
+
rb_define_const(module, "POUND_TROY_OUNCE",
|
99
|
+
rb_float_new(GSL_CONST_MKSA_TROY_OUNCE));
|
100
|
+
rb_define_const(module, "CARAT", rb_float_new(GSL_CONST_MKSA_CARAT));
|
101
|
+
rb_define_const(module, "UNIFIED_ATOMIC_MASS",
|
102
|
+
rb_float_new(GSL_CONST_MKSA_UNIFIED_ATOMIC_MASS));
|
103
|
+
rb_define_const(module, "GRAM_FORCE", rb_float_new(GSL_CONST_MKSA_GRAM_FORCE));
|
104
|
+
rb_define_const(module, "POUND_FORCE", rb_float_new(GSL_CONST_MKSA_POUND_FORCE));
|
105
|
+
rb_define_const(module, "KILOPOUND_FORCE",
|
106
|
+
rb_float_new(GSL_CONST_MKSA_KILOPOUND_FORCE));
|
107
|
+
rb_define_const(module, "POUNDAL", rb_float_new(GSL_CONST_MKSA_POUNDAL));
|
108
|
+
rb_define_const(module, "CALORIE", rb_float_new(GSL_CONST_MKSA_CALORIE));
|
109
|
+
rb_define_const(module, "BTU", rb_float_new(GSL_CONST_MKSA_BTU));
|
110
|
+
rb_define_const(module, "THERM", rb_float_new(GSL_CONST_MKSA_THERM));
|
111
|
+
rb_define_const(module, "HORSEPOWER", rb_float_new(GSL_CONST_MKSA_HORSEPOWER));
|
112
|
+
rb_define_const(module, "BAR", rb_float_new(GSL_CONST_MKSA_BAR));
|
113
|
+
rb_define_const(module, "STD_ATMOSPHERE",
|
114
|
+
rb_float_new(GSL_CONST_MKSA_STD_ATMOSPHERE));
|
115
|
+
rb_define_const(module, "TORR", rb_float_new(GSL_CONST_MKSA_TORR));
|
116
|
+
rb_define_const(module, "METER_OF_MERCURY",
|
117
|
+
rb_float_new(GSL_CONST_MKSA_METER_OF_MERCURY));
|
118
|
+
rb_define_const(module, "INCH_OF_MERCURY",
|
119
|
+
rb_float_new(GSL_CONST_MKSA_INCH_OF_MERCURY));
|
120
|
+
rb_define_const(module, "INCH_OF_WATER",
|
121
|
+
rb_float_new(GSL_CONST_MKSA_INCH_OF_WATER));
|
122
|
+
rb_define_const(module, "PSI", rb_float_new(GSL_CONST_MKSA_PSI));
|
123
|
+
rb_define_const(module, "POISE", rb_float_new(GSL_CONST_MKSA_POISE));
|
124
|
+
rb_define_const(module, "STOKES", rb_float_new(GSL_CONST_MKSA_STOKES));
|
125
|
+
rb_define_const(module, "FARADAY", rb_float_new(GSL_CONST_MKSA_FARADAY));
|
126
|
+
rb_define_const(module, "ELECTRON_CHARGE",
|
127
|
+
rb_float_new(GSL_CONST_MKSA_ELECTRON_CHARGE));
|
128
|
+
rb_define_const(module, "GAUSS", rb_float_new(GSL_CONST_MKSA_GAUSS));
|
129
|
+
rb_define_const(module, "STILB", rb_float_new(GSL_CONST_MKSA_STILB));
|
130
|
+
rb_define_const(module, "LUMEN", rb_float_new(GSL_CONST_MKSA_LUMEN));
|
131
|
+
rb_define_const(module, "LUX", rb_float_new(GSL_CONST_MKSA_LUX));
|
132
|
+
rb_define_const(module, "PHOT", rb_float_new(GSL_CONST_MKSA_PHOT));
|
133
|
+
rb_define_const(module, "FOOTCANDLE", rb_float_new(GSL_CONST_MKSA_FOOTCANDLE));
|
134
|
+
rb_define_const(module, "LAMBERT", rb_float_new(GSL_CONST_MKSA_LAMBERT));
|
135
|
+
rb_define_const(module, "CURIE", rb_float_new(GSL_CONST_MKSA_CURIE));
|
136
|
+
rb_define_const(module, "ROENTGEN", rb_float_new(GSL_CONST_MKSA_ROENTGEN));
|
137
|
+
rb_define_const(module, "RAD", rb_float_new(GSL_CONST_MKSA_RAD));
|
138
|
+
rb_define_const(module, "SOLAR_MASS", rb_float_new(GSL_CONST_MKSA_SOLAR_MASS));
|
139
|
+
|
140
|
+
rb_define_const(module, "BOLTZMANN", rb_float_new(GSL_CONST_MKSA_BOLTZMANN));
|
141
|
+
rb_define_const(module, "MOLAR_GAS", rb_float_new(GSL_CONST_MKSA_MOLAR_GAS));
|
142
|
+
|
143
|
+
rb_define_const(module, "BOHR_RADIUS", rb_float_new(GSL_CONST_MKSA_BOHR_RADIUS));
|
144
|
+
rb_define_const(module, "NEWTON", rb_float_new(GSL_CONST_MKSA_NEWTON));
|
145
|
+
rb_define_const(module, "DYNE", rb_float_new(GSL_CONST_MKSA_DYNE));
|
146
|
+
rb_define_const(module, "JOULE", rb_float_new(GSL_CONST_MKSA_JOULE));
|
147
|
+
rb_define_const(module, "ERG", rb_float_new(GSL_CONST_MKSA_ERG));
|
148
|
+
|
149
|
+
rb_define_const(module, "STEFAN_BOLTZMANN_CONSTANT",
|
150
|
+
rb_float_new(GSL_CONST_MKSA_STEFAN_BOLTZMANN_CONSTANT));
|
151
|
+
rb_define_const(module, "THOMSON_CROSS_SECTION",
|
152
|
+
rb_float_new(GSL_CONST_MKSA_THOMSON_CROSS_SECTION));
|
153
|
+
rb_define_const(module, "DEBYE", rb_float_new(GSL_CONST_MKSA_DEBYE));
|
154
|
+
}
|
155
|
+
|
156
|
+
|
157
|
+
static void rb_gsl_const_cgs(VALUE module)
|
158
|
+
{
|
159
|
+
rb_define_const(module, "SPEED_OF_LIGHT",
|
160
|
+
rb_float_new(GSL_CONST_CGSM_SPEED_OF_LIGHT));
|
161
|
+
rb_define_const(module, "GRAVITATIONAL_CONSTANT",
|
162
|
+
rb_float_new(GSL_CONST_CGSM_GRAVITATIONAL_CONSTANT));
|
163
|
+
rb_define_const(module, "PLANCKS_CONSTANT_H",
|
164
|
+
rb_float_new(GSL_CONST_CGSM_PLANCKS_CONSTANT_H));
|
165
|
+
rb_define_const(module, "PLANCKS_CONSTANT_HBAR",
|
166
|
+
rb_float_new(GSL_CONST_CGSM_PLANCKS_CONSTANT_HBAR));
|
167
|
+
rb_define_const(module, "ASTRONOMICAL_UNIT",
|
168
|
+
rb_float_new(GSL_CONST_CGSM_ASTRONOMICAL_UNIT));
|
169
|
+
rb_define_const(module, "LIGHT_YEAR",
|
170
|
+
rb_float_new(GSL_CONST_CGSM_LIGHT_YEAR));
|
171
|
+
rb_define_const(module, "PARSEC",
|
172
|
+
rb_float_new(GSL_CONST_CGSM_PARSEC));
|
173
|
+
rb_define_const(module, "GRAV_ACCEL",
|
174
|
+
rb_float_new(GSL_CONST_CGSM_GRAV_ACCEL));
|
175
|
+
rb_define_const(module, "ELECTRON_VOLT",
|
176
|
+
rb_float_new(GSL_CONST_CGSM_ELECTRON_VOLT));
|
177
|
+
rb_define_const(module, "MASS_ELECTRON",
|
178
|
+
rb_float_new(GSL_CONST_CGSM_MASS_ELECTRON));
|
179
|
+
rb_define_const(module, "MASS_MUON", rb_float_new(GSL_CONST_CGSM_MASS_MUON));
|
180
|
+
rb_define_const(module, "MASS_PROTON", rb_float_new(GSL_CONST_CGSM_MASS_PROTON));
|
181
|
+
rb_define_const(module, "MASS_NEUTRON", rb_float_new(GSL_CONST_CGSM_MASS_NEUTRON));
|
182
|
+
rb_define_const(module, "RYDBERG", rb_float_new(GSL_CONST_CGSM_RYDBERG));
|
183
|
+
|
184
|
+
rb_define_const(module, "BOHR_MAGNETON",
|
185
|
+
rb_float_new(GSL_CONST_CGSM_BOHR_MAGNETON));
|
186
|
+
|
187
|
+
rb_define_const(module, "NUCLEAR_MAGNETON",
|
188
|
+
rb_float_new(GSL_CONST_CGSM_NUCLEAR_MAGNETON));
|
189
|
+
rb_define_const(module, "ELECTRON_MAGNETIC_MOMENT",
|
190
|
+
rb_float_new(GSL_CONST_CGSM_ELECTRON_MAGNETIC_MOMENT));
|
191
|
+
rb_define_const(module, "PROTON_MAGNETIC_MOMENT",
|
192
|
+
rb_float_new(GSL_CONST_CGSM_PROTON_MAGNETIC_MOMENT));
|
193
|
+
rb_define_const(module, "STANDARD_GAS_VOLUME",
|
194
|
+
rb_float_new(GSL_CONST_CGSM_STANDARD_GAS_VOLUME));
|
195
|
+
|
196
|
+
rb_define_const(module, "MINUTE", rb_float_new(GSL_CONST_CGSM_MINUTE));
|
197
|
+
rb_define_const(module, "HOUR", rb_float_new(GSL_CONST_CGSM_HOUR));
|
198
|
+
rb_define_const(module, "DAY", rb_float_new(GSL_CONST_CGSM_DAY));
|
199
|
+
rb_define_const(module, "WEEK", rb_float_new(GSL_CONST_CGSM_WEEK));
|
200
|
+
rb_define_const(module, "INCH", rb_float_new(GSL_CONST_CGSM_INCH));
|
201
|
+
rb_define_const(module, "FOOT", rb_float_new(GSL_CONST_CGSM_FOOT));
|
202
|
+
rb_define_const(module, "YARD", rb_float_new(GSL_CONST_CGSM_YARD));
|
203
|
+
rb_define_const(module, "MILE", rb_float_new(GSL_CONST_CGSM_MILE));
|
204
|
+
rb_define_const(module, "NAUTICAL_MILE",
|
205
|
+
rb_float_new(GSL_CONST_CGSM_NAUTICAL_MILE));
|
206
|
+
rb_define_const(module, "FATHOM", rb_float_new(GSL_CONST_CGSM_FATHOM));
|
207
|
+
rb_define_const(module, "MIL", rb_float_new(GSL_CONST_CGSM_MIL));
|
208
|
+
rb_define_const(module, "POINT", rb_float_new(GSL_CONST_CGSM_POINT));
|
209
|
+
rb_define_const(module, "TEXPOINT", rb_float_new(GSL_CONST_CGSM_TEXPOINT));
|
210
|
+
rb_define_const(module, "MICRON", rb_float_new(GSL_CONST_CGSM_MICRON));
|
211
|
+
rb_define_const(module, "ANGSTROM", rb_float_new(GSL_CONST_CGSM_ANGSTROM));
|
212
|
+
rb_define_const(module, "HECTARE", rb_float_new(GSL_CONST_CGSM_HECTARE));
|
213
|
+
rb_define_const(module, "ACRE", rb_float_new(GSL_CONST_CGSM_ACRE));
|
214
|
+
rb_define_const(module, "BARN", rb_float_new(GSL_CONST_CGSM_BARN));
|
215
|
+
rb_define_const(module, "LITER", rb_float_new(GSL_CONST_CGSM_LITER));
|
216
|
+
rb_define_const(module, "US_GALLON", rb_float_new(GSL_CONST_CGSM_US_GALLON));
|
217
|
+
rb_define_const(module, "QUART", rb_float_new(GSL_CONST_CGSM_QUART));
|
218
|
+
rb_define_const(module, "PINT", rb_float_new(GSL_CONST_CGSM_PINT));
|
219
|
+
rb_define_const(module, "CUP", rb_float_new(GSL_CONST_CGSM_CUP));
|
220
|
+
rb_define_const(module, "FLUID_OUNCE", rb_float_new(GSL_CONST_CGSM_FLUID_OUNCE));
|
221
|
+
rb_define_const(module, "TABLESPOON", rb_float_new(GSL_CONST_CGSM_TABLESPOON));
|
222
|
+
rb_define_const(module, "CANADIAN_GALLON",
|
223
|
+
rb_float_new(GSL_CONST_CGSM_CANADIAN_GALLON));
|
224
|
+
|
225
|
+
rb_define_const(module, "UK_GALLON", rb_float_new(GSL_CONST_CGSM_UK_GALLON));
|
226
|
+
rb_define_const(module, "KILOMETERS_PER_HOUR",
|
227
|
+
rb_float_new(GSL_CONST_CGSM_MILES_PER_HOUR));
|
228
|
+
rb_define_const(module, "MILES_PER_HOUR",
|
229
|
+
rb_float_new(GSL_CONST_CGSM_KILOMETERS_PER_HOUR));
|
230
|
+
rb_define_const(module, "KNOT", rb_float_new(GSL_CONST_CGSM_KNOT));
|
231
|
+
rb_define_const(module, "POUND_MASS", rb_float_new(GSL_CONST_CGSM_POUND_MASS));
|
232
|
+
rb_define_const(module, "POUND_OUNCE", rb_float_new(GSL_CONST_CGSM_OUNCE_MASS));
|
233
|
+
rb_define_const(module, "POUND_TON", rb_float_new(GSL_CONST_CGSM_TON));
|
234
|
+
rb_define_const(module, "POUND_METRIC_TON",
|
235
|
+
rb_float_new(GSL_CONST_CGSM_METRIC_TON));
|
236
|
+
rb_define_const(module, "POUND_UK_TON", rb_float_new(GSL_CONST_CGSM_UK_TON));
|
237
|
+
rb_define_const(module, "POUND_TROY_OUNCE",
|
238
|
+
rb_float_new(GSL_CONST_CGSM_TROY_OUNCE));
|
239
|
+
rb_define_const(module, "CARAT", rb_float_new(GSL_CONST_CGSM_CARAT));
|
240
|
+
rb_define_const(module, "UNIFIED_ATOMIC_MASS",
|
241
|
+
rb_float_new(GSL_CONST_CGSM_UNIFIED_ATOMIC_MASS));
|
242
|
+
rb_define_const(module, "GRAM_FORCE", rb_float_new(GSL_CONST_CGSM_GRAM_FORCE));
|
243
|
+
rb_define_const(module, "POUND_FORCE", rb_float_new(GSL_CONST_CGSM_POUND_FORCE));
|
244
|
+
rb_define_const(module, "KILOPOUND_FORCE",
|
245
|
+
rb_float_new(GSL_CONST_CGSM_KILOPOUND_FORCE));
|
246
|
+
rb_define_const(module, "POUNDAL", rb_float_new(GSL_CONST_CGSM_POUNDAL));
|
247
|
+
rb_define_const(module, "CALORIE", rb_float_new(GSL_CONST_CGSM_CALORIE));
|
248
|
+
rb_define_const(module, "BTU", rb_float_new(GSL_CONST_CGSM_BTU));
|
249
|
+
rb_define_const(module, "THERM", rb_float_new(GSL_CONST_CGSM_THERM));
|
250
|
+
rb_define_const(module, "HORSEPOWER", rb_float_new(GSL_CONST_CGSM_HORSEPOWER));
|
251
|
+
rb_define_const(module, "BAR", rb_float_new(GSL_CONST_CGSM_BAR));
|
252
|
+
rb_define_const(module, "STD_ATMOSPHERE",
|
253
|
+
rb_float_new(GSL_CONST_CGSM_STD_ATMOSPHERE));
|
254
|
+
rb_define_const(module, "TORR", rb_float_new(GSL_CONST_CGSM_TORR));
|
255
|
+
rb_define_const(module, "METER_OF_MERCURY",
|
256
|
+
rb_float_new(GSL_CONST_CGSM_METER_OF_MERCURY));
|
257
|
+
rb_define_const(module, "INCH_OF_MERCURY",
|
258
|
+
rb_float_new(GSL_CONST_CGSM_INCH_OF_MERCURY));
|
259
|
+
rb_define_const(module, "INCH_OF_WATER",
|
260
|
+
rb_float_new(GSL_CONST_CGSM_INCH_OF_WATER));
|
261
|
+
rb_define_const(module, "PSI", rb_float_new(GSL_CONST_CGSM_PSI));
|
262
|
+
rb_define_const(module, "POISE", rb_float_new(GSL_CONST_CGSM_POISE));
|
263
|
+
rb_define_const(module, "STOKES", rb_float_new(GSL_CONST_CGSM_STOKES));
|
264
|
+
rb_define_const(module, "FARADAY", rb_float_new(GSL_CONST_CGSM_FARADAY));
|
265
|
+
rb_define_const(module, "ELECTRON_CHARGE",
|
266
|
+
rb_float_new(GSL_CONST_CGSM_ELECTRON_CHARGE));
|
267
|
+
rb_define_const(module, "ELECTRON_CHARGE_ESU",
|
268
|
+
rb_float_new(GSL_CONST_CGSM_ELECTRON_CHARGE*GSL_CONST_CGSM_SPEED_OF_LIGHT));
|
269
|
+
rb_define_const(module, "STILB", rb_float_new(GSL_CONST_CGSM_STILB));
|
270
|
+
rb_define_const(module, "LUMEN", rb_float_new(GSL_CONST_CGSM_LUMEN));
|
271
|
+
rb_define_const(module, "LUX", rb_float_new(GSL_CONST_CGSM_LUX));
|
272
|
+
rb_define_const(module, "PHOT", rb_float_new(GSL_CONST_CGSM_PHOT));
|
273
|
+
rb_define_const(module, "FOOTCANDLE", rb_float_new(GSL_CONST_CGSM_FOOTCANDLE));
|
274
|
+
rb_define_const(module, "LAMBERT", rb_float_new(GSL_CONST_CGSM_LAMBERT));
|
275
|
+
rb_define_const(module, "CURIE", rb_float_new(GSL_CONST_CGSM_CURIE));
|
276
|
+
rb_define_const(module, "ROENTGEN", rb_float_new(GSL_CONST_CGSM_ROENTGEN));
|
277
|
+
rb_define_const(module, "RAD", rb_float_new(GSL_CONST_CGSM_RAD));
|
278
|
+
rb_define_const(module, "SOLAR_MASS", rb_float_new(GSL_CONST_CGSM_SOLAR_MASS));
|
279
|
+
|
280
|
+
rb_define_const(module, "BOLTZMANN", rb_float_new(GSL_CONST_CGSM_BOLTZMANN));
|
281
|
+
rb_define_const(module, "MOLAR_GAS", rb_float_new(GSL_CONST_CGSM_MOLAR_GAS));
|
282
|
+
|
283
|
+
rb_define_const(module, "BOHR_RADIUS", rb_float_new(GSL_CONST_CGSM_BOHR_RADIUS));
|
284
|
+
rb_define_const(module, "NEWTON", rb_float_new(GSL_CONST_CGSM_NEWTON));
|
285
|
+
rb_define_const(module, "DYNE", rb_float_new(GSL_CONST_CGSM_DYNE));
|
286
|
+
rb_define_const(module, "JOULE", rb_float_new(GSL_CONST_CGSM_JOULE));
|
287
|
+
rb_define_const(module, "ERG", rb_float_new(GSL_CONST_CGSM_ERG));
|
288
|
+
|
289
|
+
rb_define_const(module, "STEFAN_BOLTZMANN_CONSTANT",
|
290
|
+
rb_float_new(GSL_CONST_CGSM_STEFAN_BOLTZMANN_CONSTANT));
|
291
|
+
rb_define_const(module, "THOMSON_CROSS_SECTION",
|
292
|
+
rb_float_new(GSL_CONST_CGSM_THOMSON_CROSS_SECTION));
|
293
|
+
}
|
294
|
+
|
295
|
+
static void rb_gsl_const_num(VALUE module)
|
296
|
+
{
|
297
|
+
rb_define_const(module, "AVOGADRO", rb_float_new(GSL_CONST_NUM_AVOGADRO));
|
298
|
+
rb_define_const(module, "FINE_STRUCTURE",
|
299
|
+
rb_float_new(GSL_CONST_NUM_FINE_STRUCTURE));
|
300
|
+
rb_define_const(module, "YOTTA", rb_float_new(GSL_CONST_NUM_YOTTA));
|
301
|
+
rb_define_const(module, "ZETTA", rb_float_new(GSL_CONST_NUM_ZETTA));
|
302
|
+
rb_define_const(module, "EXA", rb_float_new(GSL_CONST_NUM_EXA));
|
303
|
+
rb_define_const(module, "PETA", rb_float_new(GSL_CONST_NUM_PETA));
|
304
|
+
rb_define_const(module, "TERA", rb_float_new(GSL_CONST_NUM_TERA));
|
305
|
+
rb_define_const(module, "GIGA", rb_float_new(GSL_CONST_NUM_GIGA));
|
306
|
+
rb_define_const(module, "MEGA", rb_float_new(GSL_CONST_NUM_MEGA));
|
307
|
+
rb_define_const(module, "KILO", rb_float_new(GSL_CONST_NUM_KILO));
|
308
|
+
rb_define_const(module, "MILLI", rb_float_new(GSL_CONST_NUM_MILLI));
|
309
|
+
rb_define_const(module, "MICRO", rb_float_new(GSL_CONST_NUM_MICRO));
|
310
|
+
rb_define_const(module, "NANO", rb_float_new(GSL_CONST_NUM_NANO));
|
311
|
+
rb_define_const(module, "PICO", rb_float_new(GSL_CONST_NUM_PICO));
|
312
|
+
rb_define_const(module, "FEMTO", rb_float_new(GSL_CONST_NUM_FEMTO));
|
313
|
+
rb_define_const(module, "ATTO", rb_float_new(GSL_CONST_NUM_ATTO));
|
314
|
+
rb_define_const(module, "ZEPTO", rb_float_new(GSL_CONST_NUM_ZEPTO));
|
315
|
+
rb_define_const(module, "YOCTO", rb_float_new(GSL_CONST_NUM_YOCTO));
|
316
|
+
}
|
317
|
+
|
318
|
+
void Init_gsl_const(VALUE module)
|
319
|
+
{
|
320
|
+
VALUE mgsl_const;
|
321
|
+
VALUE mgsl_const_mks, mgsl_const_cgs, mgsl_const_num;
|
322
|
+
|
323
|
+
mgsl_const = rb_define_module_under(module, "CONST");
|
324
|
+
mgsl_const_mks = rb_define_module_under(mgsl_const, "MKSA");
|
325
|
+
rb_gsl_const_mks(mgsl_const_mks);
|
326
|
+
mgsl_const_cgs = rb_define_module_under(mgsl_const, "CGSM");
|
327
|
+
rb_gsl_const_cgs(mgsl_const_cgs);
|
328
|
+
mgsl_const_num = rb_define_module_under(mgsl_const, "NUM");
|
329
|
+
rb_gsl_const_num(mgsl_const_num);
|
330
|
+
Init_gsl_const_additional(mgsl_const_mks, mgsl_const_cgs, mgsl_const_num);
|
331
|
+
}
|
@@ -11,13 +11,6 @@
|
|
11
11
|
|
12
12
|
#include "include/rb_gsl_const.h"
|
13
13
|
|
14
|
-
#ifndef GSL_1_4_9_LATER
|
15
|
-
#define MKS_STEFAN_BOLTZMANN_CONSTANT (5.6703993443638e-08)
|
16
|
-
#define MKS_THOMSON_CROSS_SECTION (6.65245852869236e-29)
|
17
|
-
#define CGS_STEFAN_BOLTZMANN_CONSTANT (5.6703993443638e-05)
|
18
|
-
#define CGS_THOMSON_CROSS_SECTION (6.65245852869236e-25)
|
19
|
-
#endif
|
20
|
-
|
21
14
|
#define MKS_CLASSICAL_ELECTRON_RADIUS (2.81794028310825e-15)
|
22
15
|
#define MKS_RADIATION_DENSITY_CONSTANT (7.56576650685962e-16)
|
23
16
|
#define MKS_RADIATION_NUMBER_DENSITY_CONSTANT (20.2869161066108e-6)
|
@@ -43,47 +36,33 @@ static void rb_gsl_const_num(VALUE module);
|
|
43
36
|
static void rb_gsl_const_mks(VALUE module)
|
44
37
|
{
|
45
38
|
rb_define_const(module, "RADIATION_DENSITY_CONSTANT",
|
46
|
-
|
47
|
-
rb_define_const(module, "RADIATION_NUMBER_DENSITY_CONSTANT",
|
48
|
-
|
39
|
+
rb_float_new(MKS_RADIATION_DENSITY_CONSTANT));
|
40
|
+
rb_define_const(module, "RADIATION_NUMBER_DENSITY_CONSTANT",
|
41
|
+
rb_float_new(MKS_RADIATION_NUMBER_DENSITY_CONSTANT));
|
49
42
|
rb_define_const(module, "CLASSICAL_ELECTRON_RADIUS",
|
50
|
-
|
43
|
+
rb_float_new(MKS_CLASSICAL_ELECTRON_RADIUS));
|
51
44
|
rb_define_const(module, "SOLAR_TIME", rb_float_new(MKS_SOLAR_TIME));
|
52
45
|
rb_define_const(module, "SOLAR_GM", rb_float_new(MKS_SOLAR_GM));
|
53
46
|
|
54
47
|
rb_define_const(module, "PLANCK_MASS", rb_float_new(MKS_PLANCK_MASS));
|
55
48
|
rb_define_const(module, "PLANCK_LENGTH", rb_float_new(MKS_PLANCK_LENGTH));
|
56
49
|
rb_define_const(module, "PLANCK_TIME", rb_float_new(MKS_PLANCK_TIME));
|
57
|
-
|
58
|
-
#ifndef GSL_1_4_9_LATER
|
59
|
-
rb_define_const(module, "STEFAN_BOLTZMANN_CONSTANT",
|
60
|
-
rb_float_new(MKS_STEFAN_BOLTZMANN_CONSTANT));
|
61
|
-
rb_define_const(module, "THOMSON_CROSS_SECTION",
|
62
|
-
rb_float_new(MKS_THOMSON_CROSS_SECTION));
|
63
|
-
#endif
|
64
50
|
}
|
65
51
|
|
66
52
|
static void rb_gsl_const_cgs(VALUE module)
|
67
53
|
{
|
68
|
-
rb_define_const(module, "RADIATION_DENSITY_CONSTANT",
|
69
|
-
|
70
|
-
rb_define_const(module, "RADIATION_NUMBER_DENSITY_CONSTANT",
|
71
|
-
|
72
|
-
rb_define_const(module, "CLASSICAL_ELECTRON_RADIUS",
|
73
|
-
|
54
|
+
rb_define_const(module, "RADIATION_DENSITY_CONSTANT",
|
55
|
+
rb_float_new(CGS_RADIATION_DENSITY_CONSTANT));
|
56
|
+
rb_define_const(module, "RADIATION_NUMBER_DENSITY_CONSTANT",
|
57
|
+
rb_float_new(CGS_RADIATION_NUMBER_DENSITY_CONSTANT));
|
58
|
+
rb_define_const(module, "CLASSICAL_ELECTRON_RADIUS",
|
59
|
+
rb_float_new(CGS_CLASSICAL_ELECTRON_RADIUS));
|
74
60
|
rb_define_const(module, "SOLAR_TIME", rb_float_new(CGS_SOLAR_TIME));
|
75
61
|
rb_define_const(module, "SOLAR_GM", rb_float_new(CGS_SOLAR_GM));
|
76
62
|
|
77
63
|
rb_define_const(module, "PLANCK_MASS", rb_float_new(CGS_PLANCK_MASS));
|
78
64
|
rb_define_const(module, "PLANCK_LENGTH", rb_float_new(CGS_PLANCK_LENGTH));
|
79
65
|
rb_define_const(module, "PLANCK_TIME", rb_float_new(CGS_PLANCK_TIME));
|
80
|
-
|
81
|
-
#ifndef GSL_1_4_9_LATER
|
82
|
-
rb_define_const(module, "STEFAN_BOLTZMANN_CONSTANT",
|
83
|
-
rb_float_new(CGS_STEFAN_BOLTZMANN_CONSTANT));
|
84
|
-
rb_define_const(module, "THOMSON_CROSS_SECTION",
|
85
|
-
rb_float_new(CGS_THOMSON_CROSS_SECTION));
|
86
|
-
#endif
|
87
66
|
}
|
88
67
|
|
89
68
|
static void rb_gsl_const_num(VALUE module)
|
@@ -102,8 +81,8 @@ void Init_gsl_const_additional(VALUE mmks, VALUE mcgs, VALUE mnum)
|
|
102
81
|
#undef MKS_STEFAN_BOLTZMANN_CONSTANT
|
103
82
|
#undef MKS_RADIATION_DENSITY_CONSTANT
|
104
83
|
#undef MKS_RADIATION_NUMBER_DENSITY_CONSTANT
|
105
|
-
#undef CGS_CLASSICAL_ELECTRON_RADIUS
|
106
|
-
#undef CGS_STEFAN_BOLTZMANN_CONSTANT
|
84
|
+
#undef CGS_CLASSICAL_ELECTRON_RADIUS
|
85
|
+
#undef CGS_STEFAN_BOLTZMANN_CONSTANT
|
107
86
|
#undef CGS_RADIATION_DENSITY_CONSTANT
|
108
87
|
#undef CGS_RADIATION_NUMBER_DENSITY_CONSTANT
|
109
88
|
#undef CGS_THOMSON_CROSS_SECTION
|
@@ -0,0 +1,283 @@
|
|
1
|
+
#ifdef HAVE_GSL_GSL_CQP_H
|
2
|
+
|
3
|
+
#include "include/rb_gsl.h"
|
4
|
+
#include "gsl/gsl_cqp.h"
|
5
|
+
|
6
|
+
static const gsl_cqpminimizer_type* type_by_string(VALUE t);
|
7
|
+
static const gsl_cqpminimizer_type* get_type(VALUE t)
|
8
|
+
{
|
9
|
+
|
10
|
+
switch (TYPE(t)) {
|
11
|
+
case T_STRING:
|
12
|
+
return type_by_string(t);
|
13
|
+
break;
|
14
|
+
default:
|
15
|
+
rb_raise(rb_eTypeError, "Wrong argument type %s.", rb_class2name(CLASS_OF(t)));
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
static const gsl_cqpminimizer_type* type_by_string(VALUE t)
|
20
|
+
{
|
21
|
+
char *name;
|
22
|
+
name = STR2CSTR(t);
|
23
|
+
if (strcmp(name, "mg_pdip") == 0) {
|
24
|
+
return gsl_cqpminimizer_mg_pdip;
|
25
|
+
} else {
|
26
|
+
rb_raise(rb_eRuntimeError, "Unknown minimizer type %s.", name);
|
27
|
+
}
|
28
|
+
return NULL; /* never reach here */
|
29
|
+
}
|
30
|
+
|
31
|
+
static VALUE rb_cqpminimizer_alloc(VALUE klass, VALUE t, VALUE n, VALUE me, VALUE mi)
|
32
|
+
{
|
33
|
+
gsl_cqpminimizer *m;
|
34
|
+
m = gsl_cqpminimizer_alloc(get_type(t), (size_t) FIX2INT(n), (size_t) FIX2INT(me), (size_t) FIX2INT(mi));
|
35
|
+
return Data_Wrap_Struct(klass, 0, gsl_cqpminimizer_free, m);
|
36
|
+
}
|
37
|
+
|
38
|
+
static VALUE rb_cqpminimizer_set(VALUE obj, VALUE data)
|
39
|
+
{
|
40
|
+
gsl_cqpminimizer *m;
|
41
|
+
gsl_cqp_data *d;
|
42
|
+
Data_Get_Struct(obj, gsl_cqpminimizer, m);
|
43
|
+
Data_Get_Struct(data, gsl_cqp_data, d);
|
44
|
+
gsl_cqpminimizer_set(m, d);
|
45
|
+
return Qtrue;
|
46
|
+
}
|
47
|
+
|
48
|
+
static VALUE rb_cqpminimizer_name(VALUE obj)
|
49
|
+
{
|
50
|
+
gsl_cqpminimizer *m;
|
51
|
+
Data_Get_Struct(obj, gsl_cqpminimizer, m);
|
52
|
+
return rb_str_new2(gsl_cqpminimizer_name(m));
|
53
|
+
}
|
54
|
+
|
55
|
+
static VALUE rb_cqpminimizer_iterate(VALUE obj)
|
56
|
+
{
|
57
|
+
gsl_cqpminimizer *m;
|
58
|
+
Data_Get_Struct(obj, gsl_cqpminimizer, m);
|
59
|
+
return INT2FIX(gsl_cqpminimizer_iterate(m));
|
60
|
+
}
|
61
|
+
|
62
|
+
static VALUE rb_cqpminimizer_x(VALUE obj)
|
63
|
+
{
|
64
|
+
gsl_cqpminimizer *m;
|
65
|
+
Data_Get_Struct(obj, gsl_cqpminimizer, m);
|
66
|
+
return Data_Wrap_Struct(cgsl_vector_view, 0, NULL, gsl_cqpminimizer_x(m));
|
67
|
+
}
|
68
|
+
|
69
|
+
static VALUE rb_cqpminimizer_lm_eq(VALUE obj)
|
70
|
+
{
|
71
|
+
gsl_cqpminimizer *m;
|
72
|
+
Data_Get_Struct(obj, gsl_cqpminimizer, m);
|
73
|
+
return Data_Wrap_Struct(cgsl_vector_view, 0, NULL, gsl_cqpminimizer_lm_eq(m));
|
74
|
+
}
|
75
|
+
static VALUE rb_cqpminimizer_lm_ineq(VALUE obj)
|
76
|
+
{
|
77
|
+
gsl_cqpminimizer *m;
|
78
|
+
Data_Get_Struct(obj, gsl_cqpminimizer, m);
|
79
|
+
return Data_Wrap_Struct(cgsl_vector_view, 0, NULL, gsl_cqpminimizer_lm_ineq(m));
|
80
|
+
}
|
81
|
+
static VALUE rb_cqpminimizer_f(VALUE obj)
|
82
|
+
{
|
83
|
+
gsl_cqpminimizer *m;
|
84
|
+
Data_Get_Struct(obj, gsl_cqpminimizer, m);
|
85
|
+
return rb_float_new(gsl_cqpminimizer_f(m));
|
86
|
+
}
|
87
|
+
static VALUE rb_cqpminimizer_gap(VALUE obj)
|
88
|
+
{
|
89
|
+
gsl_cqpminimizer *m;
|
90
|
+
Data_Get_Struct(obj, gsl_cqpminimizer, m);
|
91
|
+
return rb_float_new(gsl_cqpminimizer_gap(m));
|
92
|
+
}
|
93
|
+
static VALUE rb_cqpminimizer_residuals_norm(VALUE obj)
|
94
|
+
{
|
95
|
+
gsl_cqpminimizer *m;
|
96
|
+
Data_Get_Struct(obj, gsl_cqpminimizer, m);
|
97
|
+
return rb_float_new(gsl_cqpminimizer_residuals_norm(m));
|
98
|
+
}
|
99
|
+
/*
|
100
|
+
static VALUE rb_cqpminimizer_minimum(VALUE obj)
|
101
|
+
{
|
102
|
+
gsl_cqpminimizer *m;
|
103
|
+
Data_Get_Struct(obj, gsl_cqpminimizer, m);
|
104
|
+
return rb_float_new(gsl_cqpminimizer_minimum(m));
|
105
|
+
}
|
106
|
+
*/
|
107
|
+
static VALUE rb_cqpminimizer_test_convergence(VALUE obj, VALUE g, VALUE r)
|
108
|
+
{
|
109
|
+
gsl_cqpminimizer *m;
|
110
|
+
Data_Get_Struct(obj, gsl_cqpminimizer, m);
|
111
|
+
return INT2FIX(gsl_cqpminimizer_test_convergence(m, NUM2DBL(g), NUM2DBL(r)));
|
112
|
+
}
|
113
|
+
static VALUE rb_cqpminimizer_test_infeasibility(VALUE obj, VALUE e)
|
114
|
+
{
|
115
|
+
gsl_cqpminimizer *m;
|
116
|
+
Data_Get_Struct(obj, gsl_cqpminimizer, m);
|
117
|
+
return INT2FIX(gsl_cqp_minimizer_test_infeasibility(m, NUM2DBL(e)));
|
118
|
+
}
|
119
|
+
|
120
|
+
static VALUE rb_cqp_data_alloc(VALUE klass)
|
121
|
+
{
|
122
|
+
gsl_cqp_data *d;
|
123
|
+
d = (gsl_cqp_data*) malloc(sizeof(gsl_cqp_data));
|
124
|
+
return Data_Wrap_Struct(klass, 0, free, d);
|
125
|
+
}
|
126
|
+
|
127
|
+
static VALUE rb_cqp_data_Q(VALUE obj)
|
128
|
+
{
|
129
|
+
gsl_cqp_data *d;
|
130
|
+
Data_Get_Struct(obj, gsl_cqp_data, d);
|
131
|
+
return Data_Wrap_Struct(cgsl_matrix_view, 0, NULL, d->Q);
|
132
|
+
}
|
133
|
+
|
134
|
+
static VALUE rb_cqp_data_q(VALUE obj)
|
135
|
+
{
|
136
|
+
gsl_cqp_data *d;
|
137
|
+
Data_Get_Struct(obj, gsl_cqp_data, d);
|
138
|
+
return Data_Wrap_Struct(cgsl_vector_view, 0, NULL, d->q);
|
139
|
+
}
|
140
|
+
|
141
|
+
static VALUE rb_cqp_data_A(VALUE obj)
|
142
|
+
{
|
143
|
+
gsl_cqp_data *d;
|
144
|
+
Data_Get_Struct(obj, gsl_cqp_data, d);
|
145
|
+
return Data_Wrap_Struct(cgsl_matrix_view, 0, NULL, d->A);
|
146
|
+
}
|
147
|
+
|
148
|
+
static VALUE rb_cqp_data_b(VALUE obj)
|
149
|
+
{
|
150
|
+
gsl_cqp_data *d;
|
151
|
+
Data_Get_Struct(obj, gsl_cqp_data, d);
|
152
|
+
return Data_Wrap_Struct(cgsl_vector_view, 0, NULL, d->b);
|
153
|
+
}
|
154
|
+
|
155
|
+
static VALUE rb_cqp_data_C(VALUE obj)
|
156
|
+
{
|
157
|
+
gsl_cqp_data *d;
|
158
|
+
Data_Get_Struct(obj, gsl_cqp_data, d);
|
159
|
+
return Data_Wrap_Struct(cgsl_matrix_view, 0, NULL, d->C);
|
160
|
+
}
|
161
|
+
|
162
|
+
static VALUE rb_cqp_data_d(VALUE obj)
|
163
|
+
{
|
164
|
+
gsl_cqp_data *d;
|
165
|
+
Data_Get_Struct(obj, gsl_cqp_data, d);
|
166
|
+
return Data_Wrap_Struct(cgsl_vector_view, 0, NULL, d->d);
|
167
|
+
}
|
168
|
+
|
169
|
+
static VALUE rb_cqp_data_set_Q(VALUE obj, VALUE mm)
|
170
|
+
{
|
171
|
+
gsl_cqp_data *d;
|
172
|
+
gsl_matrix *m;
|
173
|
+
Data_Get_Struct(obj, gsl_cqp_data, d);
|
174
|
+
CHECK_MATRIX(mm);
|
175
|
+
Data_Get_Struct(mm, gsl_matrix, m);
|
176
|
+
d->Q = m;
|
177
|
+
return Qtrue;
|
178
|
+
}
|
179
|
+
|
180
|
+
static VALUE rb_cqp_data_set_q(VALUE obj, VALUE vv)
|
181
|
+
{
|
182
|
+
gsl_cqp_data *d;
|
183
|
+
gsl_vector *v;
|
184
|
+
Data_Get_Struct(obj, gsl_cqp_data, d);
|
185
|
+
CHECK_VECTOR(vv);
|
186
|
+
Data_Get_Struct(vv, gsl_vector, v);
|
187
|
+
d->q = v;
|
188
|
+
return Qtrue;
|
189
|
+
}
|
190
|
+
|
191
|
+
static VALUE rb_cqp_data_set_A(VALUE obj, VALUE mm)
|
192
|
+
{
|
193
|
+
gsl_cqp_data *d;
|
194
|
+
gsl_matrix *m;
|
195
|
+
Data_Get_Struct(obj, gsl_cqp_data, d);
|
196
|
+
CHECK_MATRIX(mm);
|
197
|
+
Data_Get_Struct(mm, gsl_matrix, m);
|
198
|
+
d->A = m;
|
199
|
+
return Qtrue;
|
200
|
+
}
|
201
|
+
|
202
|
+
static VALUE rb_cqp_data_set_b(VALUE obj, VALUE vv)
|
203
|
+
{
|
204
|
+
gsl_cqp_data *d;
|
205
|
+
gsl_vector *v;
|
206
|
+
Data_Get_Struct(obj, gsl_cqp_data, d);
|
207
|
+
CHECK_VECTOR(vv);
|
208
|
+
Data_Get_Struct(vv, gsl_vector, v);
|
209
|
+
d->b = v;
|
210
|
+
return Qtrue;
|
211
|
+
}
|
212
|
+
|
213
|
+
static VALUE rb_cqp_data_set_C(VALUE obj, VALUE mm)
|
214
|
+
{
|
215
|
+
gsl_cqp_data *d;
|
216
|
+
gsl_matrix *m;
|
217
|
+
Data_Get_Struct(obj, gsl_cqp_data, d);
|
218
|
+
CHECK_MATRIX(mm);
|
219
|
+
Data_Get_Struct(mm, gsl_matrix, m);
|
220
|
+
d->C = m;
|
221
|
+
return Qtrue;
|
222
|
+
}
|
223
|
+
|
224
|
+
static VALUE rb_cqp_data_set_d(VALUE obj, VALUE vv)
|
225
|
+
{
|
226
|
+
gsl_cqp_data *d;
|
227
|
+
gsl_vector *v;
|
228
|
+
Data_Get_Struct(obj, gsl_cqp_data, d);
|
229
|
+
CHECK_VECTOR(vv);
|
230
|
+
Data_Get_Struct(vv, gsl_vector, v);
|
231
|
+
d->d = v;
|
232
|
+
return Qtrue;
|
233
|
+
}
|
234
|
+
|
235
|
+
void Init_cqp(VALUE module)
|
236
|
+
{
|
237
|
+
VALUE mCQP, cMinimizer, cData;
|
238
|
+
|
239
|
+
mCQP = rb_define_module_under(module, "CQP");
|
240
|
+
cMinimizer = rb_define_class_under(mCQP, "Minimizer", cGSL_Object);
|
241
|
+
cData = rb_define_class_under(mCQP, "Data", cGSL_Object);
|
242
|
+
|
243
|
+
rb_define_singleton_method(cMinimizer, "alloc", rb_cqpminimizer_alloc, 4);
|
244
|
+
|
245
|
+
rb_define_method(cMinimizer, "set", rb_cqpminimizer_set, 1);
|
246
|
+
rb_define_method(cMinimizer, "name", rb_cqpminimizer_name, 0);
|
247
|
+
rb_define_method(cMinimizer, "iterate", rb_cqpminimizer_iterate, 0);
|
248
|
+
rb_define_method(cMinimizer, "x", rb_cqpminimizer_x, 0);
|
249
|
+
rb_define_method(cMinimizer, "lm_eq", rb_cqpminimizer_lm_eq, 0);
|
250
|
+
rb_define_method(cMinimizer, "lm_ineq", rb_cqpminimizer_lm_ineq, 0);
|
251
|
+
rb_define_method(cMinimizer, "f", rb_cqpminimizer_f, 0);
|
252
|
+
rb_define_method(cMinimizer, "gap", rb_cqpminimizer_gap, 0);
|
253
|
+
rb_define_method(cMinimizer, "residuals_norm", rb_cqpminimizer_residuals_norm, 0);
|
254
|
+
/* rb_define_method(cMinimizer, "minimum", rb_cqpminimizer_minimum, 0); */
|
255
|
+
rb_define_method(cMinimizer, "test_convergence", rb_cqpminimizer_test_convergence, 2);
|
256
|
+
rb_define_method(cMinimizer, "test_infeasibility", rb_cqpminimizer_test_infeasibility, 1);
|
257
|
+
|
258
|
+
/*****/
|
259
|
+
rb_define_singleton_method(cData, "alloc", rb_cqp_data_alloc, 0);
|
260
|
+
|
261
|
+
rb_define_method(cData, "Q", rb_cqp_data_Q, 0);
|
262
|
+
rb_define_method(cData, "q", rb_cqp_data_q, 0);
|
263
|
+
rb_define_method(cData, "A", rb_cqp_data_A, 0);
|
264
|
+
rb_define_method(cData, "b", rb_cqp_data_b, 0);
|
265
|
+
rb_define_method(cData, "C", rb_cqp_data_C, 0);
|
266
|
+
rb_define_method(cData, "d", rb_cqp_data_d, 0);
|
267
|
+
|
268
|
+
rb_define_method(cData, "set_Q", rb_cqp_data_set_Q, 1);
|
269
|
+
rb_define_method(cData, "set_q", rb_cqp_data_set_q, 1);
|
270
|
+
rb_define_method(cData, "set_A", rb_cqp_data_set_A, 1);
|
271
|
+
rb_define_method(cData, "set_b", rb_cqp_data_set_b, 1);
|
272
|
+
rb_define_method(cData, "set_C", rb_cqp_data_set_C, 1);
|
273
|
+
rb_define_method(cData, "set_d", rb_cqp_data_set_d, 1);
|
274
|
+
rb_define_alias(cData, "Q=", "set_Q");
|
275
|
+
rb_define_alias(cData, "q=", "set_q");
|
276
|
+
rb_define_alias(cData, "A=", "set_A");
|
277
|
+
rb_define_alias(cData, "b=", "set_b");
|
278
|
+
rb_define_alias(cData, "C=", "set_C");
|
279
|
+
rb_define_alias(cData, "d=", "set_d");
|
280
|
+
}
|
281
|
+
|
282
|
+
#endif
|
283
|
+
|