![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Functions | |
| double | gammaln (double x) |
| MATLAB's gammaln. | |
| double | gammainc_upper (double x, double a) |
| MATLAB's gammainc(x, a, 'upper'), the regularized upper tail Q(a, x). | |
| double | gammainc_lower (double x, double a) |
| MATLAB's gammainc(x, a, 'lower'), the regularized lower tail P(a, x). | |
| double | besseli1_scaled (double x) |
| MATLAB's besseli(1, x, 1) = I_1(x) exp(-x), x >= 0. | |
| std::vector< double > | geometric (double c, double r, long nmax) |
| The 0:nmax power law c*r. | |
| double | ccdf_inverse (const std::function< double(double)> &ccdf, double target, double hi) |
| The bisection inverse of a complementary CDF shared by the reference's functions (ccdf_inverse / mmck_ccdf_inverse / mmckk_ccdf_inverse): the time at which ccdf falls to target, bracketing upward from hi. | |
| double | vsum (const std::vector< double > &x) |
| sum(x) | |
| std::vector< double > | lognormalize (const std::vector< double > &logp, const std::vector< double > &lognorm) |
| exp(logp - logsumexp(lognorm)), the reference's log-space normalization. | |
| std::vector< double > | cdf_of (const std::function< double(double)> &ccdf, const std::vector< double > &t) |
| Fills out with 1 - ccdf(t) at each t, as 1 - arrayfun(ccdf, t). | |
| std::vector< double > | pct_of (const std::function< double(double)> &ccdf, const std::vector< double > &pct, double hi) |
| The percentiles by bisection, arrayfun(@(r) ccdf_inverse(ccdf, 1 - r/100, hi), pct). | |
| void | require_stable (double rho, const char *fn) |
| The reference's LINE:input:Unstable refusal. | |
| void | throw_unstable (const char *fn, const char *what, double v) |
| A LINE:input:Unstable refusal "fn: unstable system: <what> = %g >= 1". | |
| void | throw_unknown_option (const char *fn, const std::string &name, bool argument_id) |
| MATLAB's "unknown option 'name'" refusal, as LINE:input:Argument or as a bare LINE:Error. | |
| double | nchoosek_r (double n, double k) |
| The reference's nchoosek_r: exp(gammaln) rounded to the integer it is while that integer is exactly representable (below 2^52). | |
| void | check_percentiles (const std::vector< double > &pct, const char *fn) |
| A percentile vector checked against (0, 100), MATLAB's LINE:Error refusal. | |
|
inline |
MATLAB's besseli(1, x, 1) = I_1(x) exp(-x), x >= 0.
Past the range where I_1 itself is finite the Hankel asymptotic expansion of the scaled function is used (six terms, relative error far below 1e-15 at x > 600).
Definition at line 132 of file qsys_res.h.
References besseli1_scaled().
Referenced by besseli1_scaled().
|
inline |
The bisection inverse of a complementary CDF shared by the reference's functions (ccdf_inverse / mmck_ccdf_inverse / mmckk_ccdf_inverse): the time at which ccdf falls to target, bracketing upward from hi.
Definition at line 156 of file qsys_res.h.
References ccdf_inverse().
Referenced by ccdf_inverse(), and pct_of().
|
inline |
Fills out with 1 - ccdf(t) at each t, as 1 - arrayfun(ccdf, t).
Definition at line 189 of file qsys_res.h.
References cdf_of().
Referenced by cdf_of().
|
inline |
A percentile vector checked against (0, 100), MATLAB's LINE:Error refusal.
Definition at line 236 of file qsys_res.h.
References check_percentiles(), and line::Error::Error().
Referenced by check_percentiles().
|
inline |
MATLAB's gammainc(x, a, 'lower'), the regularized lower tail P(a, x).
Definition at line 121 of file qsys_res.h.
References gammainc_lower().
Referenced by gammainc_lower().
|
inline |
MATLAB's gammainc(x, a, 'upper'), the regularized upper tail Q(a, x).
Definition at line 114 of file qsys_res.h.
References gammainc_upper().
Referenced by gammainc_upper().
|
inline |
MATLAB's gammaln.
Definition at line 111 of file qsys_res.h.
References gammaln().
Referenced by line::qsys::engsetdetail::engset_dist(), and gammaln().
|
inline |
The 0:nmax power law c*r.
^(0:nmax).
Definition at line 145 of file qsys_res.h.
References geometric().
Referenced by geometric().
|
inline |
exp(logp - logsumexp(lognorm)), the reference's log-space normalization.
Definition at line 177 of file qsys_res.h.
References lognormalize().
Referenced by lognormalize().
|
inline |
The reference's nchoosek_r: exp(gammaln) rounded to the integer it is while that integer is exactly representable (below 2^52).
Definition at line 230 of file qsys_res.h.
References nchoosek_r().
Referenced by nchoosek_r(), and line::qsys::qsys_mg1kk().
|
inline |
The percentiles by bisection, arrayfun(@(r) ccdf_inverse(ccdf, 1 - r/100, hi), pct).
Definition at line 196 of file qsys_res.h.
References ccdf_inverse(), and pct_of().
Referenced by pct_of().
|
inline |
The reference's LINE:input:Unstable refusal.
Definition at line 204 of file qsys_res.h.
References line::ErrorKind::ErrorKind(), line::InputError::InputError(), and require_stable().
Referenced by require_stable().
|
inline |
MATLAB's "unknown option 'name'" refusal, as LINE:input:Argument or as a bare LINE:Error.
Definition at line 220 of file qsys_res.h.
References line::Error::Error(), line::ErrorKind::ErrorKind(), line::InputError::InputError(), and throw_unknown_option().
Referenced by throw_unknown_option().
|
inline |
A LINE:input:Unstable refusal "fn: unstable system: <what> = %g >= 1".
Definition at line 213 of file qsys_res.h.
References line::ErrorKind::ErrorKind(), line::InputError::InputError(), and throw_unstable().
Referenced by line::qsys::qsys_mg1_busy(), line::qsys::qsys_mg1_conservation(), line::qsys::qsys_mg1_exceptional(), line::qsys::qsys_mg1_prio_pr(), line::qsys::qsys_mg1_setup(), line::qsys::qsys_mg1_sjf(), line::qsys::qsys_mmc_prio(), line::qsys::qsys_mmc_prio_eta(), line::qsys::qsys_mmc_prio_tardiness(), and throw_unstable().
|
inline |