LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
mtrace_sigma2.h File Reference

Two-step class transition frequencies of a marked trace,. 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"
Include dependency graph for mtrace_sigma2.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::trace

Functions

template<class T>
Matrix< T > line::trace::mtrace_sigma2 (const std::vector< int > &L)
 Two-step class transition frequencies of a marked trace, sigma(i,j,h) = #{t : A_t = i, A_{t+1} = j, A_{t+2} = h} / (N-2).

Detailed Description

Two-step class transition frequencies of a marked trace,.

sigma(i,j,h) = #{t : A_t = i, A_{t+1} = j, A_{t+2} = h} / (N-2).

Templated port of matlab/lib/m3a/m3a/mtrace/mtrace_sigma2.m, cross-checked against jar/src/main/java/jline/api/trace/Mtrace_sigma2.java (identical).

The three-index array is returned flattened into a C x C^2 matrix, row i and column j*C + h, so that it needs no tensor type; summing it gives 1 and summing over h reproduces mtrace_sigma up to the different denominator.

ARITHMETIC: counts over N-2, exact in Rational.

Definition in file mtrace_sigma2.h.