alglib4 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ #include "alglib_alglibmisc.h"
2
+
3
+ double rb_hqrndnormal()
4
+ {
5
+ alglib::hqrndstate state;
6
+ alglib::hqrndrandomize(state);
7
+ return alglib::hqrndnormal(state);
8
+ }
9
+
10
+ Array rb_hqrndnormalv(alglib::ae_int_t n)
11
+ {
12
+ Array result = Array(rb_ary_new2(n));
13
+ alglib::hqrndstate state;
14
+ alglib::hqrndrandomize(state);
15
+ alglib::real_1d_array x;
16
+ alglib::hqrndnormalv(state, n, x);
17
+ for (alglib::ae_int_t i = 0; i < n; i++)
18
+ {
19
+ result.push(x[i]);
20
+ }
21
+ return result;
22
+ }
@@ -0,0 +1,8 @@
1
+ #include <rice/rice.hpp>
2
+ #include <rice/stl.hpp>
3
+ #include "alglibmisc.h"
4
+ #include "alglib_converters.h"
5
+ #include "alglib_utils.h"
6
+
7
+ double rb_hqrndnormal();
8
+ Array rb_hqrndnormalv(alglib::ae_int_t n);
@@ -0,0 +1,193 @@
1
+ #include "alglib_converters.h"
2
+
3
+ alglib::real_1d_array ruby_array_to_real_1d_array(Array ruby_array)
4
+ {
5
+ // Call the template function for real_1d_array and double
6
+ return ruby_array_to_alglib_1d_array<alglib::real_1d_array, double>(ruby_array);
7
+ }
8
+
9
+ alglib::integer_1d_array ruby_array_to_integer_1d_array(Array ruby_array)
10
+ {
11
+ // Call the template function for integer_1d_array and int
12
+ return ruby_array_to_alglib_1d_array<alglib::integer_1d_array, int>(ruby_array);
13
+ }
14
+
15
+ Array real_1d_array_to_ruby_array(const alglib::real_1d_array &arr)
16
+ {
17
+ // Call the template function for real_1d_array
18
+ return alglib_1d_array_to_ruby_array<alglib::real_1d_array>(arr);
19
+ }
20
+
21
+ Array integer_1d_array_to_ruby_array(const alglib::integer_1d_array &arr)
22
+ {
23
+ // Call the template function for integer_1d_array
24
+ return alglib_1d_array_to_ruby_array<alglib::integer_1d_array>(arr);
25
+ }
26
+
27
+ alglib::real_2d_array ruby_array_to_real_2d_array(Array ruby_array)
28
+ {
29
+ // Call the template function for real_2d_array and double
30
+ return ruby_array_to_alglib_2d_array<alglib::real_2d_array, double>(ruby_array);
31
+ }
32
+
33
+ alglib::integer_2d_array ruby_array_to_integer_2d_array(Array ruby_array)
34
+ {
35
+ // Call the template function for integer_2d_array and int
36
+ return ruby_array_to_alglib_2d_array<alglib::integer_2d_array, int>(ruby_array);
37
+ }
38
+
39
+ Array real_2d_array_to_ruby_array(const alglib::real_2d_array &real_array)
40
+ {
41
+ // Call the template function for real_2d_array
42
+ return alglib_2d_array_to_ruby_array<alglib::real_2d_array>(real_array);
43
+ }
44
+
45
+ Array integer_2d_array_to_ruby_array(const alglib::integer_2d_array &arr)
46
+ {
47
+ // Call the template function for integer_2d_array
48
+ return alglib_2d_array_to_ruby_array<alglib::integer_2d_array>(arr);
49
+ }
50
+
51
+ /**
52
+ * @brief Template implementation: Convert a Ruby Array to an ALGLIB 1D array.
53
+ */
54
+ template <typename AlglibArray, typename CType>
55
+ AlglibArray ruby_array_to_alglib_1d_array(Array ruby_array)
56
+ {
57
+ AlglibArray result;
58
+ result.setlength(ruby_array.size());
59
+ for (size_t i = 0; i < ruby_array.size(); ++i)
60
+ {
61
+ try
62
+ {
63
+ result[i] = Rice::detail::From_Ruby<CType>().convert(ruby_array[i].value());
64
+ }
65
+ catch (const std::exception &e)
66
+ {
67
+ throw std::invalid_argument(
68
+ "ruby_array_to_alglib_1d_array: Element " + std::to_string(i) +
69
+ " conversion failed: " + e.what());
70
+ }
71
+ }
72
+ return result;
73
+ }
74
+
75
+ /**
76
+ * @brief Template implementation: Convert an ALGLIB 1D array to a Ruby Array.
77
+ */
78
+ template <typename AlglibArray>
79
+ Array alglib_1d_array_to_ruby_array(const AlglibArray &arr)
80
+ {
81
+ Array ruby_array;
82
+ for (int i = 0; i < arr.length(); ++i)
83
+ {
84
+ ruby_array.push(arr[i]);
85
+ }
86
+ return ruby_array;
87
+ }
88
+
89
+ /**
90
+ * @brief Template implementation: Convert a Ruby 2D Array (Array of Arrays) to an ALGLIB 2D array.
91
+ */
92
+ template <typename Alglib2DArray, typename CType>
93
+ Alglib2DArray ruby_array_to_alglib_2d_array(Array ruby_array)
94
+ {
95
+ if (ruby_array.size() == 0)
96
+ {
97
+ // Return an empty ALGLIB 2D array (0x0)
98
+ Alglib2DArray result;
99
+ result.setlength(0, 0);
100
+ return result;
101
+ }
102
+ int rows = ruby_array.size();
103
+ Array first_row;
104
+ try
105
+ {
106
+ first_row = Rice::detail::From_Ruby<Array>().convert(ruby_array.call("first"));
107
+ }
108
+ catch (const std::exception &e)
109
+ {
110
+ throw std::invalid_argument("ruby_array_to_alglib_2d_array: First row is not an Array: " + std::string(e.what()));
111
+ }
112
+ int cols = first_row.size();
113
+
114
+ Alglib2DArray result;
115
+ result.setlength(rows, cols);
116
+
117
+ for (int i = 0; i < rows; ++i)
118
+ {
119
+ Array row;
120
+ try
121
+ {
122
+ row = Rice::detail::From_Ruby<Array>().convert(ruby_array[i].value());
123
+ }
124
+ catch (const std::exception &e)
125
+ {
126
+ throw std::invalid_argument(
127
+ "ruby_array_to_alglib_2d_array: Row " + std::to_string(i) +
128
+ " is not an Array: " + e.what());
129
+ }
130
+ if (row.size() != cols)
131
+ {
132
+ throw std::invalid_argument(
133
+ "ruby_array_to_alglib_2d_array: Row " + std::to_string(i) +
134
+ " size mismatch: expected " + std::to_string(cols) +
135
+ ", got " + std::to_string(row.size()));
136
+ }
137
+ for (int j = 0; j < cols; ++j)
138
+ {
139
+ try
140
+ {
141
+ result[i][j] = Rice::detail::From_Ruby<CType>().convert(row[j].value());
142
+ }
143
+ catch (const std::exception &e)
144
+ {
145
+ throw std::invalid_argument(
146
+ "ruby_array_to_alglib_2d_array: Element (" +
147
+ std::to_string(i) + "," + std::to_string(j) +
148
+ ") conversion failed: " + e.what());
149
+ }
150
+ }
151
+ }
152
+ return result;
153
+ }
154
+
155
+ /**
156
+ * @brief Template implementation: Convert an ALGLIB 2D array to a Ruby 2D Array (Array of Arrays).
157
+ */
158
+ template <typename Alglib2DArray>
159
+ Array alglib_2d_array_to_ruby_array(const Alglib2DArray &arr)
160
+ {
161
+ Array result;
162
+ for (int i = 0; i < arr.rows(); i++)
163
+ {
164
+ Array row;
165
+ for (int j = 0; j < arr.cols(); j++)
166
+ {
167
+ row.push(arr[i][j]);
168
+ }
169
+ result.push(row);
170
+ }
171
+ return result;
172
+ }
173
+
174
+ /**
175
+ * @brief Explicit template instantiations for 1D/2D real/integer ALGLIB arrays.
176
+ * This ensures symmetric conversion support for both real and integer types.
177
+ */
178
+
179
+ // 1D real
180
+ template alglib::real_1d_array ruby_array_to_alglib_1d_array<alglib::real_1d_array, double>(Array);
181
+ template Array alglib_1d_array_to_ruby_array<alglib::real_1d_array>(const alglib::real_1d_array &);
182
+
183
+ // 1D integer
184
+ template alglib::integer_1d_array ruby_array_to_alglib_1d_array<alglib::integer_1d_array, int>(Array);
185
+ template Array alglib_1d_array_to_ruby_array<alglib::integer_1d_array>(const alglib::integer_1d_array &);
186
+
187
+ // 2D real
188
+ template alglib::real_2d_array ruby_array_to_alglib_2d_array<alglib::real_2d_array, double>(Array);
189
+ template Array alglib_2d_array_to_ruby_array<alglib::real_2d_array>(const alglib::real_2d_array &);
190
+
191
+ // 2D integer
192
+ template alglib::integer_2d_array ruby_array_to_alglib_2d_array<alglib::integer_2d_array, int>(Array);
193
+ template Array alglib_2d_array_to_ruby_array<alglib::integer_2d_array>(const alglib::integer_2d_array &);
@@ -0,0 +1,56 @@
1
+ #pragma once
2
+ #include <rice/rice.hpp>
3
+ #include <rice/stl.hpp>
4
+ #include "ap.h"
5
+
6
+ using namespace Rice;
7
+
8
+ /**
9
+ * @brief Convert a Ruby Array to an ALGLIB 1D array (e.g., real_1d_array, integer_1d_array).
10
+ * @tparam AlglibArray ALGLIB array type (e.g., alglib::real_1d_array)
11
+ * @tparam CType C++ element type (e.g., double, int)
12
+ * @param ruby_array Ruby Array object
13
+ * @return Converted ALGLIB array
14
+ * @throw std::invalid_argument if conversion fails
15
+ */
16
+ template <typename AlglibArray, typename CType>
17
+ AlglibArray ruby_array_to_alglib_1d_array(Array ruby_array);
18
+
19
+ /**
20
+ * @brief Convert an ALGLIB 1D array to a Ruby Array.
21
+ * @tparam AlglibArray ALGLIB array type (e.g., alglib::real_1d_array)
22
+ * @param arr ALGLIB array
23
+ * @return Ruby Array object
24
+ */
25
+ template <typename AlglibArray>
26
+ Array alglib_1d_array_to_ruby_array(const AlglibArray &arr);
27
+
28
+ /**
29
+ * @brief Convert a Ruby 2D Array (Array of Arrays) to an ALGLIB 2D array (e.g., real_2d_array).
30
+ * @tparam Alglib2DArray ALGLIB 2D array type (e.g., alglib::real_2d_array)
31
+ * @tparam CType C++ element type (e.g., double)
32
+ * @param ruby_array Ruby Array of Arrays
33
+ * @return Converted ALGLIB 2D array
34
+ * @throw std::invalid_argument if conversion fails
35
+ */
36
+ template <typename Alglib2DArray, typename CType>
37
+ Alglib2DArray ruby_array_to_alglib_2d_array(Array ruby_array);
38
+
39
+ /**
40
+ * @brief Convert an ALGLIB 2D array to a Ruby 2D Array (Array of Arrays).
41
+ * @tparam Alglib2DArray ALGLIB 2D array type (e.g., alglib::real_2d_array)
42
+ * @param arr ALGLIB 2D array
43
+ * @return Ruby Array of Arrays
44
+ */
45
+ template <typename Alglib2DArray>
46
+ Array alglib_2d_array_to_ruby_array(const Alglib2DArray &arr);
47
+
48
+ // Existing function declarations for backward compatibility
49
+ alglib::real_1d_array ruby_array_to_real_1d_array(Array ruby_array);
50
+ alglib::integer_1d_array ruby_array_to_integer_1d_array(Array ruby_array);
51
+ alglib::real_2d_array ruby_array_to_real_2d_array(Array ruby_array);
52
+ alglib::integer_2d_array ruby_array_to_integer_2d_array(Array ruby_array);
53
+ Array real_1d_array_to_ruby_array(const alglib::real_1d_array &arr);
54
+ Array real_2d_array_to_ruby_array(const alglib::real_2d_array &real_array);
55
+ Array integer_1d_array_to_ruby_array(const alglib::integer_1d_array &arr);
56
+ Array integer_2d_array_to_ruby_array(const alglib::integer_2d_array &arr);
@@ -0,0 +1,14 @@
1
+ #include "alglib_dataanalysis.h"
2
+
3
+ // void pcabuildbasis(const real_2d_array &x, real_1d_array &s2, real_2d_array &v, const xparams _xparams = alglib::xdefault);
4
+ Hash rb_pcabuildbasis(Array x)
5
+ {
6
+ Hash result;
7
+ auto a = ruby_array_to_real_2d_array(x);
8
+ alglib::real_1d_array s2;
9
+ alglib::real_2d_array v;
10
+ alglib::pcabuildbasis(a, s2, v, alglib::xdefault);
11
+ result["s2"] = real_1d_array_to_ruby_array(s2);
12
+ result["v"] = real_2d_array_to_ruby_array(v);
13
+ return result;
14
+ }
@@ -0,0 +1,9 @@
1
+ #include <rice/rice.hpp>
2
+ #include <rice/stl.hpp>
3
+ #include "dataanalysis.h"
4
+ #include "alglib_converters.h"
5
+ #include "alglib_utils.h"
6
+
7
+ using namespace Rice;
8
+
9
+ Hash rb_pcabuildbasis(Array x);
@@ -0,0 +1,199 @@
1
+ #include "alglib_specialfunctions.h"
2
+
3
+ // double gammafunction(const double x, const xparams _xparams = alglib::xdefault);
4
+ double rb_gammafunction(double x)
5
+ {
6
+ return alglib::gammafunction(x);
7
+ }
8
+
9
+ // double lngamma(const double x, double &sgngam, const xparams _xparams = alglib::xdefault);
10
+ Array rb_lngamma(double x)
11
+ {
12
+ Array result = Array(rb_ary_new2(2));
13
+ double sgngam;
14
+ result.push(alglib::lngamma(x, sgngam));
15
+ result.push(sgngam);
16
+ return result;
17
+ }
18
+
19
+ // double errorfunction(const double x, const xparams _xparams = alglib::xdefault);
20
+ double rb_errorfunction(double x)
21
+ {
22
+ return alglib::errorfunction(x);
23
+ }
24
+
25
+ // double errorfunctionc(const double x, const xparams _xparams = alglib::xdefault);
26
+ double rb_errorfunctionc(double x)
27
+ {
28
+ return alglib::errorfunctionc(x);
29
+ }
30
+
31
+ // double normalpdf(const double x, const xparams _xparams = alglib::xdefault);
32
+ double rb_normalpdf(double x)
33
+ {
34
+ return alglib::normalpdf(x);
35
+ }
36
+
37
+ // double normalcdf(const double x, const xparams _xparams = alglib::xdefault);
38
+ double rb_normalcdf(double x)
39
+ {
40
+ return alglib::normalcdf(x);
41
+ }
42
+
43
+ // double inverf(const double e, const xparams _xparams = alglib::xdefault);
44
+ double rb_inverf(double e)
45
+ {
46
+ return alglib::inverf(e);
47
+ }
48
+
49
+ // double invnormalcdf(const double y0, const xparams _xparams = alglib::xdefault);
50
+ double rb_invnormalcdf(double y0)
51
+ {
52
+ return alglib::invnormalcdf(y0);
53
+ }
54
+
55
+ // double bivariatenormalpdf(const double x, const double y, const double rho, const xparams _xparams = alglib::xdefault);
56
+ double rb_bivariatenormalpdf(double x, double y, double rho)
57
+ {
58
+ return alglib::bivariatenormalpdf(x, y, rho);
59
+ }
60
+
61
+ // double bivariatenormalcdf(const double x, const double y, const double rho, const xparams _xparams = alglib::xdefault);
62
+ double rb_bivariatenormalcdf(double x, double y, double rho)
63
+ {
64
+ return alglib::bivariatenormalcdf(x, y, rho);
65
+ }
66
+
67
+ // double incompletebeta(const double a, const double b, const double x, const xparams _xparams = alglib::xdefault);
68
+ double rb_incompletebeta(double a, double b, double x)
69
+ {
70
+ return alglib::incompletebeta(a, b, x);
71
+ }
72
+
73
+ // double invincompletebeta(const double a, const double b, const double y, const xparams _xparams = alglib::xdefault);
74
+ double rb_invincompletebeta(double a, double b, double y)
75
+ {
76
+ return alglib::invincompletebeta(a, b, y);
77
+ }
78
+
79
+ // double studenttdistribution(const ae_int_t k, const double t, const xparams _xparams = alglib::xdefault);
80
+ double rb_studenttdistribution(alglib::ae_int_t k, double t)
81
+ {
82
+ return alglib::studenttdistribution(k, t);
83
+ }
84
+
85
+ // double invstudenttdistribution(const ae_int_t k, const double p, const xparams _xparams = alglib::xdefault);
86
+ double rb_invstudenttdistribution(alglib::ae_int_t k, double p)
87
+ {
88
+ return alglib::invstudenttdistribution(k, p);
89
+ }
90
+
91
+ // double fdistribution(const ae_int_t a, const ae_int_t b, const double x, const xparams _xparams = alglib::xdefault);
92
+ double rb_fdistribution(alglib::ae_int_t a, alglib::ae_int_t b, double x)
93
+ {
94
+ return alglib::fdistribution(a, b, x);
95
+ }
96
+
97
+ // double fcdistribution(const ae_int_t a, const ae_int_t b, const double x, const xparams _xparams = alglib::xdefault);
98
+ double rb_fcdistribution(alglib::ae_int_t a, alglib::ae_int_t b, double x)
99
+ {
100
+ return alglib::fcdistribution(a, b, x);
101
+ }
102
+
103
+ // double invfdistribution(const ae_int_t a, const ae_int_t b, const double y, const xparams _xparams = alglib::xdefault);
104
+ double rb_invfdistribution(alglib::ae_int_t a, alglib::ae_int_t b, double y)
105
+ {
106
+ return alglib::invfdistribution(a, b, y);
107
+ }
108
+
109
+ // double incompletegamma(const double a, const double x, const xparams _xparams = alglib::xdefault);
110
+ double rb_incompletegamma(double a, double x)
111
+ {
112
+ return alglib::incompletegamma(a, x);
113
+ }
114
+
115
+ // double incompletegammac(const double a, const double x, const xparams _xparams = alglib::xdefault);
116
+ double rb_incompletegammac(double a, double x)
117
+ {
118
+ return alglib::incompletegammac(a, x);
119
+ }
120
+
121
+ // double invincompletegammac(const double a, const double y0, const xparams _xparams = alglib::xdefault);
122
+ double rb_invincompletegammac(double a, double y0)
123
+ {
124
+ return alglib::invincompletegammac(a, y0);
125
+ }
126
+
127
+ // double chisquaredistribution(const double v, const double x, const xparams _xparams = alglib::xdefault);
128
+ double rb_chisquaredistribution(double v, double x)
129
+ {
130
+ return alglib::chisquaredistribution(v, x);
131
+ }
132
+
133
+ // double chisquarecdistribution(const double v, const double x, const xparams _xparams = alglib::xdefault);
134
+ double rb_chisquarecdistribution(double v, double x)
135
+ {
136
+ return alglib::chisquarecdistribution(v, x);
137
+ }
138
+
139
+ // double invchisquaredistribution(const double v, const double y, const xparams _xparams = alglib::xdefault);
140
+ double rb_invchisquaredistribution(double v, double y)
141
+ {
142
+ return alglib::invchisquaredistribution(v, y);
143
+ }
144
+
145
+ // double binomialdistribution(const ae_int_t k, const ae_int_t n, const double p, const xparams _xparams = alglib::xdefault);
146
+ double rb_binomialdistribution(alglib::ae_int_t k, alglib::ae_int_t n, double p)
147
+ {
148
+ return alglib::binomialdistribution(k, n, p);
149
+ }
150
+
151
+ // double binomialcdistribution(const ae_int_t k, const ae_int_t n, const double p, const xparams _xparams = alglib::xdefault);
152
+ double rb_binomialcdistribution(alglib::ae_int_t k, alglib::ae_int_t n, double p)
153
+ {
154
+ return alglib::binomialcdistribution(k, n, p);
155
+ }
156
+
157
+ // double invbinomialdistribution(const ae_int_t k, const ae_int_t n, const double y, const xparams _xparams = alglib::xdefault);
158
+ double rb_invbinomialdistribution(alglib::ae_int_t k, alglib::ae_int_t n, double y)
159
+ {
160
+ return alglib::invbinomialdistribution(k, n, y);
161
+ }
162
+
163
+ // double exponentialintegralei(const double x, const xparams _xparams = alglib::xdefault);
164
+ double rb_exponentialintegralei(double x)
165
+ {
166
+ return alglib::exponentialintegralei(x);
167
+ }
168
+
169
+ // double exponentialintegralen(const double x, const ae_int_t n, const xparams _xparams = alglib::xdefault);
170
+ double rb_exponentialintegralen(double x, alglib::ae_int_t n)
171
+ {
172
+ return alglib::exponentialintegralen(x, n);
173
+ }
174
+
175
+ //
176
+
177
+ // double poissondistribution(const ae_int_t k, const double m, const xparams _xparams = alglib::xdefault);
178
+ double rb_poissondistribution(alglib::ae_int_t k, double m)
179
+ {
180
+ return alglib::poissondistribution(k, m);
181
+ }
182
+
183
+ // double poissoncdistribution(const ae_int_t k, const double m, const xparams _xparams = alglib::xdefault);
184
+ double rb_poissoncdistribution(alglib::ae_int_t k, double m)
185
+ {
186
+ return alglib::poissoncdistribution(k, m);
187
+ }
188
+
189
+ // double invpoissondistribution(const ae_int_t k, const double y, const xparams _xparams = alglib::xdefault);
190
+ double rb_invpoissondistribution(alglib::ae_int_t k, double y)
191
+ {
192
+ return alglib::invpoissondistribution(k, y);
193
+ }
194
+
195
+ // double beta(const double a, const double b, const xparams _xparams = alglib::xdefault);
196
+ double rb_beta(double a, double b)
197
+ {
198
+ return alglib::beta(a, b);
199
+ }
@@ -0,0 +1,41 @@
1
+ #include <rice/rice.hpp>
2
+ #include <rice/stl.hpp>
3
+ #include "specialfunctions.h"
4
+ #include "alglib_converters.h"
5
+ #include "alglib_utils.h"
6
+
7
+ using namespace Rice;
8
+
9
+ double rb_gammafunction(double x);
10
+ Array rb_lngamma(double x);
11
+ double rb_errorfunction(double x);
12
+ double rb_errorfunctionc(double x);
13
+ double rb_normalpdf(double x);
14
+ double rb_normalcdf(double x);
15
+ double rb_inverf(double e);
16
+ double rb_invnormalcdf(double y0);
17
+ double rb_bivariatenormalpdf(double x, double y, double rho);
18
+ double rb_bivariatenormalcdf(double x, double y, double rho);
19
+ double rb_incompletebeta(double a, double b, double x);
20
+ double rb_invincompletebeta(double a, double b, double y);
21
+ double rb_studenttdistribution(alglib::ae_int_t k, double t);
22
+ double rb_invstudenttdistribution(alglib::ae_int_t k, double p);
23
+ double rb_fdistribution(alglib::ae_int_t a, alglib::ae_int_t b, double x);
24
+ double rb_fcdistribution(alglib::ae_int_t a, alglib::ae_int_t b, double x);
25
+ double rb_invfdistribution(alglib::ae_int_t a, alglib::ae_int_t b, double y);
26
+ double rb_incompletegamma(double a, double x);
27
+ double rb_incompletegammac(double a, double x);
28
+ double rb_invincompletegammac(double a, double y0);
29
+ double rb_chisquaredistribution(double v, double x);
30
+ double rb_chisquarecdistribution(double v, double x);
31
+ double rb_invchisquaredistribution(double v, double y);
32
+ double rb_binomialdistribution(alglib::ae_int_t k, alglib::ae_int_t n, double p);
33
+ double rb_binomialcdistribution(alglib::ae_int_t k, alglib::ae_int_t n, double p);
34
+ double rb_invbinomialdistribution(alglib::ae_int_t k, alglib::ae_int_t n, double y);
35
+ double rb_exponentialintegralei(double x);
36
+ double rb_exponentialintegralen(double x, alglib::ae_int_t n);
37
+
38
+ double rb_poissondistribution(alglib::ae_int_t k, double m);
39
+ double rb_poissoncdistribution(alglib::ae_int_t k, double m);
40
+ double rb_invpoissondistribution(alglib::ae_int_t k, double y);
41
+ double rb_beta(double a, double b);