NumCpp  2.12.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
nc::polynomial Namespace Reference

Data Structures

class  Poly1d
 

Functions

template<typename dtype >
NdArray< double > chebyshev_t (uint32 n, const NdArray< dtype > &inArrayX)
 
template<typename dtype >
double chebyshev_t (uint32 n, dtype x)
 
template<typename dtype >
NdArray< double > chebyshev_u (uint32 n, const NdArray< dtype > &inArrayX)
 
template<typename dtype >
double chebyshev_u (uint32 n, dtype x)
 
template<typename dtype >
NdArray< double > hermite (uint32 n, const NdArray< dtype > &inArrayX)
 
template<typename dtype >
double hermite (uint32 n, dtype x)
 
template<typename dtype >
NdArray< double > laguerre (uint32 n, const NdArray< dtype > &inArrayX)
 
template<typename dtype >
double laguerre (uint32 n, dtype x)
 
template<typename dtype >
NdArray< double > laguerre (uint32 n, uint32 m, const NdArray< dtype > &inArrayX)
 
template<typename dtype >
double laguerre (uint32 n, uint32 m, dtype x)
 
template<typename dtype >
NdArray< double > legendre_p (uint32 m, uint32 n, const NdArray< dtype > &inArrayX)
 
template<typename dtype >
double legendre_p (uint32 m, uint32 n, dtype x)
 
template<typename dtype >
NdArray< double > legendre_p (uint32 n, const NdArray< dtype > &inArrayX)
 
template<typename dtype >
double legendre_p (uint32 n, dtype x)
 
template<typename dtype >
NdArray< double > legendre_q (int32 n, const NdArray< dtype > &inArrayX)
 
template<typename dtype >
double legendre_q (int32 n, dtype x)
 
template<typename dtype1 , typename dtype2 >
std::complex< double > spherical_harmonic (uint32 n, int32 m, dtype1 theta, dtype2 phi)
 
template<typename dtype1 , typename dtype2 >
double spherical_harmonic_i (uint32 n, int32 m, dtype1 theta, dtype2 phi)
 
template<typename dtype1 , typename dtype2 >
double spherical_harmonic_r (uint32 n, int32 m, dtype1 theta, dtype2 phi)
 

Function Documentation

◆ chebyshev_t() [1/2]

template<typename dtype >
NdArray< double > nc::polynomial::chebyshev_t ( uint32  n,
const NdArray< dtype > &  inArrayX 
)

Chebyshev Polynomial of the first kind. NOTE: Use of this function requires using the Boost includes.

Parameters
nthe order of the chebyshev polynomial
inArrayXthe input value
Returns
NdArray<double>

◆ chebyshev_t() [2/2]

template<typename dtype >
double nc::polynomial::chebyshev_t ( uint32  n,
dtype  x 
)

Chebyshev Polynomial of the first kind. NOTE: Use of this function requires using the Boost includes.

Parameters
nthe order of the chebyshev polynomial
xthe input value
Returns
double

◆ chebyshev_u() [1/2]

template<typename dtype >
NdArray< double > nc::polynomial::chebyshev_u ( uint32  n,
const NdArray< dtype > &  inArrayX 
)

Chebyshev Polynomial of the second kind. NOTE: Use of this function requires using the Boost includes.

Parameters
nthe order of the chebyshev polynomial
inArrayXthe input value
Returns
NdArray<double>

◆ chebyshev_u() [2/2]

template<typename dtype >
double nc::polynomial::chebyshev_u ( uint32  n,
dtype  x 
)

Chebyshev Polynomial of the second kind. NOTE: Use of this function requires using the Boost includes.

Parameters
nthe order of the chebyshev polynomial
xthe input value
Returns
double

◆ hermite() [1/2]

template<typename dtype >
NdArray< double > nc::polynomial::hermite ( uint32  n,
const NdArray< dtype > &  inArrayX 
)

Hermite Polynomial. NOTE: Use of this function requires either using the Boost includes or a C++17 compliant compiler.

Parameters
nthe order of the hermite polynomial
inArrayXthe input value
Returns
NdArray<double>

◆ hermite() [2/2]

template<typename dtype >
double nc::polynomial::hermite ( uint32  n,
dtype  x 
)

Hermite Polynomial NOTE: Use of this function requires either using the Boost includes or a C++17 compliant compiler.

Parameters
nthe order of the hermite polynomial
xthe input value
Returns
double

◆ laguerre() [1/4]

template<typename dtype >
NdArray< double > nc::polynomial::laguerre ( uint32  n,
const NdArray< dtype > &  inArrayX 
)

Laguerre Polynomial. NOTE: Use of this function requires either using the Boost includes or a C++17 compliant compiler.

Parameters
nthe order of the leguerre polynomial
inArrayXthe input value
Returns
NdArray<double>

◆ laguerre() [2/4]

template<typename dtype >
double nc::polynomial::laguerre ( uint32  n,
dtype  x 
)

Laguerre Polynomial. NOTE: Use of this function requires either using the Boost includes or a C++17 compliant compiler.

Parameters
nthe order of the leguerre polynomial
xthe input value
Returns
double

◆ laguerre() [3/4]

template<typename dtype >
NdArray< double > nc::polynomial::laguerre ( uint32  n,
uint32  m,
const NdArray< dtype > &  inArrayX 
)

Associated Laguerre Polynomial. NOTE: Use of this function requires either using the Boost includes or a C++17 compliant compiler.

Parameters
nthe order of the leguerre polynomial
mthe degree of the legendre polynomial
inArrayXthe input value
Returns
NdArray<double>

◆ laguerre() [4/4]

template<typename dtype >
double nc::polynomial::laguerre ( uint32  n,
uint32  m,
dtype  x 
)

Associated Laguerre Polynomial. NOTE: Use of this function requires either using the Boost includes or a C++17 compliant compiler.

Parameters
nthe order of the leguerre polynomial
mthe degree of the legendre polynomial
xthe input value
Returns
double

◆ legendre_p() [1/4]

template<typename dtype >
NdArray< double > nc::polynomial::legendre_p ( uint32  m,
uint32  n,
const NdArray< dtype > &  inArrayX 
)

Associated Legendre Polynomial of the first kind. NOTE: Use of this function requires either using the Boost includes or a C++17 compliant compiler.

Parameters
mthe order of the legendre polynomial
nthe degree of the legendre polynomial
inArrayXthe input value. Requires -1 <= x <= 1
Returns
NdArray<double>

◆ legendre_p() [2/4]

template<typename dtype >
double nc::polynomial::legendre_p ( uint32  m,
uint32  n,
dtype  x 
)

Associated Legendre Polynomial of the first kind. NOTE: Use of this function requires either using the Boost includes or a C++17 compliant compiler.

Parameters
mthe order of the legendre polynomial
nthe degree of the legendre polynomial
xthe input value. Requires -1 <= x <= 1
Returns
double

◆ legendre_p() [3/4]

template<typename dtype >
NdArray< double > nc::polynomial::legendre_p ( uint32  n,
const NdArray< dtype > &  inArrayX 
)

Legendre Polynomial of the first kind. NOTE: Use of this function requires either using the Boost includes or a C++17 compliant compiler.

Parameters
nthe degree of the legendre polynomial
inArrayXthe input value. Requires -1 <= x <= 1
Returns
NdArray<double>

◆ legendre_p() [4/4]

template<typename dtype >
double nc::polynomial::legendre_p ( uint32  n,
dtype  x 
)

Legendre Polynomial of the first kind. NOTE: Use of this function requires either using the Boost includes or a C++17 compliant compiler.

Parameters
nthe degree of the legendre polynomial
xthe input value. Requires -1 <= x <= 1
Returns
double

◆ legendre_q() [1/2]

template<typename dtype >
NdArray< double > nc::polynomial::legendre_q ( int32  n,
const NdArray< dtype > &  inArrayX 
)

Legendre Polynomial of the second kind. NOTE: Use of this function requires using the Boost includes.

Parameters
nthe order of the legendre polynomial
inArrayXthe input value. Requires -1 <= x <= 1
Returns
NdArray<double>

◆ legendre_q() [2/2]

template<typename dtype >
double nc::polynomial::legendre_q ( int32  n,
dtype  x 
)

Legendre Polynomial of the second kind. NOTE: Use of this function requires using the Boost includes.

Parameters
nthe order of the legendre polynomial
xthe input value. Requires -1 <= x <= 1
Returns
double

◆ spherical_harmonic()

template<typename dtype1 , typename dtype2 >
std::complex< double > nc::polynomial::spherical_harmonic ( uint32  n,
int32  m,
dtype1  theta,
dtype2  phi 
)

Returns the value of the Spherical Harmonic Ynm(theta, phi). The spherical harmonics Ynm(theta, phi) are the angular portion of the solution to Laplace's equation in spherical coordinates where azimuthal symmetry is not present. NOTE: Use of this function requires using the Boost includes.

Parameters
norder of the harmonic
mdegree of the harmonic
thetaAzimuthal (longitudinal) coordinate; must be in [0, 2*pi].
phiPolar (colatitudinal) coordinate; must be in [0, pi].
Returns
double

◆ spherical_harmonic_i()

template<typename dtype1 , typename dtype2 >
double nc::polynomial::spherical_harmonic_i ( uint32  n,
int32  m,
dtype1  theta,
dtype2  phi 
)

Returns the imaginary part of the Spherical Harmonic Ynm(theta, phi). The spherical harmonics Ynm(theta, phi) are the angular portion of the solution to Laplace's equation in spherical coordinates where azimuthal symmetry is not present. NOTE: Use of this function requires using the Boost includes.

Parameters
norder of the harmonic
mdegree of the harmonic
thetaAzimuthal (longitudinal) coordinate; must be in [0, 2*pi].
phiPolar (colatitudinal) coordinate; must be in [0, pi].
Returns
double

◆ spherical_harmonic_r()

template<typename dtype1 , typename dtype2 >
double nc::polynomial::spherical_harmonic_r ( uint32  n,
int32  m,
dtype1  theta,
dtype2  phi 
)

Returns the real part of the Spherical Harmonic Ynm(theta, phi). The spherical harmonics Ynm(theta, phi) are the angular portion of the solution to Laplace's equation in spherical coordinates where azimuthal symmetry is not present. NOTE: Use of this function requires using the Boost includes.

Parameters
norder of the harmonic
mdegree of the harmonic
thetaAzimuthal (longitudinal) coordinate; must be in [0, 2*pi].
phiPolar (colatitudinal) coordinate; must be in [0, pi].
Returns
double