![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Counting process of a trace: the number of arrivals in the window of length scale that starts at each arrival epoch. More...
#include <cstddef>#include <vector>#include "line/api/trace/trace_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::trace |
Functions | |
| template<class T> | |
| std::vector< long > | line::trace::trace_iat2counts (const std::vector< T > &S, const T &scale) |
| Counting process of a trace: the number of arrivals in the window of length scale that starts at each arrival epoch. | |
Counting process of a trace: the number of arrivals in the window of length scale that starts at each arrival epoch.
Templated port of matlab/lib/kpctoolbox/trace/trace_iat2counts.m, cross-checked against jar/src/main/java/jline/api/trace/Trace_var.java#trace_iat2counts.
With CS the cumulative arrival epochs, MATLAB advances cur while CS(cur+1) - CS(i) <= scale, i.e. it measures the window from the epoch of the i-th arrival, and returns cur-i arrivals. The series is truncated at the first window that reaches the end of the trace, because from there on the count is censored.
DIVERGENCE, MATLAB vs JAR: the JAR compares CS[cur+1]-CS[i] with its CS indexed from 0, where CS[i] is the epoch of arrival i-1, not i. Its window therefore starts one arrival too early and its counts are shifted by one index relative to MATLAB. MATLAB is the reference here.
ARITHMETIC: only additions and comparisons, exact in Rational.
Definition in file trace_iat2counts.h.