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