gsl 1.12.108

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. data/README.rdoc +29 -0
  2. data/Rakefile +54 -0
  3. data/VERSION +2 -0
  4. data/ext/MANIFEST +119 -0
  5. data/ext/alf.c +206 -0
  6. data/ext/array.c +666 -0
  7. data/ext/array_complex.c +247 -0
  8. data/ext/blas.c +29 -0
  9. data/ext/blas1.c +731 -0
  10. data/ext/blas2.c +1093 -0
  11. data/ext/blas3.c +881 -0
  12. data/ext/block.c +44 -0
  13. data/ext/block_source.c +886 -0
  14. data/ext/bspline.c +130 -0
  15. data/ext/bundle.c +3 -0
  16. data/ext/cdf.c +754 -0
  17. data/ext/cheb.c +542 -0
  18. data/ext/combination.c +283 -0
  19. data/ext/common.c +325 -0
  20. data/ext/complex.c +1004 -0
  21. data/ext/const.c +673 -0
  22. data/ext/const_additional.c +120 -0
  23. data/ext/cqp.c +283 -0
  24. data/ext/deriv.c +195 -0
  25. data/ext/dht.c +361 -0
  26. data/ext/diff.c +166 -0
  27. data/ext/dirac.c +395 -0
  28. data/ext/eigen.c +2373 -0
  29. data/ext/error.c +194 -0
  30. data/ext/extconf.rb +281 -0
  31. data/ext/fcmp.c +66 -0
  32. data/ext/fft.c +1092 -0
  33. data/ext/fit.c +205 -0
  34. data/ext/fresnel.c +312 -0
  35. data/ext/function.c +524 -0
  36. data/ext/geometry.c +139 -0
  37. data/ext/graph.c +1638 -0
  38. data/ext/gsl.c +271 -0
  39. data/ext/gsl_narray.c +653 -0
  40. data/ext/histogram.c +1995 -0
  41. data/ext/histogram2d.c +1068 -0
  42. data/ext/histogram3d.c +884 -0
  43. data/ext/histogram3d_source.c +750 -0
  44. data/ext/histogram_find.c +101 -0
  45. data/ext/histogram_oper.c +159 -0
  46. data/ext/ieee.c +98 -0
  47. data/ext/integration.c +1138 -0
  48. data/ext/interp.c +512 -0
  49. data/ext/jacobi.c +739 -0
  50. data/ext/linalg.c +4047 -0
  51. data/ext/linalg_complex.c +741 -0
  52. data/ext/math.c +725 -0
  53. data/ext/matrix.c +39 -0
  54. data/ext/matrix_complex.c +1732 -0
  55. data/ext/matrix_double.c +560 -0
  56. data/ext/matrix_int.c +256 -0
  57. data/ext/matrix_source.c +2733 -0
  58. data/ext/min.c +250 -0
  59. data/ext/monte.c +992 -0
  60. data/ext/multifit.c +1879 -0
  61. data/ext/multimin.c +808 -0
  62. data/ext/multimin_fsdf.c +156 -0
  63. data/ext/multiroots.c +955 -0
  64. data/ext/ndlinear.c +321 -0
  65. data/ext/nmf.c +167 -0
  66. data/ext/nmf_wrap.c +72 -0
  67. data/ext/ntuple.c +469 -0
  68. data/ext/odeiv.c +959 -0
  69. data/ext/ool.c +879 -0
  70. data/ext/oper_complex_source.c +253 -0
  71. data/ext/permutation.c +596 -0
  72. data/ext/poly.c +42 -0
  73. data/ext/poly2.c +265 -0
  74. data/ext/poly_source.c +1885 -0
  75. data/ext/qrng.c +171 -0
  76. data/ext/randist.c +1873 -0
  77. data/ext/rational.c +480 -0
  78. data/ext/rng.c +612 -0
  79. data/ext/root.c +408 -0
  80. data/ext/sf.c +1494 -0
  81. data/ext/sf_airy.c +200 -0
  82. data/ext/sf_bessel.c +867 -0
  83. data/ext/sf_clausen.c +28 -0
  84. data/ext/sf_coulomb.c +206 -0
  85. data/ext/sf_coupling.c +118 -0
  86. data/ext/sf_dawson.c +29 -0
  87. data/ext/sf_debye.c +157 -0
  88. data/ext/sf_dilog.c +42 -0
  89. data/ext/sf_elementary.c +44 -0
  90. data/ext/sf_ellint.c +206 -0
  91. data/ext/sf_elljac.c +29 -0
  92. data/ext/sf_erfc.c +93 -0
  93. data/ext/sf_exp.c +164 -0
  94. data/ext/sf_expint.c +211 -0
  95. data/ext/sf_fermi_dirac.c +148 -0
  96. data/ext/sf_gamma.c +344 -0
  97. data/ext/sf_gegenbauer.c +96 -0
  98. data/ext/sf_hyperg.c +197 -0
  99. data/ext/sf_laguerre.c +112 -0
  100. data/ext/sf_lambert.c +47 -0
  101. data/ext/sf_legendre.c +367 -0
  102. data/ext/sf_log.c +104 -0
  103. data/ext/sf_mathieu.c +238 -0
  104. data/ext/sf_power.c +46 -0
  105. data/ext/sf_psi.c +98 -0
  106. data/ext/sf_synchrotron.c +48 -0
  107. data/ext/sf_transport.c +76 -0
  108. data/ext/sf_trigonometric.c +207 -0
  109. data/ext/sf_zeta.c +119 -0
  110. data/ext/signal.c +310 -0
  111. data/ext/siman.c +718 -0
  112. data/ext/sort.c +208 -0
  113. data/ext/spline.c +395 -0
  114. data/ext/stats.c +799 -0
  115. data/ext/sum.c +168 -0
  116. data/ext/tamu_anova.c +56 -0
  117. data/ext/tensor.c +38 -0
  118. data/ext/tensor_source.c +1123 -0
  119. data/ext/vector.c +38 -0
  120. data/ext/vector_complex.c +2236 -0
  121. data/ext/vector_double.c +1433 -0
  122. data/ext/vector_int.c +204 -0
  123. data/ext/vector_source.c +3329 -0
  124. data/ext/wavelet.c +937 -0
  125. data/include/rb_gsl.h +151 -0
  126. data/include/rb_gsl_array.h +238 -0
  127. data/include/rb_gsl_cheb.h +21 -0
  128. data/include/rb_gsl_common.h +343 -0
  129. data/include/rb_gsl_complex.h +25 -0
  130. data/include/rb_gsl_const.h +29 -0
  131. data/include/rb_gsl_dirac.h +13 -0
  132. data/include/rb_gsl_eigen.h +17 -0
  133. data/include/rb_gsl_fft.h +62 -0
  134. data/include/rb_gsl_fit.h +25 -0
  135. data/include/rb_gsl_function.h +27 -0
  136. data/include/rb_gsl_graph.h +70 -0
  137. data/include/rb_gsl_histogram.h +63 -0
  138. data/include/rb_gsl_histogram3d.h +97 -0
  139. data/include/rb_gsl_integration.h +17 -0
  140. data/include/rb_gsl_interp.h +46 -0
  141. data/include/rb_gsl_linalg.h +25 -0
  142. data/include/rb_gsl_math.h +26 -0
  143. data/include/rb_gsl_odeiv.h +21 -0
  144. data/include/rb_gsl_poly.h +71 -0
  145. data/include/rb_gsl_rational.h +37 -0
  146. data/include/rb_gsl_rng.h +21 -0
  147. data/include/rb_gsl_root.h +22 -0
  148. data/include/rb_gsl_sf.h +119 -0
  149. data/include/rb_gsl_statistics.h +17 -0
  150. data/include/rb_gsl_tensor.h +45 -0
  151. data/include/rb_gsl_with_narray.h +22 -0
  152. data/include/templates_off.h +87 -0
  153. data/include/templates_on.h +241 -0
  154. data/lib/gsl/gnuplot.rb +41 -0
  155. data/lib/gsl/oper.rb +68 -0
  156. data/lib/ool.rb +22 -0
  157. data/lib/ool/conmin.rb +30 -0
  158. metadata +224 -0
@@ -0,0 +1,96 @@
1
+ /*
2
+ sf_gegenbauer.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 "rb_gsl_sf.h"
13
+
14
+ static VALUE rb_gsl_sf_gegenpoly_1(VALUE obj, VALUE lambda, VALUE x)
15
+ {
16
+ return rb_gsl_sf_eval_double_double(gsl_sf_gegenpoly_1, lambda, x);
17
+ }
18
+
19
+ static VALUE rb_gsl_sf_gegenpoly_1_e(VALUE obj, VALUE lambda, VALUE x)
20
+ {
21
+ return rb_gsl_sf_eval_e_double2(gsl_sf_gegenpoly_1_e, lambda, x);
22
+ }
23
+
24
+ static VALUE rb_gsl_sf_gegenpoly_2(VALUE obj, VALUE lambda, VALUE x)
25
+ {
26
+ return rb_gsl_sf_eval_double_double(gsl_sf_gegenpoly_2, lambda, x);
27
+ }
28
+
29
+ static VALUE rb_gsl_sf_gegenpoly_2_e(VALUE obj, VALUE lambda, VALUE x)
30
+ {
31
+ return rb_gsl_sf_eval_e_double2(gsl_sf_gegenpoly_2_e, lambda, x);
32
+ }
33
+
34
+ static VALUE rb_gsl_sf_gegenpoly_3(VALUE obj, VALUE lambda, VALUE x)
35
+ {
36
+ return rb_gsl_sf_eval_double_double(gsl_sf_gegenpoly_3, lambda, x);
37
+ }
38
+
39
+ static VALUE rb_gsl_sf_gegenpoly_3_e(VALUE obj, VALUE lambda, VALUE x)
40
+ {
41
+ return rb_gsl_sf_eval_e_double2(gsl_sf_gegenpoly_3_e, lambda, x);
42
+ }
43
+
44
+ static VALUE rb_gsl_sf_gegenpoly_n(VALUE obj, VALUE n, VALUE lambda, VALUE x)
45
+ {
46
+ return rb_gsl_sf_eval_int_double_double(gsl_sf_gegenpoly_n, n, lambda, x);
47
+ }
48
+
49
+ static VALUE rb_gsl_sf_gegenpoly_n_e(VALUE obj, VALUE n, VALUE lambda, VALUE x)
50
+ {
51
+ gsl_sf_result *rslt = NULL;
52
+ VALUE v;
53
+ int status;
54
+ CHECK_FIXNUM(n);
55
+ Need_Float(lambda); Need_Float(x);
56
+ v = Data_Make_Struct(cgsl_sf_result, gsl_sf_result, 0, free, rslt);
57
+ status = gsl_sf_gegenpoly_n_e(FIX2INT(n), NUM2DBL(lambda), NUM2DBL(x), rslt);
58
+
59
+ return v;
60
+ }
61
+
62
+ static VALUE rb_gsl_sf_gegenpoly_array(VALUE obj, VALUE nmax, VALUE lambda, VALUE x)
63
+ {
64
+ gsl_vector *v = NULL;
65
+ CHECK_FIXNUM(nmax);
66
+ Need_Float(lambda); Need_Float(x);
67
+ v = gsl_vector_alloc(nmax);
68
+ gsl_sf_gegenpoly_array(FIX2INT(nmax), NUM2DBL(lambda), NUM2DBL(x), v->data);
69
+ return Data_Wrap_Struct(cgsl_vector, 0, gsl_vector_free, v);
70
+ }
71
+
72
+ void Init_gsl_sf_gegenbauer(VALUE module)
73
+ {
74
+ VALUE mgsl_sf_gegenpoly;
75
+ rb_define_module_function(module, "gegenpoly_1", rb_gsl_sf_gegenpoly_1, 2);
76
+ rb_define_module_function(module, "gegenpoly_1_e", rb_gsl_sf_gegenpoly_1_e, 2);
77
+ rb_define_module_function(module, "gegenpoly_2", rb_gsl_sf_gegenpoly_2, 2);
78
+ rb_define_module_function(module, "gegenpoly_2_e", rb_gsl_sf_gegenpoly_2_e, 2);
79
+ rb_define_module_function(module, "gegenpoly_3", rb_gsl_sf_gegenpoly_3, 2);
80
+ rb_define_module_function(module, "gegenpoly_3_e", rb_gsl_sf_gegenpoly_3_e, 2);
81
+ rb_define_module_function(module, "gegenpoly_n", rb_gsl_sf_gegenpoly_n, 3);
82
+ rb_define_module_function(module, "gegenpoly_n_e", rb_gsl_sf_gegenpoly_n_e, 3);
83
+ rb_define_module_function(module, "gegenpoly_array", rb_gsl_sf_gegenpoly_array, 3);
84
+
85
+ mgsl_sf_gegenpoly = rb_define_module_under(module, "Gegenpoly");
86
+ rb_define_module_function(mgsl_sf_gegenpoly, "one", rb_gsl_sf_gegenpoly_1, 2);
87
+ rb_define_module_function(mgsl_sf_gegenpoly, "one_e", rb_gsl_sf_gegenpoly_1_e, 2);
88
+ rb_define_module_function(mgsl_sf_gegenpoly, "two", rb_gsl_sf_gegenpoly_2, 2);
89
+ rb_define_module_function(mgsl_sf_gegenpoly, "two_e", rb_gsl_sf_gegenpoly_2_e, 2);
90
+ rb_define_module_function(mgsl_sf_gegenpoly, "three", rb_gsl_sf_gegenpoly_3, 2);
91
+ rb_define_module_function(mgsl_sf_gegenpoly, "three_e", rb_gsl_sf_gegenpoly_3_e, 2);
92
+ rb_define_module_function(mgsl_sf_gegenpoly, "n", rb_gsl_sf_gegenpoly_n, 3);
93
+ rb_define_module_function(mgsl_sf_gegenpoly, "n_e", rb_gsl_sf_gegenpoly_n_e, 3);
94
+ rb_define_module_function(mgsl_sf_gegenpoly, "array", rb_gsl_sf_gegenpoly_array, 3);
95
+
96
+ }
@@ -0,0 +1,197 @@
1
+ /*
2
+ sf_hyperg.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 "rb_gsl_sf.h"
13
+
14
+ /* Checked with Mathematica. */
15
+ static VALUE rb_gsl_sf_hyperg_0F1(VALUE obj, VALUE c, VALUE x)
16
+ {
17
+ return rb_gsl_sf_eval_double_double(gsl_sf_hyperg_0F1, c, x);
18
+ }
19
+
20
+ static VALUE rb_gsl_sf_hyperg_0F1_e(VALUE obj, VALUE c, VALUE x)
21
+ {
22
+ return rb_gsl_sf_eval_e_double2(gsl_sf_hyperg_0F1_e, c, x);
23
+ }
24
+
25
+ static VALUE rb_gsl_sf_hyperg_1F1_int(VALUE obj, VALUE m, VALUE n, VALUE x)
26
+ {
27
+ return rb_gsl_sf_eval_int_int_double(gsl_sf_hyperg_1F1_int, m, n, x);
28
+ }
29
+
30
+ static VALUE rb_gsl_sf_hyperg_1F1_int_e(VALUE obj, VALUE m, VALUE n, VALUE x)
31
+ {
32
+ gsl_sf_result *rslt = NULL;
33
+ VALUE v;
34
+ int status;
35
+ CHECK_FIXNUM(m); CHECK_FIXNUM(n); Need_Float(x);
36
+ v = Data_Make_Struct(cgsl_sf_result, gsl_sf_result, 0, free, rslt);
37
+ status = gsl_sf_hyperg_1F1_int_e(FIX2INT(m), FIX2INT(n), NUM2DBL(x), rslt);
38
+ return v;
39
+ }
40
+
41
+ static VALUE rb_gsl_sf_hyperg_1F1(VALUE obj, VALUE a, VALUE b, VALUE x)
42
+ {
43
+ return rb_gsl_sf_eval_double3(gsl_sf_hyperg_1F1, a, b, x);
44
+ }
45
+
46
+ static VALUE rb_gsl_sf_hyperg_1F1_e(VALUE obj, VALUE a, VALUE b, VALUE x)
47
+ {
48
+ return rb_gsl_sf_eval_e_double3(gsl_sf_hyperg_1F1_e, a, b, x);
49
+ }
50
+
51
+ static VALUE rb_gsl_sf_hyperg_U_int(VALUE obj, VALUE m, VALUE n, VALUE x)
52
+ {
53
+ return rb_gsl_sf_eval_int_int_double(gsl_sf_hyperg_U_int, m, n, x);
54
+ }
55
+
56
+ static VALUE rb_gsl_sf_hyperg_U_int_e(VALUE obj, VALUE m, VALUE n, VALUE x)
57
+ {
58
+ gsl_sf_result *rslt = NULL;
59
+ VALUE v;
60
+ int status;
61
+ CHECK_FIXNUM(m); CHECK_FIXNUM(n); Need_Float(x);
62
+ v = Data_Make_Struct(cgsl_sf_result, gsl_sf_result, 0, free, rslt);
63
+ status = gsl_sf_hyperg_U_int_e(FIX2INT(m), FIX2INT(n), NUM2DBL(x), rslt);
64
+ return v;
65
+ }
66
+
67
+ static VALUE rb_gsl_sf_hyperg_U_int_e10_e(VALUE obj, VALUE m, VALUE n, VALUE x)
68
+ {
69
+ gsl_sf_result_e10 *rslt = NULL;
70
+ VALUE v;
71
+ int status;
72
+ CHECK_FIXNUM(m); CHECK_FIXNUM(n); Need_Float(x);
73
+ v = Data_Make_Struct(cgsl_sf_result_e10, gsl_sf_result_e10, 0, free, rslt);
74
+ status = gsl_sf_hyperg_U_int_e10_e(FIX2INT(m), FIX2INT(n), NUM2DBL(x), rslt);
75
+ return v;
76
+ }
77
+
78
+ static VALUE rb_gsl_sf_hyperg_U(VALUE obj, VALUE a, VALUE b, VALUE x)
79
+ {
80
+ return rb_gsl_sf_eval_double3(gsl_sf_hyperg_U, a, b, x);
81
+ }
82
+
83
+ static VALUE rb_gsl_sf_hyperg_U_e(VALUE obj, VALUE a, VALUE b, VALUE x)
84
+ {
85
+ return rb_gsl_sf_eval_e_double3(gsl_sf_hyperg_U_e, a, b, x);
86
+ }
87
+
88
+ static VALUE rb_gsl_sf_hyperg_U_e10_e(VALUE obj, VALUE a, VALUE b, VALUE x)
89
+ {
90
+ gsl_sf_result_e10 *rslt = NULL;
91
+ VALUE v;
92
+ int status;
93
+ Need_Float(a); Need_Float(b); Need_Float(x);
94
+ v = Data_Make_Struct(cgsl_sf_result_e10, gsl_sf_result_e10, 0, free, rslt);
95
+ status = gsl_sf_hyperg_U_e10_e(NUM2DBL(a), NUM2DBL(b), NUM2DBL(x), rslt);
96
+ return rb_ary_new3(2, v, INT2FIX(status));
97
+ }
98
+
99
+ static VALUE rb_gsl_sf_hyperg_2F1(VALUE obj, VALUE a, VALUE b, VALUE c, VALUE x)
100
+ {
101
+ return rb_gsl_sf_eval_double4(gsl_sf_hyperg_2F1, a, b, c, x);
102
+ }
103
+
104
+ static VALUE rb_gsl_sf_hyperg_2F1_e(VALUE obj, VALUE a, VALUE b, VALUE c, VALUE x)
105
+ {
106
+ gsl_sf_result *rslt = NULL;
107
+ VALUE v;
108
+ int status;
109
+ Need_Float(a); Need_Float(b); Need_Float(c); Need_Float(x);
110
+ v = Data_Make_Struct(cgsl_sf_result, gsl_sf_result, 0, free, rslt);
111
+ status = gsl_sf_hyperg_2F1_e(NUM2DBL(a), NUM2DBL(b), NUM2DBL(c), NUM2DBL(x), rslt);
112
+ return rb_ary_new3(2, v, INT2FIX(status));
113
+ }
114
+
115
+ static VALUE rb_gsl_sf_hyperg_2F1_conj(VALUE obj, VALUE aR, VALUE aI, VALUE c, VALUE x)
116
+ {
117
+ return rb_gsl_sf_eval_double4(gsl_sf_hyperg_2F1_conj, aR, aI, c, x);
118
+ }
119
+
120
+ static VALUE rb_gsl_sf_hyperg_2F1_conj_e(VALUE obj, VALUE aR, VALUE aI, VALUE c, VALUE x)
121
+ {
122
+ gsl_sf_result *rslt = NULL;
123
+ VALUE v;
124
+ int status;
125
+ Need_Float(aR); Need_Float(aI); Need_Float(c); Need_Float(x);
126
+ v = Data_Make_Struct(cgsl_sf_result, gsl_sf_result, 0, free, rslt);
127
+ status = gsl_sf_hyperg_2F1_conj_e(NUM2DBL(aR), NUM2DBL(aI), NUM2DBL(c), NUM2DBL(x), rslt);
128
+ return v;
129
+ }
130
+
131
+ static VALUE rb_gsl_sf_hyperg_2F1_renorm(VALUE obj, VALUE a, VALUE b, VALUE c, VALUE x)
132
+ {
133
+ return rb_gsl_sf_eval_double4(gsl_sf_hyperg_2F1_renorm, a, b, c, x);
134
+ }
135
+
136
+ static VALUE rb_gsl_sf_hyperg_2F1_renorm_e(VALUE obj, VALUE a, VALUE b, VALUE c, VALUE x)
137
+ {
138
+ gsl_sf_result *rslt = NULL;
139
+ VALUE v;
140
+ int status;
141
+ Need_Float(a); Need_Float(b); Need_Float(c); Need_Float(x);
142
+ v = Data_Make_Struct(cgsl_sf_result, gsl_sf_result, 0, free, rslt);
143
+ status = gsl_sf_hyperg_2F1_renorm_e(NUM2DBL(a), NUM2DBL(b), NUM2DBL(c), NUM2DBL(x), rslt);
144
+ return v;
145
+ }
146
+
147
+ static VALUE rb_gsl_sf_hyperg_2F1_conj_renorm(VALUE obj, VALUE aR, VALUE aI, VALUE c, VALUE x)
148
+ {
149
+ return rb_gsl_sf_eval_double4(gsl_sf_hyperg_2F1_conj_renorm, aR, aI, c, x);
150
+ }
151
+
152
+ static VALUE rb_gsl_sf_hyperg_2F1_conj_renorm_e(VALUE obj, VALUE aR, VALUE aI, VALUE c, VALUE x)
153
+ {
154
+ gsl_sf_result *rslt = NULL;
155
+ VALUE v;
156
+ int status;
157
+ Need_Float(aR); Need_Float(aI); Need_Float(c); Need_Float(x);
158
+ v = Data_Make_Struct(cgsl_sf_result, gsl_sf_result, 0, free, rslt);
159
+ status = gsl_sf_hyperg_2F1_conj_renorm_e(NUM2DBL(aR), NUM2DBL(aI), NUM2DBL(c), NUM2DBL(x), rslt);
160
+ return v;
161
+ }
162
+
163
+ static VALUE rb_gsl_sf_hyperg_2F0(VALUE obj, VALUE a, VALUE b, VALUE x)
164
+ {
165
+ return rb_gsl_sf_eval_double3(gsl_sf_hyperg_2F0, a, b, x);
166
+ }
167
+
168
+ static VALUE rb_gsl_sf_hyperg_2F0_e(VALUE obj, VALUE a, VALUE b, VALUE x)
169
+ {
170
+ return rb_gsl_sf_eval_e_double3(gsl_sf_hyperg_2F0_e, a, b, x);
171
+ }
172
+
173
+ void Init_gsl_sf_hyperg(VALUE module)
174
+ {
175
+ rb_define_module_function(module, "hyperg_0F1", rb_gsl_sf_hyperg_0F1, 2);
176
+ rb_define_module_function(module, "hyperg_0F1_e", rb_gsl_sf_hyperg_0F1_e, 2);
177
+ rb_define_module_function(module, "hyperg_1F1_int", rb_gsl_sf_hyperg_1F1_int, 3);
178
+ rb_define_module_function(module, "hyperg_1F1_int_e", rb_gsl_sf_hyperg_1F1_int_e, 3);
179
+ rb_define_module_function(module, "hyperg_1F1", rb_gsl_sf_hyperg_1F1, 3);
180
+ rb_define_module_function(module, "hyperg_1F1_e", rb_gsl_sf_hyperg_1F1_e, 3);
181
+ rb_define_module_function(module, "hyperg_U_int", rb_gsl_sf_hyperg_U_int, 3);
182
+ rb_define_module_function(module, "hyperg_U_int_e", rb_gsl_sf_hyperg_U_int_e, 3);
183
+ rb_define_module_function(module, "hyperg_U_int_e10_e", rb_gsl_sf_hyperg_U_int_e10_e, 3);
184
+ rb_define_module_function(module, "hyperg_U", rb_gsl_sf_hyperg_U, 3);
185
+ rb_define_module_function(module, "hyperg_U_e", rb_gsl_sf_hyperg_U_e, 3);
186
+ rb_define_module_function(module, "hyperg_U_e10_e", rb_gsl_sf_hyperg_U_e10_e, 3);
187
+ rb_define_module_function(module, "hyperg_2F1", rb_gsl_sf_hyperg_2F1, 4);
188
+ rb_define_module_function(module, "hyperg_2F1_e", rb_gsl_sf_hyperg_2F1_e, 4);
189
+ rb_define_module_function(module, "hyperg_2F1_conj", rb_gsl_sf_hyperg_2F1_conj, 4);
190
+ rb_define_module_function(module, "hyperg_2F1_conj_e", rb_gsl_sf_hyperg_2F1_conj_e, 4);
191
+ rb_define_module_function(module, "hyperg_2F1_renorm", rb_gsl_sf_hyperg_2F1_renorm, 4);
192
+ rb_define_module_function(module, "hyperg_2F1_renorm_e", rb_gsl_sf_hyperg_2F1_renorm_e, 4);
193
+ rb_define_module_function(module, "hyperg_2F1_conj_renorm", rb_gsl_sf_hyperg_2F1_conj_renorm, 4);
194
+ rb_define_module_function(module, "hyperg_2F1_conj_renorm_e", rb_gsl_sf_hyperg_2F1_conj_renorm_e, 4);
195
+ rb_define_module_function(module, "hyperg_2F0", rb_gsl_sf_hyperg_2F0, 3);
196
+ rb_define_module_function(module, "hyperg_2F0_e", rb_gsl_sf_hyperg_2F0_e, 3);
197
+ }
@@ -0,0 +1,112 @@
1
+ /*
2
+ sf_laguerre.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 "rb_gsl_sf.h"
13
+
14
+ static VALUE rb_gsl_sf_laguerre_X(int argc, VALUE *argv, VALUE obj,
15
+ double (*f)(double, double))
16
+ {
17
+ switch (argc) {
18
+ case 2:
19
+ return rb_gsl_sf_eval_double_double(f, argv[0], argv[1]);
20
+ break;
21
+ case 1:
22
+ return rb_gsl_sf_eval_double_double(f, INT2FIX(0), argv[0]);
23
+ break;
24
+ default:
25
+ rb_raise(rb_eArgError, "wrong number of arguments (%d for 1 or 2)", argc);
26
+ break;
27
+ }
28
+ }
29
+
30
+ static VALUE rb_gsl_sf_laguerre_1(int argc, VALUE *argv, VALUE obj)
31
+ {
32
+ return rb_gsl_sf_laguerre_X(argc, argv, obj, gsl_sf_laguerre_1);
33
+ }
34
+
35
+ static VALUE rb_gsl_sf_laguerre_1_e(VALUE obj, VALUE a, VALUE x)
36
+ {
37
+ return rb_gsl_sf_eval_e_double2(gsl_sf_laguerre_1_e, a, x);
38
+ }
39
+
40
+ static VALUE rb_gsl_sf_laguerre_2(int argc, VALUE *argv, VALUE obj)
41
+ {
42
+ return rb_gsl_sf_laguerre_X(argc, argv, obj, gsl_sf_laguerre_2);
43
+ }
44
+
45
+ static VALUE rb_gsl_sf_laguerre_2_e(VALUE obj, VALUE a, VALUE x)
46
+ {
47
+ return rb_gsl_sf_eval_e_double2(gsl_sf_laguerre_2_e, a, x);
48
+ }
49
+
50
+ static VALUE rb_gsl_sf_laguerre_3(int argc, VALUE *argv, VALUE obj)
51
+ {
52
+ return rb_gsl_sf_laguerre_X(argc, argv, obj, gsl_sf_laguerre_3);
53
+ }
54
+
55
+ static VALUE rb_gsl_sf_laguerre_3_e(VALUE obj, VALUE a, VALUE x)
56
+ {
57
+ return rb_gsl_sf_eval_e_double2(gsl_sf_laguerre_3_e, a, x);
58
+ }
59
+
60
+ static VALUE rb_gsl_sf_laguerre_n(int argc, VALUE *argv, VALUE obj)
61
+ {
62
+ switch (argc) {
63
+ case 3:
64
+ return rb_gsl_sf_eval_int_double_double(gsl_sf_laguerre_n, argv[0],
65
+ argv[1], argv[2]);
66
+ break;
67
+ case 2:
68
+ return rb_gsl_sf_eval_int_double_double(gsl_sf_laguerre_n, argv[0],
69
+ INT2FIX(0), argv[1]);
70
+ break;
71
+ default:
72
+ rb_raise(rb_eArgError, "wrong number of arguments (%d for 1 or 2)", argc);
73
+ break;
74
+ }
75
+ }
76
+
77
+ static VALUE rb_gsl_sf_laguerre_n_e(VALUE obj, VALUE n, VALUE a, VALUE x)
78
+ {
79
+ gsl_sf_result *rslt = NULL;
80
+ VALUE v;
81
+ int status;
82
+ CHECK_FIXNUM(n);
83
+ Need_Float(a); Need_Float(x);
84
+ v = Data_Make_Struct(cgsl_sf_result, gsl_sf_result, 0, free, rslt);
85
+ status = gsl_sf_laguerre_n_e(FIX2INT(n), NUM2DBL(a), NUM2DBL(x), rslt);
86
+ return v;
87
+ }
88
+
89
+ void Init_gsl_sf_laguerre(VALUE module)
90
+ {
91
+ VALUE mgsl_sf_laguerre;
92
+
93
+ rb_define_module_function(module, "laguerre_1", rb_gsl_sf_laguerre_1, -1);
94
+ rb_define_module_function(module, "laguerre_1_e", rb_gsl_sf_laguerre_1_e, 2);
95
+ rb_define_module_function(module, "laguerre_2", rb_gsl_sf_laguerre_2, -1);
96
+ rb_define_module_function(module, "laguerre_2_e", rb_gsl_sf_laguerre_2_e, 2);
97
+ rb_define_module_function(module, "laguerre_3", rb_gsl_sf_laguerre_3, -1);
98
+ rb_define_module_function(module, "laguerre_3_e", rb_gsl_sf_laguerre_3_e, 2);
99
+ rb_define_module_function(module, "laguerre_n", rb_gsl_sf_laguerre_n, -1);
100
+ rb_define_module_function(module, "laguerre_n_e", rb_gsl_sf_laguerre_n_e, 3);
101
+
102
+ mgsl_sf_laguerre = rb_define_module_under(module, "Laguerre");
103
+ rb_define_module_function(mgsl_sf_laguerre, "one", rb_gsl_sf_laguerre_1, -1);
104
+ rb_define_module_function(mgsl_sf_laguerre, "one_e", rb_gsl_sf_laguerre_1_e, 2);
105
+ rb_define_module_function(mgsl_sf_laguerre, "two", rb_gsl_sf_laguerre_2, -1);
106
+ rb_define_module_function(mgsl_sf_laguerre, "two_e", rb_gsl_sf_laguerre_2_e, 2);
107
+ rb_define_module_function(mgsl_sf_laguerre, "three_3", rb_gsl_sf_laguerre_3, -1);
108
+ rb_define_module_function(mgsl_sf_laguerre, "three_e", rb_gsl_sf_laguerre_3_e, 2);
109
+ rb_define_module_function(mgsl_sf_laguerre, "n", rb_gsl_sf_laguerre_n, -1);
110
+ rb_define_module_function(mgsl_sf_laguerre, "n_e", rb_gsl_sf_laguerre_n_e, 3);
111
+
112
+ }
@@ -0,0 +1,47 @@
1
+ /*
2
+ sf_lambert.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 "rb_gsl_sf.h"
13
+
14
+ static VALUE rb_gsl_sf_lambert_W0(VALUE obj, VALUE x)
15
+ {
16
+ return rb_gsl_sf_eval1(gsl_sf_lambert_W0, x);
17
+ }
18
+
19
+ static VALUE rb_gsl_sf_lambert_W0_e(VALUE obj, VALUE x)
20
+ {
21
+ return rb_gsl_sf_eval_e(gsl_sf_lambert_W0_e, x);
22
+ }
23
+
24
+ static VALUE rb_gsl_sf_lambert_Wm1(VALUE obj, VALUE x)
25
+ {
26
+ return rb_gsl_sf_eval1(gsl_sf_lambert_Wm1, x);
27
+ }
28
+
29
+ static VALUE rb_gsl_sf_lambert_Wm1_e(VALUE obj, VALUE x)
30
+ {
31
+ return rb_gsl_sf_eval_e(gsl_sf_lambert_Wm1_e, x);
32
+ }
33
+
34
+ void Init_gsl_sf_lambert(VALUE module)
35
+ {
36
+ VALUE mgsl_sf_lambert;
37
+ rb_define_module_function(module, "lambert_W0", rb_gsl_sf_lambert_W0, 1);
38
+ rb_define_module_function(module, "lambert_W0_e", rb_gsl_sf_lambert_W0_e, 1);
39
+ rb_define_module_function(module, "lambert_Wm1", rb_gsl_sf_lambert_Wm1, 1);
40
+ rb_define_module_function(module, "lambert_Wm1_e", rb_gsl_sf_lambert_Wm1_e, 1);
41
+
42
+ mgsl_sf_lambert = rb_define_module_under(module, "Lambert");
43
+ rb_define_module_function(mgsl_sf_lambert, "W0", rb_gsl_sf_lambert_W0, 1);
44
+ rb_define_module_function(mgsl_sf_lambert, "W0_e", rb_gsl_sf_lambert_W0_e, 1);
45
+ rb_define_module_function(mgsl_sf_lambert, "Wm1", rb_gsl_sf_lambert_Wm1, 1);
46
+ rb_define_module_function(mgsl_sf_lambert, "Wm1_e", rb_gsl_sf_lambert_Wm1_e, 1);
47
+ }