![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Index of dispersion for intervals,. More...
#include <cstddef>#include <vector>#include "line/api/trace/trace_mean.h"#include "line/api/trace/trace_types.h"#include "line/api/trace/trace_var.h"#include "line/num/number.h"#include "line/util/error.h"Go to the source code of this file.
Classes | |
| struct | line::trace::TraceIdiResult< T > |
| Return value of trace_idi, mirroring [IDIk, support]. More... | |
Namespaces | |
| namespace | line |
| namespace | line::trace |
Functions | |
| template<class T> | |
| TraceIdiResult< T > | line::trace::trace_idi (const std::vector< T > &S, const std::vector< long > &k_set, long aggregate_n=0, bool drop_trailing_zero=false) |
| Index of dispersion for intervals, IDI(k) = k * var(S_t + ... + S_{t+k-1}) / mean(S_t + ... + S_{t+k-1})^2, the standard burstiness descriptor of Sriram and Whitt (JSAC 6, 1986). | |
Index of dispersion for intervals,.
IDI(k) = k * var(S_t + ... + S_{t+k-1}) / mean(S_t + ... + S_{t+k-1})^2,
the standard burstiness descriptor of Sriram and Whitt (JSAC 6, 1986).
Templated port of matlab/lib/kpctoolbox/trace/trace_idi.m, cross-checked against jar/src/main/java/jline/api/trace/Trace_var.java#trace_idi.
REFERENCE DEFECT (both codebases, identical): the vector of aggregated samples is allocated with length(S)-k entries but the loop fills only length(S)-k-1 of them, so a spurious ZERO sample is always included in the variance and the mean. The bias is O(1/(n-k)) and vanishes for long traces, but it is real and it is reproduced here deliberately: removing it would silently change every IDI/IDC value LINE reports. The drop_trailing_zero flag computes the intended statistic instead.
DIVERGENCE, MATLAB vs JAR: MATLAB's var uses the n-1 denominator, the JAR's trace_var uses n; MATLAB is the reference. The 'aggregate-mix' branch of trace_idi.m is not ported – it partitions the trace by a per-sample aggregation-count vector that no caller in LINE supplies, and its MATLAB implementation overwrites Sk on every outer iteration, so what it returns is the statistic of the last partition only.
ARITHMETIC: sums, a variance and a division, exact in Rational.
Definition in file trace_idi.h.