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