![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Per-class count process of a marked trace on a fixed resolution: the number of events of each class in the successive windows of length t that start at the first arrival epoch. More...
#include <cstddef>#include <vector>#include "line/api/trace/trace_types.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::trace::MtraceCountResult< T > |
| Return value of mtrace_count. More... | |
Namespaces | |
| namespace | line |
| namespace | line::trace |
Functions | |
| template<class T> | |
| MtraceCountResult< T > | line::trace::mtrace_count (const std::vector< T > &Tv, const std::vector< int > &A, const T &t) |
| Per-class count process of a marked trace on a fixed resolution: the number of events of each class in the successive windows of length t that start at the first arrival epoch. | |
Per-class count process of a marked trace on a fixed resolution: the number of events of each class in the successive windows of length t that start at the first arrival epoch.
Templated port of matlab/lib/m3a/m3a/mtrace/mtrace_count.m.
REFERENCE DEFECT (MATLAB): the class test is A == c with c the LOOP INDEX 1..length(unique(A)), not the label unique(A)(c). Every trace whose labels are not exactly 1..C is therefore counted against the wrong classes, and labels outside that range are never counted at all – with 0/1 labels, for instance, all the zeros are dropped and the class-1 column is reported as class 1 while column 2 stays empty. This port compares against the label, which is what the header comment of the function describes.
DIVERGENCE, MATLAB vs JAR: Mtrace_count.java is not this function. It computes windowed count STATISTICS (mean, variance, index of dispersion and skewness of the count process, plus a multiscale sweep) over floor(total/window) windows, and its generateCountProcess increments every window from the previous index to the current one, so its counts are partial cumulative sums rather than per-window counts. It has no MATLAB counterpart and is not ported; the count-statistics wrapper it exists for is a composition of this function with trace_var / trace_skew.
ARITHMETIC: comparisons of cumulative sums, exact in Rational.
Definition in file mtrace_count.h.