[35] | 1 | /*! |
---|
| 2 | * \file |
---|
| 3 | * \brief Definitions of Bessel functions |
---|
| 4 | * \author Tony Ottosson |
---|
| 5 | * |
---|
| 6 | * ------------------------------------------------------------------------- |
---|
| 7 | * |
---|
| 8 | * IT++ - C++ library of mathematical, signal processing, speech processing, |
---|
| 9 | * and communications classes and functions |
---|
| 10 | * |
---|
| 11 | * Copyright (C) 1995-2007 (see AUTHORS file for a list of contributors) |
---|
| 12 | * |
---|
| 13 | * This program is free software; you can redistribute it and/or modify |
---|
| 14 | * it under the terms of the GNU General Public License as published by |
---|
| 15 | * the Free Software Foundation; either version 2 of the License, or |
---|
| 16 | * (at your option) any later version. |
---|
| 17 | * |
---|
| 18 | * This program is distributed in the hope that it will be useful, |
---|
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 21 | * GNU General Public License for more details. |
---|
| 22 | * |
---|
| 23 | * You should have received a copy of the GNU General Public License |
---|
| 24 | * along with this program; if not, write to the Free Software |
---|
| 25 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
| 26 | * |
---|
| 27 | * ------------------------------------------------------------------------- |
---|
| 28 | */ |
---|
| 29 | |
---|
| 30 | #ifndef BESSEL_H |
---|
| 31 | #define BESSEL_H |
---|
| 32 | |
---|
| 33 | #include <itpp/base/vec.h> |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | namespace itpp { |
---|
| 37 | |
---|
| 38 | /*! \addtogroup besselfunctions |
---|
| 39 | */ |
---|
| 40 | |
---|
| 41 | /*! |
---|
| 42 | \ingroup besselfunctions |
---|
| 43 | \brief Bessel function of first kind of order \a nu for \a nu integer |
---|
| 44 | |
---|
| 45 | The bessel function of first kind is defined as: |
---|
| 46 | \f[ |
---|
| 47 | J_{\nu}(x) = \sum_{k=0}^{\infty} \frac{ (-1)^{k} }{k! \Gamma(\nu+k+1) } \left(\frac{x}{2}\right)^{\nu+2k} |
---|
| 48 | \f] |
---|
| 49 | where \f$\nu\f$ is the order and \f$ 0 < x < \infty \f$. |
---|
| 50 | */ |
---|
| 51 | double besselj(int nu, double x); |
---|
| 52 | |
---|
| 53 | /*! |
---|
| 54 | \ingroup besselfunctions |
---|
| 55 | \brief Bessel function of first kind of order \a nu for \a nu integer |
---|
| 56 | */ |
---|
| 57 | vec besselj(int nu, const vec &x); |
---|
| 58 | |
---|
| 59 | /*! |
---|
| 60 | \ingroup besselfunctions |
---|
| 61 | \brief Bessel function of first kind of order \a nu. \a nu is real. |
---|
| 62 | */ |
---|
| 63 | double besselj(double nu, double x); |
---|
| 64 | |
---|
| 65 | /*! |
---|
| 66 | \ingroup besselfunctions |
---|
| 67 | \brief Bessel function of first kind of order \a nu. \a nu is real. |
---|
| 68 | */ |
---|
| 69 | vec besselj(double nu, const vec &x); |
---|
| 70 | |
---|
| 71 | /*! |
---|
| 72 | \ingroup besselfunctions |
---|
| 73 | \brief Bessel function of second kind of order \a nu. \a nu is integer. |
---|
| 74 | |
---|
| 75 | The Bessel function of second kind is defined as: |
---|
| 76 | \f[ |
---|
| 77 | Y_{\nu}(x) = \frac{J_{\nu}(x) \cos(\nu\pi) - J_{-\nu}(x)}{\sin(\nu\pi)} |
---|
| 78 | \f] |
---|
| 79 | where \f$\nu\f$ is the order and \f$ 0 < x < \infty \f$. |
---|
| 80 | */ |
---|
| 81 | double bessely(int nu, double x); |
---|
| 82 | |
---|
| 83 | /*! |
---|
| 84 | \ingroup besselfunctions |
---|
| 85 | \brief Bessel function of second kind of order \a nu. \a nu is integer. |
---|
| 86 | */ |
---|
| 87 | vec bessely(int nu, const vec &x); |
---|
| 88 | |
---|
| 89 | /*! |
---|
| 90 | \ingroup besselfunctions |
---|
| 91 | \brief Bessel function of second kind of order \a nu. \a nu is real. |
---|
| 92 | */ |
---|
| 93 | double bessely(double nu, double x); |
---|
| 94 | |
---|
| 95 | /*! |
---|
| 96 | \ingroup besselfunctions |
---|
| 97 | \brief Bessel function of second kind of order \a nu. \a nu is real. |
---|
| 98 | */ |
---|
| 99 | vec bessely(double nu, const vec &x); |
---|
| 100 | |
---|
| 101 | /*! |
---|
| 102 | \ingroup besselfunctions |
---|
| 103 | \brief Modified Bessel function of first kind of order \a nu. \a nu is \a double. \a x is \a double. |
---|
| 104 | |
---|
| 105 | The Modified Bessel function of first kind is defined as: |
---|
| 106 | \f[ |
---|
| 107 | I_{\nu}(x) = i^{-\nu} J_{\nu}(ix) |
---|
| 108 | \f] |
---|
| 109 | where \f$\nu\f$ is the order and \f$ 0 < x < \infty \f$. |
---|
| 110 | */ |
---|
| 111 | double besseli(double nu, double x); |
---|
| 112 | |
---|
| 113 | /*! |
---|
| 114 | \ingroup besselfunctions |
---|
| 115 | \brief Modified Bessel function of first kind of order \a nu. \a nu is \a double. \a x is \a double. |
---|
| 116 | */ |
---|
| 117 | vec besseli(double nu, const vec &x); |
---|
| 118 | |
---|
| 119 | /*! |
---|
| 120 | \ingroup besselfunctions |
---|
| 121 | \brief Modified Bessel function of second kind of order \a nu. \a nu is double. \a x is double. |
---|
| 122 | |
---|
| 123 | The Modified Bessel function of second kind is defined as: |
---|
| 124 | \f[ |
---|
| 125 | K_{\nu}(x) = \frac{\pi}{2} i^{\nu+1} [J_{\nu}(ix) + i Y_{\nu}(ix)] |
---|
| 126 | \f] |
---|
| 127 | where \f$\nu\f$ is the order and \f$ 0 < x < \infty \f$. |
---|
| 128 | */ |
---|
| 129 | double besselk(int nu, double x); |
---|
| 130 | |
---|
| 131 | /*! |
---|
| 132 | \ingroup besselfunctions |
---|
| 133 | \brief Modified Bessel function of second kind of order \a nu. \a nu is double. \a x is double. |
---|
| 134 | */ |
---|
| 135 | vec besselk(int nu, const vec &x); |
---|
| 136 | |
---|
| 137 | } //namespace itpp |
---|
| 138 | |
---|
| 139 | #endif // #ifndef BESSEL_H |
---|