bessel.cpp
Go to the documentation of this file.
#include <itpp/base/bessel.h>
#include <itpp/base/bessel/bessel_internal.h>
#include <itpp/base/itcompat.h>
#ifndef _MSC_VER
# include <itpp/config.h>
#else
# include <itpp/config_msvc.h>
#endif
namespace itpp
{
// Bessel function of order nu
double besselj(int nu, double x) { return jn(nu, x); }
vec besselj(int nu, const vec &x)
{
vec out(x.size());
for (int i = 0; i < x.size(); i++)
out(i) = jn(nu, x(i));
return out;
}
// Bessel function of order nu. nu is real.
double besselj(double nu, double x) { return jv(nu, x); }
vec besselj(double nu, const vec &x)
{
vec out(x.size());
for (int i = 0; i < x.size(); i++)
out(i) = jv(nu, x(i));
return out;
}
// Bessel function of second kind of order nu
double bessely(int nu, double x) { return yn(nu, x); }
vec bessely(int nu, const vec &x)
{
vec out(x.size());
for (int i = 0; i < x.size(); i++)
out(i) = yn(nu, x(i));
return out;
}
// Bessel function of second kind of order nu
double bessely(double nu, double x) { return yv(nu, x); }
vec bessely(double nu, const vec &x)
{
vec out(x.size());
for (int i = 0; i < x.size(); i++)
out(i) = yv(nu, x(i));
return out;
}
// Modified Bessel function of order nu
double besseli(double nu, double x) { return iv(nu, x); }
vec besseli(double nu, const vec &x)
{
vec out(x.size());
for (int i = 0; i < x.size(); i++)
out(i) = iv(nu, x(i));
return out;
}
// Modified Bessel function of second kind of order n
double besselk(int n, double x) { return kn(n, x); }
vec besselk(int nu, const vec &x)
{
vec out(x.size());
for (int i = 0; i < x.size(); i++)
out(i) = kn(nu, x(i));
return out;
}
} // namespace itpp
bessel.h
Definitions of Bessel functions.
itpp::Array
General array class.
Definition array.h:105
itpp::Array::size
int size() const
Returns the number of data elements in the array object.
Definition array.h:155
itpp::bessely
double bessely(int nu, double x)
Bessel function of second kind of order nu. nu is integer.
Definition bessel.cpp:68
itpp::besseli
double besseli(double nu, double x)
Modified Bessel function of first kind of order nu. nu is double. x is double.
Definition bessel.cpp:91
itpp::besselk
double besselk(int n, double x)
Modified Bessel function of second kind of order nu. nu is double. x is double.
Definition bessel.cpp:103
itpp::besselj
double besselj(int nu, double x)
Bessel function of first kind of order nu for nu integer.
Definition bessel.cpp:44
itcompat.h
IT++ compatibility types and functions.
itpp
itpp namespace
Definition itmex.h:37

Generated on Mon Jun 10 2024 11:49:16 for IT++ by Doxygen 1.9.8