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

Shared scalar machinery for the integration / asymptotic members of the pfqn family (pfqn_le, pfqn_lap, pfqn_ls, pfqn_cub, pfqn_kt, pfqn_panacea, the McKenna-Mitra quadratures, pfqn_nrl / pfqn_nrp). More...

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

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::pfqn

Detailed Description

Shared scalar machinery for the integration / asymptotic members of the pfqn family (pfqn_le, pfqn_lap, pfqn_ls, pfqn_cub, pfqn_kt, pfqn_panacea, the McKenna-Mitra quadratures, pfqn_nrl / pfqn_nrp).

Nothing here mirrors a MATLAB file of its own: MATLAB gets log-gamma from gammaln, determinants from det, quadrature nodes from a .mat table and complex arithmetic from the language. Those four facilities have to be supplied explicitly in a templated port, and putting them in one header keeps each ported algorithm a 1:1 image of its MATLAB source.

ARITHMETIC. Every function here is inherently inexact – log-gamma, the Gauss node polynomials and the complex exponential all leave the rationals – so each is gated on num_traits<T>::has_transcendental. The determinant is the exception: it is a finite sequence of field operations and is therefore left exact and ungated, so a bound or a Hessian determinant can still be evaluated in rational arithmetic.

PRECISION CEILING of num_lgamma. For an integer argument the value is the exact sum log 1 + ... + log n, accumulated in T, so a Real<D> instantiation gains the full D digits. For a non-integer argument the Lanczos g=7 coefficients are double constants, which caps the relative accuracy near 1e-15 whatever T is. Only pfqn_propfair evaluates log-gamma off the integers, and its own optimizer tolerance is far above that ceiling.

Definition in file pfqn_asympt_common.h.