![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
EMMA (Extreme-value Maximum Moment Approximation) to the expected maximum of K i.i.d. More...
#include <functional>#include "line/api/fj/fj_types.h"#include "line/num/number.h"#include "line/util/error.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::fj |
Functions | |
| template<class T> | |
| T | line::fj::fj_xmax_emma (unsigned K, const T &mu) |
| Exponential branch. | |
| template<class T> | |
| T | line::fj::fj_xmax_emma (unsigned K, const std::function< T(const T &)> &Finv) |
| General branch: the caller supplies the quantile function F^{-1}. | |
EMMA (Extreme-value Maximum Moment Approximation) to the expected maximum of K i.i.d.
samples.
Templated port of matlab/src/api/fj/fj_xmax_emma.m, cross-checked against FJ_xmax.fj_xmax_emma in jar/src/main/java/jline/api/fj/FJ_xmax.java (identical; both use the same rounded constant phi = 0.570376, which is exp(-exp(-gamma)) to six places).
exponential: E[Y_K] = -(1/mu) ln(1 - phi^{1/K}) general: E[Y_K] = F^{-1}(phi^{1/K})
static_assert(num_traits<T>::has_transcendental) – a real root phi^{1/K} and a log. The general form takes the quantile function as a callable, so the caller supplies whatever inverse CDF it has.
Definition in file fj_xmax_emma.h.