NiHu  2.0
math_functions.hpp File Reference

general mathematical functions More...

#include <boost/math/constants/constants.hpp>
#include <cmath>
#include <complex>
#include <iostream>
#include <stdexcept>
Include dependency graph for math_functions.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  NiHu::bessel::make_complex< T >
 metafunction converting a floating point type to a complex type More...
 
struct  NiHu::bessel::make_complex< std::complex< T > >
 
struct  NiHu::IpowC< Base, Exp >
 metafunction computing integer power More...
 
struct  NiHu::IpowC< Base, 0 >
 terminating case of the recursion IpowC More...
 
struct  NiHu::IpowC< 0, Exp >
 terminating case of the recursion IpowC More...
 
struct  NiHu::IpowC< 0, 0 >
 terminating case of the recursion IpowC More...
 

Namespaces

 NiHu::bessel
 namespace encapsulating Bessel functions
 

Functions

template<typename T >
int NiHu::sgn (T val)
 signum function More...
 
const double NiHu::bessel::large_lim (7.)
 limit between small and large argument series
 
template<class T >
void NiHu::bessel::mag_arg_large (int nu, T const &z, T &u, T &phi)
 large argument Bessel function Taylor series coefficients More...
 
template<int nu, class T >
NiHu::bessel::J_small (T const &z)
 small argument expansion of J_nu(z) for nu = 0, 1, 2 More...
 
template<int nu, class T >
NiHu::bessel::J_large (T const &z)
 large argument expansion of J_nu(z) for nu = 0, 1, 2 More...
 
template<int nu, class T >
NiHu::bessel::J (T const &z)
 Bessel function J_nu(z) More...
 
template<int nu>
std::complex< double > NiHu::bessel::Y_small (std::complex< double > const &z)
 small argument expansion of Y_nu(z) More...
 
template<int nu>
std::complex< double > NiHu::bessel::Y_large (std::complex< double > const &z)
 large argument expansion of Y_nu(z) for nu = 0, 1, 2 More...
 
template<int nu>
std::complex< double > NiHu::bessel::Y (std::complex< double > const &z)
 Bessel function Y_nu(z) More...
 
template<int nu, int kind, class T >
make_complex< T >::type NiHu::bessel::H_large (T const &z)
 large argument expansion of H^(K)_nu(z) More...
 
template<int nu, int kind, class T >
make_complex< T >::type NiHu::bessel::H (T const &z)
 H^(K)_nu(z) Bessel function. More...
 
template<int nu, class T >
make_complex< T >::type NiHu::bessel::K (T const &z)
 K_nu(z) modified Bessel function. More...
 
template<class T = double>
NiHu::chebroot (size_t n, size_t i)
 roots of Chebyshev polynomials More...
 
template<class I >
NiHu::Ipow (I base, I exp)
 compute integer power More...
 

Detailed Description

general mathematical functions

Definition in file math_functions.hpp.

Function Documentation

◆ chebroot()

template<class T = double>
T NiHu::chebroot ( size_t  n,
size_t  i 
)

roots of Chebyshev polynomials

Template Parameters
Tthe scalar type
Parameters
[in]nthe polynomial order
[in]ithe root index
Returns
the i-th root of T_n(x)

Definition at line 395 of file math_functions.hpp.

◆ Ipow()

template<class I >
I NiHu::Ipow ( base,
exp 
)

compute integer power

Template Parameters
Ithe integer type
Parameters
[in]basethe base
[in]expthe exponent
Returns
base^exp

Definition at line 409 of file math_functions.hpp.

◆ sgn()

template<typename T >
int NiHu::sgn ( val)

signum function

Template Parameters
Tthe input type
Parameters
[in]valthe function input
Returns
the signum(val)

Definition at line 43 of file math_functions.hpp.