00001 #ifndef BESSEL_H
00002 #define BESSEL_H
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef ZMENVIRONMENT_H
00012 #include "ZMutility/ZMenvironment.h"
00013 #endif
00014 #include <utility>
00015 #include <vector>
00016
00017 ZM_BEGIN_NAMESPACE( zmsf )
00018
00019 typedef std::vector<double> Dvector;
00020 typedef std::pair<double,double> Dpair;
00021
00026
00027 struct Bessel {
00028
00030 static double J0( const double x );
00031
00033 static Dpair J0Err( const double x );
00034
00036 static double J1( const double x );
00037
00039 static Dpair J1Err( const double x );
00040
00042 static double Jn( const int n, const double x );
00043
00045 static Dpair JnErr( const int n, const double x );
00046
00048 static Dvector JnArray( const int nmin, const int nmax, const double x );
00049
00051 static Dvector JnErrArray( const int nmin, const int nmax, const double x );
00052
00054 static double Y0( const double x );
00055
00057 static Dpair Y0Err( const double x );
00058
00060 static double Y1( const double x );
00061
00063 static Dpair Y1Err( const double x );
00064
00066 static double Yn( const int n, const double x );
00067
00069 static Dpair YnErr( const int n, const double x );
00070
00072 static Dvector YnArray( const int nmin, const int nmax, const double x );
00073
00075 static Dvector YnErrArray( const int nmin, const int nmax, const double x );
00076
00078 static double I0( const double x );
00079
00081 static Dpair I0Err( const double x );
00082
00084 static double I1( const double x );
00085
00087 static Dpair I1Err( const double x );
00088
00090 static double In( const int n, const double x );
00091
00093 static Dpair InErr( const int n, const double x );
00094
00096 static Dvector InArray( const int nmin, const int nmax, const double x );
00097
00099 static Dvector InErrArray( const int nmin, const int nmax, const double x );
00100
00102 static double I0Scaled( const double x );
00103
00105 static Dpair I0ErrScaled( const double x );
00106
00108 static double I1Scaled( const double x );
00109
00111 static Dpair I1ErrScaled( const double x );
00112
00114 static double InScaled( const int n, const double x );
00115
00117 static Dpair InErrScaled( const int n, const double x );
00118
00120 static Dvector InArrayScaled( const int nmin, const int nmax, const double x );
00121
00123 static Dvector InErrArrayScaled( const int nmin, const int nmax, const double x );
00124
00126 static double K0( const double x );
00127
00129 static Dpair K0Err( const double x );
00130
00132 static double K1( const double x );
00133
00135 static Dpair K1Err( const double x );
00136
00138 static double Kn( const int n, const double x );
00139
00141 static Dpair KnErr( const int n, const double x );
00142
00144 static Dvector KnArray( const int nmin, const int nmax, const double x );
00145
00147 static Dvector KnErrArray( const int nmin, const int nmax, const double x );
00148
00150 static double K0Scaled( const double x );
00151
00153 static Dpair K0ErrScaled( const double x );
00154
00156 static double K1Scaled( const double x );
00157
00159 static Dpair K1ErrScaled( const double x );
00160
00162 static double KnScaled( const int n, const double x );
00163
00165 static Dpair KnErrScaled( const int n, const double x );
00166
00168 static Dvector KnArrayScaled( const int nmin, const int nmax, const double x );
00169
00171 static Dvector KnErrArrayScaled( const int nmin, const int nmax, const double x );
00172
00174 static double RegularSphericalJ0( const double x );
00175
00177 static Dpair RegularSphericalJ0Err( const double x );
00178
00180 static double RegularSphericalJ1( const double x );
00181
00183 static Dpair RegularSphericalJ1Err( const double x );
00184
00186 static double RegularSphericalJ2( const double x );
00187
00189 static Dpair RegularSphericalJ2Err( const double x );
00190
00192 static double RegularSphericalJn( const int n, const double x );
00193
00195 static Dpair RegularSphericalJnErr( const int n, const double x );
00196
00198 static Dvector RegularSphericalJnArray( const int nmax, const double x );
00199
00201 static Dvector RegularSphericalJnErrArray( const int nmax, const double x );
00202
00204 static Dvector RegularSphericalJnSteedArray( const int nmax, const double x );
00205
00207 static double IrregularSphericalY0( const double x );
00208
00210 static Dpair IrregularSphericalY0Err( const double x );
00211
00213 static double IrregularSphericalY1( const double x );
00214
00216 static Dpair IrregularSphericalY1Err( const double x );
00217
00219 static double IrregularSphericalY2( const double x );
00220
00222 static Dpair IrregularSphericalY2Err( const double x );
00223
00225 static double IrregularSphericalYn( const int n, const double x );
00226
00228 static Dpair IrregularSphericalYnErr( const int n, const double x );
00229
00231 static Dvector IrregularSphericalYnArray( const int nmax, const double x );
00232
00234 static Dvector IrregularSphericalYnErrArray( const int nmax, const double x );
00235
00237 static double RegularModifiedSphericalJ0( const double x );
00238
00240 static Dpair RegularModifiedSphericalJ0Err( const double x );
00241
00243 static double RegularModifiedSphericalJ1( const double x );
00244
00246 static Dpair RegularModifiedSphericalJ1Err( const double x );
00247
00249 static double RegularModifiedSphericalJ2( const double x );
00250
00252 static Dpair RegularModifiedSphericalJ2Err( const double x );
00253
00255 static double RegularModifiedSphericalJn( const int n, const double x );
00256
00258 static Dpair RegularModifiedSphericalJnErr( const int n, const double x );
00259
00261 static Dvector RegularModifiedSphericalJnArray( const int nmax, const double x );
00262
00264 static Dvector RegularModifiedSphericalJnErrArray( const int nmax, const double x );
00265
00267 static double IrregularModifiedSphericalY0( const double x );
00268
00270 static Dpair IrregularModifiedSphericalY0Err( const double x );
00271
00273 static double IrregularModifiedSphericalY1( const double x );
00274
00276 static Dpair IrregularModifiedSphericalY1Err( const double x );
00277
00279 static double IrregularModifiedSphericalY2( const double x );
00280
00282 static Dpair IrregularModifiedSphericalY2Err( const double x );
00283
00285 static double IrregularModifiedSphericalYn( const int n, const double x );
00286
00288 static Dpair IrregularModifiedSphericalYnErr( const int n, const double x );
00289
00291 static Dvector IrregularModifiedSphericalYnArray( const int nmax, const double x );
00292
00294 static Dvector IrregularModifiedSphericalYnErrArray( const int nmax, const double x );
00295
00297 static double Jnu( const double nu, const double x );
00298
00300 static Dpair JnuErr( const double nu, const double x );
00301
00303 static Dvector JnuArray( const double nu, Dvector x );
00304
00306 static Dvector JnuErrArray( const double nu, Dvector x );
00307
00309 static double Ynu( const double nu, const double x );
00310
00312 static Dpair YnuErr( const double nu, const double x );
00313
00315 static double Inu( const double nu, const double x );
00316
00318 static Dpair InuErr( const double nu, const double x );
00319
00321 static double InuScaled( const double nu, const double x );
00322
00324 static Dpair InuErrScaled( const double nu, const double x );
00325
00327 static double Knu( const double nu, const double x );
00328
00330 static Dpair KnuErr( const double nu, const double x );
00331
00333 static double lnKnu( const double nu, const double x );
00334
00336 static Dpair lnKnuErr( const double nu, const double x );
00337
00339 static double KnuScaled( const double nu, const double x );
00340
00342 static Dpair KnuErrScaled( const double nu, const double x );
00343
00345 static double J0Zero( const int n );
00346
00348 static Dpair J0ZeroErr( const int n );
00349
00351 static double J1Zero( const int n );
00352
00353 #ifdef NOT_THERE
00354
00355 static Dpair J1ZeroErr( const int n );
00356 #endif
00357
00359 static double JnuZero( const double nu, const int n );
00360
00362 static Dpair JnuZeroErr( const double nu, const int n );
00363
00364
00365
00366
00367 };
00368
00369 ZM_END_NAMESPACE( zmsf )
00370
00371 #endif