5#ifndef LINE_API_MAM_MMAP_BACKWARD_MOMENT_H
6#define LINE_API_MAM_MMAP_BACKWARD_MOMENT_H
46 const std::vector<unsigned>& orders,
48 const std::size_t n = m.
order();
49 const std::size_t C = m.
classes();
53 for (std::size_t i = 0; i < n; ++i)
54 for (std::size_t j = 0; j < n; ++j) negD0(i, j) = -negD0(i, j);
57 std::vector<std::vector<T>> B(C, std::vector<T>(orders.size(), zero));
58 for (std::size_t c = 0; c < C; ++c) {
63 for (
const T& v : t) pa += v;
66 "mmap_backward_moment: class with zero arrival probability cannot be "
69 for (std::size_t h = 0; h < orders.size(); ++h) {
70 const unsigned k = orders[h];
73 for (
const T& v : t) s += v;
83 const std::vector<unsigned>& orders) {
NumericError(const std::string &what)
The exception types the port throws.
Dense linear algebra over the templated number type: products, identity, inverse, and powers.
Markovian arrival process descriptors: stationary vectors, rate, moments, autocorrelation and the ind...
Dense matrix and non-owning view.
Marked MAP (MMAP) algebra: per-class rates, class probabilities, superposition, normalization and sca...
std::vector< std::vector< T > > mmap_backward_moment(const Mmap< T > &m, const std::vector< unsigned > &orders, bool normalized)
Class-conditional backward moments of an MMAP (mmap_backward_moment.m).
std::vector< T > map_pie(const Map< T > &m)
Phase distribution seen by an arriving job, pie = pi D1 / (pi D1 e).
Conservation laws of a layered queueing network, enumerated from its structure.
T num_factorial(unsigned n)
Factorial as a value of T.
std::vector< T > vecmul(const std::vector< T > &v, const Matrix< T > &A)
Row vector times matrix, v A.
Matrix< T > inverse(const Matrix< T > &A)
Inverse by LU with one factorization and n back substitutions.
Matrix< T > matpow(const Matrix< T > &A, unsigned k)
Integer matrix power, by repeated squaring.
Number-type abstraction for the templated API port.
An MMAP: the underlying MAP plus the per-class arrival matrices.
std::size_t classes() const
std::vector< Matrix< T > > Dc
per-class matrices, sum_c Dc = D1
std::size_t order() const