LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
infradius_h.h File Reference

Integrands of the Norlund-Rice inversion of the normalizing constant, in their two changes of variable. More...

#include <cmath>
#include <cstddef>
#include <vector>
#include "line/api/pfqn/pfqn_asympt_common.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for infradius_h.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
line::pfqn::infradius_h (const std::vector< T > &x, const Matrix< T > &L, const std::vector< T > &N, const Matrix< T > &alpha)
 Logistic-substitution integrand (matlab/src/api/pfqn/infradius_h.m).
template<class T>
line::pfqn::infradius_hnorm (const std::vector< T > &x, const Matrix< T > &L, const std::vector< T > &N, const Matrix< T > &alpha)
 Normal-CDF substitution integrand (matlab/src/api/pfqn/infradius_hnorm.m).

Detailed Description

Integrands of the Norlund-Rice inversion of the normalizing constant, in their two changes of variable.

Templated port of matlab/src/api/pfqn/infradius_h.m (logistic substitution, used by pfqn_nrl) and matlab/src/api/pfqn/infradius_hnorm.m (normal-CDF substitution, used by pfqn_nrp). Both map the Cauchy contour integral for G onto R^R and evaluate

h(x) = Re[ gld( sum_r L(:,r) e^{2 pi i (t_r - tbar)}, Ntot, alpha ) ] * jac(x)

with t the substituted variable, tbar = sum_r beta_r t_r, beta = N/Ntot, and the Jacobian prod_r e^{x_r}/(1+e^{x_r})^2 for the logistic map or prod_r phi(x_r) for the normal one. gld is the single-class load-dependent normalizing constant evaluated at COMPLEX demands.

COMPLEX gld. MATLAB gets complex arithmetic from the language: pfqn_gld detects a non-real demand vector and takes its linear-scale recursion, since the logarithms it otherwise uses are not defined there. There is no num_traits for a complex type here, so the recursion is carried out explicitly on the Cx<T> pairs of pfqn_asympt_common.h; it is the same recursion g(m,n,tm) = g(m-1,n,1) + L_m g(m,n-1,tm+1)/mu(m,tm), and it remains exact in the field, only complex.

PRECISION CEILING of the normal substitution. normcdf and normpdf need the error function, which is not available uniformly across the arithmetic backends, so infradius_hnorm evaluates the standard normal CDF by converting to double, calling std::erfc, and converting back. That caps infradius_hnorm – and therefore pfqn_nrp – near 1e-15 relative whatever T is. infradius_h has no such ceiling: the logistic map needs only exp.

ARITHMETIC. Both integrands are gated on num_traits<T>::has_transcendental: exp, cos and sin are unavoidable, and so is erfc for the normal one.

Definition in file infradius_h.h.