![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Forward moments of a marked trace: the moments of the inter-arrival time that FOLLOWS an event of each class,. More...
#include <vector>#include "line/api/trace/mtrace_moment.h"#include "line/api/trace/trace_types.h"#include "line/num/number.h"#include "line/util/matrix.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::trace |
Functions | |
| template<class T> | |
| Matrix< T > | line::trace::mtrace_forward_moment (const std::vector< T > &Tv, const std::vector< int > &A, const std::vector< unsigned > &orders, bool norm=true) |
| Forward moments of a marked trace: the moments of the inter-arrival time that FOLLOWS an event of each class, F(c,k) = (1/(N-1)) sum_{i<N: A_i = c} T_{i+1}^k, normalized by N/count_c when norm is set, so that M_k = sum_c F(c,k) p_c. | |
Forward moments of a marked trace: the moments of the inter-arrival time that FOLLOWS an event of each class,.
F(c,k) = (1/(N-1)) sum_{i<N: A_i = c} T_{i+1}^k,
normalized by N/count_c when norm is set, so that M_k = sum_c F(c,k) p_c.
Templated port of matlab/lib/m3a/m3a/mtrace/mtrace_forward_moment.m, cross-checked against jar/src/main/java/jline/api/trace/Mtrace_forward_moment.java.
In MATLAB this function is literally mtrace_moment(T,A,orders,1,NORM) with NORM defaulting to on, and it is implemented here the same way. The two JAR divergences described in mtrace_moment.h (the sum divided by count_c already in the unnormalized branch, and the (N-1)/count_c normalization factor) apply verbatim to Mtrace_forward_moment.java as well.
ARITHMETIC: sums of integer powers and a division, exact in Rational.
Definition in file mtrace_forward_moment.h.