24#define _USE_MATH_DEFINES
38#include <boost/math/common_factor.hpp>
39#include <gsl/gsl_sf.h>
40#include <noise/noise.h>
43#include "../datamanagement/memorymanager.hpp"
44#include "../utils/tools.hpp"
45#include "../version.h"
130 return a_fVal * 1e-6;
145 return a_fVal * 1e-9;
191 return v * 1.60217657e-19;
251 return v * 101325.0/760.0;
266 return v * 149597870700.0;
281 return v * 9460730472580800.0;
296 return v * 30856775777948584.2;
386 return v * 6894.75729;
401 return v * 463.0 / 900.0;
446 return v * 1.609334 / 3.6;
476 return (v + 459.67) * 5.0 / 9.0;
536 return v * 6.022140857E23;
550 return value_type(v.imag() != 0.0 ? -v.imag() : 0.0, v.real());
608 return std::polar(v.real(), v.imag());
686 for (
int n =
intCast(fabs(v)); n > 0; n -= 2)
743 int nReturn = nElements;
745 for (
int i = 0; i < nElements; i++)
747 if (
isnan(vElements[i]) ||
isinf(vElements[i]))
786 for (
int i = 0; i < nElements; i++)
788 if (!
isnan(vElements[i]))
789 vStd += (vElements[i] - vMean) * conj(vElements[i] - vMean);
792 return sqrt(vStd / (
parser_Num(vElements, nElements)-1.0));
809 for (
int i = 0; i < nElements; i++)
811 if (!
isnan(vElements[i]))
812 vProd *= vElements[i];
832 for (
int i = 0; i < nElements; i++)
834 if (!
isnan(vElements[i]))
835 vResult += vElements[i] * conj(vElements[i]);
838 return sqrt(vResult);
855 for (
int i = 0; i < nElements; i++)
875 for (
int i = 0; i < nElements-1; i++)
910 if (vElements[nElements-1].
real() > 0)
912 else if (vElements[nElements-1].
real() < 0)
915 switch (
intCast(fabs(vElements[nElements-1])))
918 nType |= RETURN_VALUE;
921 nType |= RETURN_FIRST;
924 nType |= RETURN_FIRST | RETURN_VALUE;
928 for (
int i = 0; i < nElements-2; i++)
930 if (
isnan(vElements[i]) ||
isinf(vElements[i]))
933 if (vElements[i] == vRef)
935 if (nType & RETURN_VALUE)
940 else if (nType & RETURN_GE && vElements[i].
real() > vRef.real())
942 if (nType & RETURN_FIRST)
944 if (nType & RETURN_VALUE)
945 return vElements[i].real();
950 if (nKeep == -1 || vElements[i].
real() < vKeep.real())
952 vKeep = vElements[i].real();
958 else if (nType & RETURN_LE && vElements[i].
real() < vRef.real())
960 if (nType & RETURN_FIRST)
962 if (nType & RETURN_VALUE)
963 return vElements[i].real();
968 if (nKeep == -1 || vElements[i].
real() > vKeep.real())
970 vKeep = vElements[i].real();
980 else if (nType & RETURN_VALUE)
999 for (
int i = 0; i < nElements; i++)
1001 if (
isnan(vElements[i]) || vElements[i] == 0.0)
1021 for (
int i = 0; i < nElements; i++)
1023 if (vElements[i] != 0.0 && !
isnan(vElements[i]))
1043 bool isTrue =
false;
1044 for (
int i = 0; i < nElements; i++)
1046 if (vElements[i] != 0.0 && !
isnan(vElements[i]))
1073 else if (nElements == 1)
1078 for (
int i = 2; i < nElements; i++)
1079 dResult += vElements[i] *
intPower(vElements[0], i-1);
1100 noise::module::Perlin perlinNoise;
1105 return perlinNoise.GetValue(vElements[0].
real(), 0, 0);
1107 return perlinNoise.GetValue(vElements[0].
real(), vElements[1].
real(), 0);
1109 return perlinNoise.GetValue(vElements[0].
real(), vElements[1].
real(), vElements[2].
real());
1111 perlinNoise.SetPersistence(vElements[6].
real());
1113 perlinNoise.SetOctaveCount(
intCast(vElements[5]));
1115 perlinNoise.SetFrequency(vElements[4].
real());
1117 perlinNoise.SetSeed(
intCast(vElements[3].
real()));
1118 return perlinNoise.GetValue(vElements[0].
real(), vElements[1].
real(), vElements[2].
real());
1138 for (
int i = 0; i < nElements; ++i)
1140 if (!
isnan(vElements[i]))
1141 fRes += vElements[i];
1176 for (
int i = 0; i < nElements; ++i)
1182 fRes = vElements[i].real();
1188 for (
int i = 0; i < nElements; ++i)
1191 fRes =
std::min(fRes.real(), vElements[i].real());
1211 for (
int i = 0; i < nElements; ++i)
1217 fRes = vElements[i].real();
1223 for (
int i = 0; i < nElements; ++i)
1226 fRes =
std::max(fRes.real(), vElements[i].real());
1244 vector<value_type> vData(vElements, vElements+nElements);
1245 vData.push_back(
parser_Min(vElements, nElements));
1263 vector<value_type> vData(vElements, vElements+nElements);
1264 vData.push_back(
parser_Max(vElements, nElements));
1288 return vRounded * dDecimals;
1305 return v / 180.0 *
M_PI;
1322 return v /
M_PI * 180.0;
1341 ||
isinf(theta.real()) ||
isnan(theta.real())
1373 ||
isinf(theta.real()) ||
isnan(theta.real())
1437 if (fabs(rho) > 1.0)
1443 for (
int k = 0; k <= (n-m)/2; k++)
1457 return vReturn/vNorm;
1494 double v = vc.real();
1499 else if (n && v == 0.0)
1502 return sin(v)/(v*v) - cos(v)/v;
1504 return (3.0/(v*v)-1.0)*sin(v)/v-3.0*cos(v)/(v*v);
1506 return (15.0/(v*v*v)-6.0/v)*sin(v)/v-(15.0/(v*v)-1.0)*cos(v)/v;
1508 return 5.0/(v*v*v*v)*(2.0*v*v-21.0)*cos(v) + 1.0/(v*v*v*v*v)*(v*v*v*v - 45.0*v*v + 105.0)*sin(v);
1510 return 15.0/(v*v*v*v*v*v)*(v*v*v*v - 28.0*v*v + 63.0) * sin(v) + 1.0/(v*v*v*v*v)*(-v*v*v*v + 105.0*v*v - 945.0)*cos(v);
1512 return (-
intPower(v,6)+210.0*v*v*v*v-4725.0*v*v+10395.0)*sin(v)/
intPower(v,7)-21.0*(v*v*v*v-60.0*v*v+495.0)*cos(v)/
intPower(v,6);
1514 return (
intPower(v,6)-378.0*v*v*v*v+17325.0*v*v-135135.0)*cos(v)/
intPower(v,7) - 7.0*(4.0*
intPower(v,6)-450.0*v*v*v*v+8910.0*v*v-19305.0)*sin(v)/
intPower(v,8);
1523 return gsl_sf_bessel_jl(
intCast(vn), fabs(v));
1543 double v = vc.real();
1549 return -cos(v)/(v*v) - sin(v)/v;
1551 return (-3.0/(v*v)+1.0)*cos(v)/v - 3.0*sin(v)/(v*v);
1553 return (-15.0/(v*v*v)+6.0/v)*cos(v)/v - (15.0/(v*v)-1.0)*sin(v)/v;
1555 return 5.0/(v*v*v*v)*(2.0*v*v-21.0)*sin(v) + 1.0/(v*v*v*v*v)*(-v*v*v*v+45.0*v*v - 105.0)*cos(v);
1557 return 1.0/(v*v*v*v*v)*(-v*v*v*v + 105.0*v*v - 945.0)*sin(v) - 15.0/(v*v*v*v*v*v)*(v*v*v*v - 28.0*v*v + 63.0)*cos(v);
1559 return (
intPower(v,6)-210.0*v*v*v*v+4725.0*v*v-10395.0)*cos(v)/
intPower(v,7)-21.0*(v*v*v*v-60.0*v*v+495.0)*sin(v)/
intPower(v,6);
1561 return 7.0*(4.0*
intPower(v,6)-450.0*v*v*v*v+8910.0*v*v-19305.0)*cos(v)/
intPower(v,8)+(
intPower(v,6)-378.0*v*v*v*v-17325.0*v*v-135135.0)*sin(v)/
intPower(v,7);
1570 return gsl_sf_bessel_yl(
intCast(vn), fabs(v));
1592 for (
int k = 0; k <= n/2; k++)
1651 for (
int k = 0; k <= n; k++)
1684 for (
int m = 0; m <= n; m++)
1710 case 1:
return 2.0*v;
1711 case 2:
return 4.0*v*v - 2.0;
1712 case 3:
return 8.0*v*v*v - 12.0*v;
1713 case 4:
return 16.0*v*v*v*v - 48.0*v*v + 12.0;
1737 double a_F = 23.2875;
1740 double A = vN.real() + vZ.real();
1741 double dEnergy = 0.0;
1747 if (A < 0 || vZ.real() < 0 || vN.real() < 0)
1753 else if (!(N % 2 || Z % 2))
1757 dEnergy = a_V*A - a_S*pow(A,2.0/3.0) - a_F*(vN.real()-vZ.real())*(vN.real()-vZ.real())/A - a_C*vZ.real()*(vZ.real()-1)/pow(A,1.0/3.0) + (double)delta*a_p/sqrt(A);
1778 return v.real() >= 0.0;
1797 return M_PI+
abs(
M_PI + atan2(y.real(), x.real()));
1798 return atan2(y.real(), x.real());
1818 if (x == 0.0 && y == 0.0 && z == 0.0)
1820 return acos(z/sqrt(x*conj(x)+y*conj(y)+z*conj(z)));
1839 static uniform_real_distribution<double> randDist(0, 1);
1859 static normal_distribution<double> randDist(0, 1);
1876 return erf(x.real());
1892 return erfc(x.real());
1909 if (x.imag() == 0.0)
1910 return tgamma(x.real());
1914 gsl_sf_lngamma_complex_e(x.real(), x.imag(), &lng, &arg);
1916 return std::polar(std::exp(lng.val), arg.val);
1930 return gsl_sf_airy_Ai(x.real(), GSL_PREC_DOUBLE);
1944 return gsl_sf_airy_Bi(x.real(), GSL_PREC_DOUBLE);
1959 if (n.real() >= 0.0)
1960 return gsl_sf_bessel_Jn(
intCast(n), x.real());
1977 if (x != 0.0 && n.real() >= 0.0)
1978 return x.real()/fabs(x.real())*gsl_sf_bessel_Yn(
intCast(n), fabs(x.real()));
1995 double k = kc.real();
1996 double phi = phic.real();
2001 if (k < 0 || k >= 1)
2004 if (phi < 0 || phi > M_PI_2)
2007 int nMultiple =
floor(fabs(phi/M_PI_2));
2012 if (!(nMultiple % 2))
2013 return nSign*(nMultiple*gsl_sf_ellint_Kcomp(k,0) + gsl_sf_ellint_F(fabs(phi)-nMultiple*M_PI_2, k, 0));
2015 return nSign*((nMultiple+1)*gsl_sf_ellint_Kcomp(k,0) - gsl_sf_ellint_F(M_PI_2-(fabs(phi)-nMultiple*M_PI_2), k, 0));
2018 return gsl_sf_ellint_F(phi, k, 0);
2033 double phi = phic.real();
2034 double k = kc.real();
2039 if (k < 0 || k >= 1)
2042 if (phi < 0 || phi > M_PI_2)
2045 int nMultiple =
floor(fabs(phi/M_PI_2));
2051 return nSign*(nMultiple*gsl_sf_ellint_Ecomp(k,0) + gsl_sf_ellint_E(fabs(phi)-nMultiple*M_PI_2, k, 0));
2053 return nSign*((nMultiple+1)*gsl_sf_ellint_Ecomp(k,0) - gsl_sf_ellint_E(M_PI_2-(fabs(phi)-nMultiple*M_PI_2), k, 0));
2056 return gsl_sf_ellint_E(phi, k, 0);
2075 if (k.real() < 0 || k.real() >= 1)
2078 if (phi.real() < 0 || phi.real() > M_PI_2)
2081 int nMultiple =
floor(fabs(phi.real()/M_PI_2));
2087 return nSign*(nMultiple*gsl_sf_ellint_P(M_PI_2, k.real(), n.real(),0) + gsl_sf_ellint_P(fabs(phi.real())-nMultiple*M_PI_2, k.real(), n.real(), 0));
2089 return nSign*((nMultiple+1)*gsl_sf_ellint_P(M_PI_2, k.real(), n.real(),0) - gsl_sf_ellint_P(M_PI_2-(fabs(phi.real())-nMultiple*M_PI_2), k.real(), n.real(), 0));
2092 return gsl_sf_ellint_P(phi.real(), k.real(), n.real(), 0);
2111 if (k.real() < 0 || k.real() >= 1)
2114 if (phi.real() < 0 || phi.real() > M_PI_2)
2117 int nMultiple =
floor(fabs(phi.real()/M_PI_2));
2123 return nSign*(nMultiple*gsl_sf_ellint_D(M_PI_2, k.real(), n.real(), 0) + gsl_sf_ellint_D(fabs(phi.real())-nMultiple*M_PI_2, k.real(), n.real(), 0));
2125 return nSign*((nMultiple+1)*gsl_sf_ellint_D(M_PI_2, k.real(), n.real(), 0) - gsl_sf_ellint_D(M_PI_2-(fabs(phi.real())-nMultiple*M_PI_2), k.real(), n.real(), 0));
2128 return gsl_sf_ellint_D(phi.real(), k.real(), n.real(), 0);
2146 if ((
intCast(a) == (
int)a.real() && a.real() < 0) || (
intCast(b) == (
int)b.real() && b.real() < 0))
2149 return gsl_sf_beta(a.real(), b.real());
2162static double ek(
int k,
int N)
2165 static std::vector<double> vLookUp;
2167 if ((
int)vLookUp.size() > k-1)
2168 return vLookUp[k-1];
2170 for (
int j = k; j <= N; j++)
2173 vLookUp.push_back(sum);
2193 std::complex<double> sum;
2194 static const int N = 20;
2195 static const double coeff =
intPower(0.5, N);
2197 for (
int k = 1; k <= N; k++)
2199 sum += ((k-1) % 2 ? -1.0 : 1.0) / std::pow(k, s);
2202 for (
int k = N+1; k <= 2*N; k++)
2204 sum += coeff * ((k-1) % 2 ? -1.0 : 1.0) *
ek(k-N, N) / std::pow(k, s);
2207 return 1.0 / (1.0-std::pow(2.0, 1.0-s)) * sum;
2246 return gsl_sf_clausen(x.real());
2263 if (x.real() == 0.0)
2266 if ((
int)x.real() ==
intCast(x) && x.real() > 0)
2267 return gsl_sf_psi_int(
intCast(x));
2269 return gsl_sf_psi(x.real());
2284 if (
isnan(n.real()) ||
isnan(x.real()) ||
isinf(n.real()) ||
isinf(x.real()) || x.real() <= 0 || n.real() < 0)
2287 return gsl_sf_psi_n(
intCast(n), x.real());
2304 if (x.imag() == 0.0)
2305 return gsl_sf_dilog(x.real());
2310 gsl_sf_complex_dilog_xy_e(x.real(), x.imag(), &re, &im);
2352 return (x.real() > x1.real() || x.real() < x0.real()) ? 0.0 : 1.0;
2371 double lb = lborder.real();
2372 double rb = rborder.real();
2385 if (x.real() < x0.real() && lb)
2387 else if (x.real() < x0.real())
2390 if (x.real() == x0.real() && lb != 2)
2392 else if (x.real() == x0.real() && lb == 2)
2395 if (x.real() > x1.real() && rb)
2397 else if (x.real() > x1.real())
2400 if (x.real() == x1.real() && rb != 2)
2402 else if (x.real() == x1.real() && rb == 2)
2421 if (vAlpha.real() >= 1.0 || vAlpha.real() <= 0.0 || vFreedoms.real() < 2.0)
2476 return v1 - div * v2;
2494 return (v1 != 0.0) xor (v2 != 0.0);
2574 return (
double)clock();
2604 if (
isnan(b.real()) ||
isnan(x) ||
isinf(b.real()) || x.real() <= 0.0 || b.real() <= 0.0)
2610 return log10(x) / log10(b.real());
2639 int nType = (int)
rint(vType.real());
2714 if (vRight.real() <= vLeft.real())
2717 if (v.real() <= vRight.real() && v.real() >= vLeft.real())
2740 return cos(x) / sin(x);
2758 std::list<mu::value_type*>* m_lDataStorage =
static_cast<std::list<mu::value_type*>*
>(a_pUserData);
2762 *(m_lDataStorage->back()) = 0.0;
2765 return m_lDataStorage->back();
2779 return 1.0 / std::cos(x);
2793 return 1.0 / std::sin(x);
2807 return std::acos(1.0 / x);
2821 return std::asin(1.0 / x);
2835 return 1.0 / std::cosh(x);
2849 return 1.0 / std::sinh(x);
2863 return std::acosh(1.0 / x);
2877 return std::asinh(1.0 / x);
This class represents a single table in memory, or a - so to say - single memory page to be handled b...
void writeData(int _nLine, int _nCol, const mu::value_type &_dData)
This member function writes the passed value to the selected position. The table is automatically enl...
mu::value_type pct(const VectorIndex &_vLine, const VectorIndex &_vCol, mu::value_type dPct=0.5) const
Implementation for the PCT multi argument function.
mu::value_type med(const VectorIndex &_vLine, const VectorIndex &_vCol) const
Implementation for the MED multi argument function.
This class abstracts all the index logics, i.e. the logical differences between single indices and in...
CONSTCD11 date::year year() const NOEXCEPT
CONSTCD11 date::day day() const NOEXCEPT
CONSTCD11 date::month month() const NOEXCEPT
value_type parser_Binom(const value_type &v1, const value_type &v2)
Function representing the binomial coefficient.
value_type parser_Faculty(const value_type &v)
Function representing the faculty of any natural number.
value_type parser_Parsec(const value_type &v)
Conversion function for 1pc.
value_type parser_gcd(const value_type &n, const value_type &k)
This function returns the greatest common divisor of both argments.
value_type parser_Norm(const value_type *vElements, int nElements)
This function calculates the vector norm of the elements in the passed array.
value_type parser_Pct(const value_type *vElements, int nElements)
This function calculates the selected percentile of the passed array.
value_type parser_is_string(const value_type &v)
This function is a numerical version of the string is_string() function. Used as a fallback.
value_type parser_studentFactor(const value_type &vFreedoms, const value_type &vAlpha)
This function returns the Student factor s_t for the selected degrees of freedom and a confidence int...
value_type parser_and(const value_type *vElements, int nElements)
This function calculates the logical AND operation between all elements in the passed array.
value_type parser_interval(const value_type &v, const value_type &vLeft, const value_type &vRight)
This function numerically defines a valid value range (the value is set to NaN, if outside of this ra...
value_type parser_Poise(const value_type &v)
Conversion function for 1Ps.
value_type parser_clock()
This function returns the current CPU clock count.
value_type parser_asec(const value_type &x)
This function returns the inverse secant of the passed value.
value_type parser_SphericalNeumann(const value_type &vn, const value_type &vc)
This function calculates the spherical von Neumann function.
value_type parser_theta(const value_type &x, const value_type &y, const value_type &z)
This function calculates the angle of a vector and the z axis in any z-r plane (the polar angle theta...
value_type parser_Lightyear(const value_type &v)
Conversion function for 1ly.
value_type * parser_AddVariable(const char_type *a_szName, void *a_pUserData)
This function represents the numerical variable factory. New memory is allocated in this function and...
value_type parser_SinusCardinalis(const value_type &v)
This function calculates the cardinal sine of x.
value_type parser_Barn(const value_type &v)
Conversion function for 1bn.
value_type parser_Yard(const value_type &v)
Conversion function for 1yd.
value_type parser_mol(const value_type &v)
Conversion function for 1mol.
value_type parser_csch(const value_type &x)
This function returns the hyperbolic cosecant of the passed value.
value_type parser_EllipticD(const value_type &phi, const value_type &n, const value_type &k)
This function returns the value of the elliptic intergal D(phi,n,k).
value_type parser_AiryA(const value_type &x)
This function calculates the Airy function Ai(x).
value_type parser_Nano(const value_type &a_fVal)
Conversion function for 1n.
static double ek(int k, int N)
Calculates the sum of binomial coefficients from k to N.
value_type parser_roof(const value_type &x)
This is the roof (ceil) function.
value_type parser_Zernike(const value_type &vn, const value_type &vm, const value_type &rho, const value_type &phi)
This function calculates the selected Zernike polynomials.
value_type parser_AssociatedLegendrePolynomial(const value_type &vl, const value_type &vm, const value_type &v)
This function calculates the associated Legendre polynomials of the selected order.
value_type parser_EllipticF(const value_type &phic, const value_type &kc)
This function returns the value of the elliptic intergal F(phi,k).
value_type parser_Micro(const value_type &a_fVal)
Conversion function for 1mu.
value_type parser_AssociatedLaguerrePolynomial(const value_type &vn, const value_type &vk, const value_type &v)
This function calculates the associated Laguerre polynomials of the selected order.
value_type parser_Ignore(const value_type &v)
Identity function. Used for ignoring functions and parameters in special cases.
value_type parser_Mile(const value_type &v)
Conversion function for 1mi.
value_type parser_Min(const value_type *vElements, int nElements)
This function calculates the minimal value of all elements in the passed array.
value_type parser_real(const value_type &v)
Extracts the real part of a complex number.
value_type parser_acsc(const value_type &x)
This function returns the inverse cosecant of the passed value.
value_type parser_beta(const value_type &a, const value_type &b)
This function returns the value of the Beta function.
value_type parser_complex(const value_type &re, const value_type &im)
Construct a complex number from two real numbers.
value_type parser_isnan(const value_type &v)
Returns, whether the selected value is NaN.
value_type parser_erf(const value_type &x)
This function calculates the gaussian error function.
value_type parser_date(const value_type &vTime, const value_type &vType)
This function converts UNIX time values into a selected part of a time stamp.
value_type parser_polar2rect(const value_type &v)
Converts a polar representation into a rectangular representation and returns it as a new complex num...
value_type parser_AstroUnit(const value_type &v)
Conversion function for 1AU.
value_type parser_LaguerrePolynomial(const value_type &vn, const value_type &v)
This function calculates the Laguerre polynomials of the selected order.
value_type parser_imSphericalHarmonics(const value_type &vl, const value_type &vm, const value_type &theta, const value_type &phi)
This function calculates the imaginary part of the selected spherical harmonics.
value_type parser_RegularCylBessel(const value_type &n, const value_type &x)
This function calculates the regulary bessel function.
value_type parser_time()
This function returns the current UNIX time.
value_type parser_rect(const value_type &x, const value_type &x0, const value_type &x1)
This is the rect function.
value_type parser_Not(const value_type &v)
Function representing the logical NOT operator.
value_type parser_Cnt(const value_type *vElements, int nElements)
This functioon simply returns the number of elements in its array (even the invalid ones).
value_type parser_PSI(const value_type &v)
Conversion function for 1psi.
value_type parser_sec(const value_type &x)
This function returns the secant of the passed value.
value_type parser_Milli(const value_type &a_fVal)
Conversion function for 1m.
value_type parser_Mega(const value_type &a_fVal)
Conversion function for 1M.
value_type parser_Num(const value_type *vElements, int nElements)
This function returns the number of valid elements in its array.
value_type parser_EllipticP(const value_type &phi, const value_type &n, const value_type &k)
This function returns the value of the elliptic intergal Pi(phi,n,k).
value_type parser_kmh(const value_type &v)
Conversion function for 1kmh.
value_type parser_zeta(const value_type &s)
This function returns the value of the Zeta function.
value_type parser_Giga(const value_type &a_fVal)
Conversion function for 1G.
value_type parser_SphericalBessel(const value_type &vn, const value_type &vc)
This function calculates the spherical bessel function.
value_type parser_gamma(const value_type &x)
This function calculates the riemannian Gamma function.
volatile sig_atomic_t exitsignal
value_type parser_ZernikeRadial(int n, int m, const value_type &rho)
This function calculates the radial part of the Zernike polynomials.
value_type parser_EllipticE(const value_type &phic, const value_type &kc)
This function returns the value of the elliptic intergal E(phi,k).
value_type parser_BetheWeizsaecker(const value_type &vN, const value_type &vZ)
This function calculates the nucleic core binding energy according the Bethe Weizsäcker formula.
value_type parser_Calorie(const value_type &v)
Conversion function for 1cal.
value_type parser_toDegree(const value_type &v)
This function converts radian to degree.
value_type parser_MaxPos(const value_type *vElements, int nElements)
This function returns the index of the (first) maximal value in the array.
value_type parser_sech(const value_type &x)
This function returns the hyperbolic secant of the passed value.
value_type parser_Torr(const value_type &v)
Conversion function for 1Torr/1mmhg.
value_type parser_Curie(const value_type &v)
Conversion function for 1C.
value_type parser_perlin(const value_type *vElements, int nElements)
This function implements the perlin noise function.
value_type parser_lcm(const value_type &n, const value_type &k)
This function returns the least common multiple of both arguments.
value_type parser_weeknum(const value_type &vTime)
This function returns the calendar week associated with the passed time value.
value_type parser_liter(const value_type &v)
Conversion function for 1l.
value_type parser_BinAND(const value_type &v1, const value_type &v2)
This function represents the binary AND operator.
value_type parser_round(const value_type &vToRound, const value_type &vDecimals)
This function rounds the passed value to the selected number of decimals.
value_type parser_log_b(const value_type &b, const value_type &x)
Calculates the logarithm of x using the base b.
value_type parser_SphericalHarmonics(const value_type &vl, const value_type &vm, const value_type &theta, const value_type &phi)
This function calculates the real part of the selected spherical harmonics.
value_type parser_Std(const value_type *vElements, int nElements)
This function calculates the standard deviation of the elements in the passed array.
value_type parser_Med(const value_type *vElements, int nElements)
This function calculates the median of the elements in the passed array.
value_type parser_digamma(const value_type &x)
This function returns the value of the Digamma function.
value_type parser_HermitePolynomial(const value_type &vn, const value_type &v)
This function calculates the Hermite polynomials of the selected order.
value_type parser_toRadian(const value_type &v)
This function converts degree to radian.
value_type parser_compare(const value_type *vElements, int nElements)
This function searches for elements of a specified type in the passed array.
value_type parser_Max(const value_type *vElements, int nElements)
This function calculates the maximal value of all elements in the passed array.
value_type parser_ivl(const value_type &x, const value_type &x0, const value_type &x1, const value_type &lborder, const value_type &rborder)
This function describes an interval with borders of a selected type (including, excluding,...
value_type parser_Mod(const value_type &v1, const value_type &v2)
This function represents the Modulo operator.
value_type parser_Avg(const value_type *vElements, int nElements)
This function calculates the average of all elements in passed array.
value_type parser_Angstroem(const value_type &v)
Conversion function for 1A.
value_type parser_dilogarithm(const value_type &x)
This function returns the value of the Dilogarithm Li2(x).
value_type parser_Random(const value_type &vRandMin, const value_type &vRandMax)
This function returns a uniformly distributed random number between both boundaries.
value_type parser_MinPos(const value_type *vElements, int nElements)
This function returns the index of the (first) minimal value in the array.
value_type parser_Kilo(const value_type &a_fVal)
Conversion function for 1k.
value_type parser_LegendrePolynomial(const value_type &vn, const value_type &v)
This function calculates the Legendre polynomials of the selected order.
value_type parser_gRandom(const value_type &vRandAvg, const value_type &vRandstd)
This function returns a gaussian distributed random number using the passed values as mean and standa...
value_type parser_Gauss(const value_type &v)
Conversion function for 1Gs.
value_type parser_polynomial(const value_type *vElements, int nElements)
This function implements an abstract polynomial of an arbitrary order.
value_type parser_imag(const value_type &v)
Extracts the imaginary part of a complex number.
value_type parser_xor(const value_type *vElements, int nElements)
This function calculates the logical XOR operation between all elements in the passed array.
value_type parser_acsch(const value_type &x)
This function returns the inverse hyperbolic cosecant of the passed value.
value_type parser_Fahrenheit(const value_type &v)
Conversion function for 1°F.
value_type parser_BinOR(const value_type &v1, const value_type &v2)
This function represents the binary OR operator.
value_type parser_Fermi(const value_type &v)
Conversion function for 1fm.
value_type parser_imaginaryUnit(const value_type &v)
Multiplies a number with the imaginary unit.
value_type parser_ElectronVolt(const value_type &v)
Conversion function for 1eV.
value_type parser_Inch(const value_type &v)
Conversion function for 1in.
value_type parser_cot(const value_type &x)
This function returns the cotangent of the passed value.
value_type parser_Sum(const value_type *vElements, int nElements)
This function summarizes all elements in the passed array.
value_type parser_erfc(const value_type &x)
This function calculates the complementary gaussian error function.
value_type parser_Foot(const value_type &v)
Conversion function for 1ft.
value_type parser_or(const value_type *vElements, int nElements)
This function calculates the logical OR operation between all elements in the passed array.
value_type parser_numereversion()
Returns the version number of NumeRe as a natural number.
value_type parser_doubleFaculty(const value_type &v)
Function representing the double faculty of any natural number.
value_type parser_Knoten(const value_type &v)
Conversion function for 1kn.
value_type parser_floor(const value_type &x)
This is the floor function.
value_type parser_sleep(const value_type &milliseconds)
Sleeps for the passed amount of milliseconds and returns this number.
value_type parser_csc(const value_type &x)
This function returns the cosecant of the passed value.
value_type parser_clausen(const value_type &x)
This function returns the value of the Clausen function.
value_type parser_phi(const value_type &x, const value_type &y)
This function calculates the angle of a vector and the x axis in the x-y plane (the azimuthal angle p...
value_type parser_asech(const value_type &x)
This function returns the inverse hyperbolic secant of the passed value.
value_type parser_Heaviside(const value_type &v)
This function represents the Heaviside (theta) function.
value_type parser_IrregularCylBessel(const value_type &n, const value_type &x)
This function calculates the irregulary bessel (von Neumann) function.
value_type parser_polygamma(const value_type &n, const value_type &x)
This function returns the value if the Polygamma function.
value_type parser_conj(const value_type &v)
Calculates the complex conjugate number of the passed complex number.
value_type parser_product(const value_type *vElements, int nElements)
This function calculates the product of all elements in the passed array.
static std::complex< double > complex_zeta(const std::complex< double > &s)
Calculates the complex-valued Riemannian Zeta function for complex numbers with Re(s) >= 0.
value_type parser_mph(const value_type &v)
Conversion function for 1mph.
value_type parser_rect2polar(const value_type &v)
Converts a rectangular representation into polar representation and returns it as a new complex numbe...
value_type parser_XOR(const value_type &v1, const value_type &v2)
This function represent the XOR operator.
value_type parser_AiryB(const value_type &x)
This function calculates the Airy function Bi(x).
value_type parser_Celsius(const value_type &v)
Conversion function for 1°C.
std::mt19937 & getRandGenInstance()
Returns a reference to the central random number generator instance, which is globally accessible by ...
std::complex< double > intPower(const std::complex< double > &, int)
This function calculates the power of a value with the specialization that the exponent is an integer...
static const char UBUNTU_VERSION_STYLE[]
CONSTCD14 To round(const std::chrono::duration< Rep, Period > &d)
CONSTCD14 std::enable_if< detail::no_overflow< Period, typenameTo::period >::value, To >::type floor(const std::chrono::duration< Rep, Period > &d)
CONSTCD11 std::chrono::duration< Rep, Period > abs(std::chrono::duration< Rep, Period > d)
CONSTCD14 To ceil(const std::chrono::duration< Rep, Period > &d)
MUP_BASETYPE value_type
The numeric datatype used by the parser.
bool isnan(const value_type &v)
std::vector< double > real(const std::vector< value_type > &vVec)
string_type::value_type char_type
The character type used by the parser.
bool isinf(const value_type &v)
value_type rint(value_type v)
This structure defines all fields necessary to create a time stamp or a formatted date.
date::year_month_day m_ymd
std::chrono::microseconds m_microsecs
std::chrono::minutes m_minutes
std::chrono::seconds m_seconds
std::chrono::hours m_hours
std::chrono::milliseconds m_millisecs
long long int intCast(const std::complex< double > &)
Casts the real part of the complex number to an integer and avoids rounding errors.
double student_t(int nFreedoms, double dConfidenceInterval)
Calculate the student_t value for the selected degrees of freedoms and the desired confidence interva...