3146
|
1 /* |
|
2 |
|
3 Copyright (C) 1996, 1997 John W. Eaton |
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
7016
|
9 Free Software Foundation; either version 3 of the License, or (at your |
|
10 option) any later version. |
3146
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
7016
|
18 along with Octave; see the file COPYING. If not, see |
|
19 <http://www.gnu.org/licenses/>. |
3146
|
20 |
|
21 */ |
|
22 |
|
23 #if !defined (octave_liboctave_specfun_h) |
|
24 #define octave_liboctave_specfun_h 1 |
|
25 |
3220
|
26 #include "oct-cmplx.h" |
5275
|
27 #include "oct-types.h" |
4844
|
28 #include "ArrayN.h" |
3220
|
29 |
|
30 template <class T> class Array2; |
3146
|
31 class Matrix; |
3220
|
32 class ComplexMatrix; |
4844
|
33 class NDArray; |
|
34 class ComplexNDArray; |
3220
|
35 class RowVector; |
|
36 class ComplexColumnVector; |
3146
|
37 class Range; |
|
38 |
|
39 #if !defined (HAVE_ACOSH) |
6108
|
40 extern OCTAVE_API double acosh (double); |
3146
|
41 #endif |
|
42 |
|
43 #if !defined (HAVE_ASINH) |
6108
|
44 extern OCTAVE_API double asinh (double); |
3146
|
45 #endif |
|
46 |
|
47 #if !defined (HAVE_ATANH) |
6108
|
48 extern OCTAVE_API double atanh (double); |
3146
|
49 #endif |
|
50 |
|
51 #if !defined (HAVE_ERF) |
6108
|
52 extern OCTAVE_API double erf (double); |
3146
|
53 #endif |
|
54 |
|
55 #if !defined (HAVE_ERFC) |
6108
|
56 extern OCTAVE_API double erfc (double); |
3146
|
57 #endif |
|
58 |
6108
|
59 extern OCTAVE_API double xgamma (double x); |
|
60 extern OCTAVE_API double xlgamma (double x); |
3146
|
61 |
6108
|
62 extern OCTAVE_API Complex |
5275
|
63 besselj (double alpha, const Complex& x, bool scaled, octave_idx_type& ierr); |
3220
|
64 |
6108
|
65 extern OCTAVE_API Complex |
5275
|
66 bessely (double alpha, const Complex& x, bool scaled, octave_idx_type& ierr); |
3220
|
67 |
6108
|
68 extern OCTAVE_API Complex |
5275
|
69 besseli (double alpha, const Complex& x, bool scaled, octave_idx_type& ierr); |
3220
|
70 |
6108
|
71 extern OCTAVE_API Complex |
5275
|
72 besselk (double alpha, const Complex& x, bool scaled, octave_idx_type& ierr); |
3220
|
73 |
6108
|
74 extern OCTAVE_API Complex |
5275
|
75 besselh1 (double alpha, const Complex& x, bool scaled, octave_idx_type& ierr); |
3220
|
76 |
6108
|
77 extern OCTAVE_API Complex |
5275
|
78 besselh2 (double alpha, const Complex& x, bool scaled, octave_idx_type& ierr); |
3220
|
79 |
6108
|
80 extern OCTAVE_API ComplexMatrix |
3220
|
81 besselj (double alpha, const ComplexMatrix& x, bool scaled, |
5275
|
82 Array2<octave_idx_type>& ierr); |
3220
|
83 |
6108
|
84 extern OCTAVE_API ComplexMatrix |
3220
|
85 bessely (double alpha, const ComplexMatrix& x, bool scaled, |
5275
|
86 Array2<octave_idx_type>& ierr); |
3220
|
87 |
6108
|
88 extern OCTAVE_API ComplexMatrix |
3220
|
89 besseli (double alpha, const ComplexMatrix& x, bool scaled, |
5275
|
90 Array2<octave_idx_type>& ierr); |
3220
|
91 |
6108
|
92 extern OCTAVE_API ComplexMatrix |
3220
|
93 besselk (double alpha, const ComplexMatrix& x, bool scaled, |
5275
|
94 Array2<octave_idx_type>& ierr); |
3220
|
95 |
6108
|
96 extern OCTAVE_API ComplexMatrix |
3220
|
97 besselh1 (double alpha, const ComplexMatrix& x, bool scaled, |
5275
|
98 Array2<octave_idx_type>& ierr); |
3220
|
99 |
6108
|
100 extern OCTAVE_API ComplexMatrix |
3220
|
101 besselh2 (double alpha, const ComplexMatrix& x, bool scaled, |
5275
|
102 Array2<octave_idx_type>& ierr); |
3220
|
103 |
6108
|
104 extern OCTAVE_API ComplexMatrix |
3220
|
105 besselj (const Matrix& alpha, const Complex& x, bool scaled, |
5275
|
106 Array2<octave_idx_type>& ierr); |
3220
|
107 |
6108
|
108 extern OCTAVE_API ComplexMatrix |
3220
|
109 bessely (const Matrix& alpha, const Complex& x, bool scaled, |
5275
|
110 Array2<octave_idx_type>& ierr); |
3220
|
111 |
6108
|
112 extern OCTAVE_API ComplexMatrix |
3220
|
113 besseli (const Matrix& alpha, const Complex& x, bool scaled, |
5275
|
114 Array2<octave_idx_type>& ierr); |
3220
|
115 |
6108
|
116 extern OCTAVE_API ComplexMatrix |
3220
|
117 besselk (const Matrix& alpha, const Complex& x, bool scaled, |
5275
|
118 Array2<octave_idx_type>& ierr); |
3146
|
119 |
6108
|
120 extern OCTAVE_API ComplexMatrix |
3220
|
121 besselh1 (const Matrix& alpha, const Complex& x, bool scaled, |
5275
|
122 Array2<octave_idx_type>& ierr); |
3220
|
123 |
6108
|
124 extern OCTAVE_API ComplexMatrix |
3220
|
125 besselh2 (const Matrix& alpha, const Complex& x, bool scaled, |
5275
|
126 Array2<octave_idx_type>& ierr); |
3220
|
127 |
6108
|
128 extern OCTAVE_API ComplexMatrix |
3220
|
129 besselj (const Matrix& alpha, const ComplexMatrix& x, bool scaled, |
5275
|
130 Array2<octave_idx_type>& ierr); |
3220
|
131 |
6108
|
132 extern OCTAVE_API ComplexMatrix |
3220
|
133 bessely (const Matrix& alpha, const ComplexMatrix& x, bool scaled, |
5275
|
134 Array2<octave_idx_type>& ierr); |
3220
|
135 |
6108
|
136 extern OCTAVE_API ComplexMatrix |
3220
|
137 besseli (const Matrix& alpha, const ComplexMatrix& x, bool scaled, |
5275
|
138 Array2<octave_idx_type>& ierr); |
3220
|
139 |
6108
|
140 extern OCTAVE_API ComplexMatrix |
3220
|
141 besselk (const Matrix& alpha, const ComplexMatrix& x, bool scaled, |
5275
|
142 Array2<octave_idx_type>& ierr); |
3220
|
143 |
6108
|
144 extern OCTAVE_API ComplexMatrix |
3220
|
145 besselh1 (const Matrix& alpha, const ComplexMatrix& x, bool scaled, |
5275
|
146 Array2<octave_idx_type>& ierr); |
3220
|
147 |
6108
|
148 extern OCTAVE_API ComplexMatrix |
3220
|
149 besselh2 (const Matrix& alpha, const ComplexMatrix& x, bool scaled, |
5275
|
150 Array2<octave_idx_type>& ierr); |
3220
|
151 |
6108
|
152 extern OCTAVE_API ComplexNDArray |
4844
|
153 besselj (double alpha, const ComplexNDArray& x, bool scaled, |
5275
|
154 ArrayN<octave_idx_type>& ierr); |
4844
|
155 |
6108
|
156 extern OCTAVE_API ComplexNDArray |
4844
|
157 bessely (double alpha, const ComplexNDArray& x, bool scaled, |
5275
|
158 ArrayN<octave_idx_type>& ierr); |
4844
|
159 |
6108
|
160 extern OCTAVE_API ComplexNDArray |
4844
|
161 besseli (double alpha, const ComplexNDArray& x, bool scaled, |
5275
|
162 ArrayN<octave_idx_type>& ierr); |
4844
|
163 |
6108
|
164 extern OCTAVE_API ComplexNDArray |
4844
|
165 besselk (double alpha, const ComplexNDArray& x, bool scaled, |
5275
|
166 ArrayN<octave_idx_type>& ierr); |
4844
|
167 |
6108
|
168 extern OCTAVE_API ComplexNDArray |
4844
|
169 besselh1 (double alpha, const ComplexNDArray& x, bool scaled, |
5275
|
170 ArrayN<octave_idx_type>& ierr); |
4844
|
171 |
6108
|
172 extern OCTAVE_API ComplexNDArray |
4844
|
173 besselh2 (double alpha, const ComplexNDArray& x, bool scaled, |
5275
|
174 ArrayN<octave_idx_type>& ierr); |
4844
|
175 |
6108
|
176 extern OCTAVE_API ComplexNDArray |
4844
|
177 besselj (const NDArray& alpha, const Complex& x, bool scaled, |
5275
|
178 ArrayN<octave_idx_type>& ierr); |
4844
|
179 |
6108
|
180 extern OCTAVE_API ComplexNDArray |
4844
|
181 bessely (const NDArray& alpha, const Complex& x, bool scaled, |
5275
|
182 ArrayN<octave_idx_type>& ierr); |
4844
|
183 |
6108
|
184 extern OCTAVE_API ComplexNDArray |
4844
|
185 besseli (const NDArray& alpha, const Complex& x, bool scaled, |
5275
|
186 ArrayN<octave_idx_type>& ierr); |
4844
|
187 |
6108
|
188 extern OCTAVE_API ComplexNDArray |
4844
|
189 besselk (const NDArray& alpha, const Complex& x, bool scaled, |
5275
|
190 ArrayN<octave_idx_type>& ierr); |
4844
|
191 |
6108
|
192 extern OCTAVE_API ComplexNDArray |
4844
|
193 besselh1 (const NDArray& alpha, const Complex& x, bool scaled, |
5275
|
194 ArrayN<octave_idx_type>& ierr); |
4844
|
195 |
6108
|
196 extern OCTAVE_API ComplexNDArray |
4844
|
197 besselh2 (const NDArray& alpha, const Complex& x, bool scaled, |
5275
|
198 ArrayN<octave_idx_type>& ierr); |
4844
|
199 |
6108
|
200 extern OCTAVE_API ComplexNDArray |
4844
|
201 besselj (const NDArray& alpha, const ComplexNDArray& x, bool scaled, |
5275
|
202 ArrayN<octave_idx_type>& ierr); |
4844
|
203 |
6108
|
204 extern OCTAVE_API ComplexNDArray |
4844
|
205 bessely (const NDArray& alpha, const ComplexNDArray& x, bool scaled, |
5275
|
206 ArrayN<octave_idx_type>& ierr); |
4844
|
207 |
6108
|
208 extern OCTAVE_API ComplexNDArray |
4844
|
209 besseli (const NDArray& alpha, const ComplexNDArray& x, bool scaled, |
5275
|
210 ArrayN<octave_idx_type>& ierr); |
4844
|
211 |
6108
|
212 extern OCTAVE_API ComplexNDArray |
4844
|
213 besselk (const NDArray& alpha, const ComplexNDArray& x, bool scaled, |
5275
|
214 ArrayN<octave_idx_type>& ierr); |
4844
|
215 |
6108
|
216 extern OCTAVE_API ComplexNDArray |
4844
|
217 besselh1 (const NDArray& alpha, const ComplexNDArray& x, bool scaled, |
5275
|
218 ArrayN<octave_idx_type>& ierr); |
4844
|
219 |
6108
|
220 extern OCTAVE_API ComplexNDArray |
4844
|
221 besselh2 (const NDArray& alpha, const ComplexNDArray& x, bool scaled, |
5275
|
222 ArrayN<octave_idx_type>& ierr); |
4844
|
223 |
6108
|
224 extern OCTAVE_API ComplexMatrix |
3220
|
225 besselj (const RowVector& alpha, const ComplexColumnVector& x, bool scaled, |
5275
|
226 Array2<octave_idx_type>& ierr); |
3220
|
227 |
6108
|
228 extern OCTAVE_API ComplexMatrix |
3220
|
229 bessely (const RowVector& alpha, const ComplexColumnVector& x, bool scaled, |
5275
|
230 Array2<octave_idx_type>& ierr); |
3220
|
231 |
6108
|
232 extern OCTAVE_API ComplexMatrix |
3220
|
233 besseli (const RowVector& alpha, const ComplexColumnVector& x, bool scaled, |
5275
|
234 Array2<octave_idx_type>& ierr); |
3220
|
235 |
6108
|
236 extern OCTAVE_API ComplexMatrix |
3220
|
237 besselk (const RowVector& alpha, const ComplexColumnVector& x, bool scaled, |
5275
|
238 Array2<octave_idx_type>& ierr); |
3220
|
239 |
6108
|
240 extern OCTAVE_API ComplexMatrix |
3220
|
241 besselh1 (const RowVector& alpha, const ComplexColumnVector& x, bool scaled, |
5275
|
242 Array2<octave_idx_type>& ierr); |
3220
|
243 |
6108
|
244 extern OCTAVE_API ComplexMatrix |
3220
|
245 besselh2 (const RowVector& alpha, const ComplexColumnVector& x, bool scaled, |
5275
|
246 Array2<octave_idx_type>& ierr); |
3220
|
247 |
6108
|
248 extern OCTAVE_API Complex airy (const Complex& z, bool deriv, bool scaled, octave_idx_type& ierr); |
|
249 extern OCTAVE_API Complex biry (const Complex& z, bool deriv, bool scaled, octave_idx_type& ierr); |
3220
|
250 |
6108
|
251 extern OCTAVE_API ComplexMatrix |
5275
|
252 airy (const ComplexMatrix& z, bool deriv, bool scaled, Array2<octave_idx_type>& ierr); |
3220
|
253 |
6108
|
254 extern OCTAVE_API ComplexMatrix |
5275
|
255 biry (const ComplexMatrix& z, bool deriv, bool scaled, Array2<octave_idx_type>& ierr); |
3146
|
256 |
6108
|
257 extern OCTAVE_API ComplexNDArray |
5275
|
258 airy (const ComplexNDArray& z, bool deriv, bool scaled, ArrayN<octave_idx_type>& ierr); |
4844
|
259 |
6108
|
260 extern OCTAVE_API ComplexNDArray |
5275
|
261 biry (const ComplexNDArray& z, bool deriv, bool scaled, ArrayN<octave_idx_type>& ierr); |
4844
|
262 |
6108
|
263 extern OCTAVE_API double betainc (double x, double a, double b); |
|
264 extern OCTAVE_API Matrix betainc (double x, double a, const Matrix& b); |
|
265 extern OCTAVE_API Matrix betainc (double x, const Matrix& a, double b); |
|
266 extern OCTAVE_API Matrix betainc (double x, const Matrix& a, const Matrix& b); |
3146
|
267 |
6108
|
268 extern OCTAVE_API NDArray betainc (double x, double a, const NDArray& b); |
|
269 extern OCTAVE_API NDArray betainc (double x, const NDArray& a, double b); |
|
270 extern OCTAVE_API NDArray betainc (double x, const NDArray& a, const NDArray& b); |
4844
|
271 |
6108
|
272 extern OCTAVE_API Matrix betainc (const Matrix& x, double a, double b); |
|
273 extern OCTAVE_API Matrix betainc (const Matrix& x, double a, const Matrix& b); |
|
274 extern OCTAVE_API Matrix betainc (const Matrix& x, const Matrix& a, double b); |
|
275 extern OCTAVE_API Matrix betainc (const Matrix& x, const Matrix& a, const Matrix& b); |
3146
|
276 |
6108
|
277 extern OCTAVE_API NDArray betainc (const NDArray& x, double a, double b); |
|
278 extern OCTAVE_API NDArray betainc (const NDArray& x, double a, const NDArray& b); |
|
279 extern OCTAVE_API NDArray betainc (const NDArray& x, const NDArray& a, double b); |
|
280 extern OCTAVE_API NDArray betainc (const NDArray& x, const NDArray& a, const NDArray& b); |
4844
|
281 |
6108
|
282 extern OCTAVE_API double gammainc (double x, double a, bool& err); |
|
283 extern OCTAVE_API Matrix gammainc (double x, const Matrix& a); |
|
284 extern OCTAVE_API Matrix gammainc (const Matrix& x, double a); |
|
285 extern OCTAVE_API Matrix gammainc (const Matrix& x, const Matrix& a); |
3146
|
286 |
6108
|
287 extern OCTAVE_API NDArray gammainc (double x, const NDArray& a); |
|
288 extern OCTAVE_API NDArray gammainc (const NDArray& x, double a); |
|
289 extern OCTAVE_API NDArray gammainc (const NDArray& x, const NDArray& a); |
4844
|
290 |
4004
|
291 inline double gammainc (double x, double a) |
|
292 { |
|
293 bool err; |
|
294 return gammainc (x, a, err); |
|
295 } |
|
296 |
3146
|
297 #endif |
|
298 |
|
299 /* |
|
300 ;;; Local Variables: *** |
|
301 ;;; mode: C *** |
|
302 ;;; page-delimiter: "^/\\*" *** |
|
303 ;;; End: *** |
|
304 */ |