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