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

Variance of the counts of a MAP over windows of length t, in the spelling of matlab/lib/kpctoolbox/map/map_varcount.m. More...

#include <cstddef>
#include <vector>
#include "line/api/mam/map_count_var.h"
#include "line/api/mam/map_moment.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/expm.h"
#include "line/util/linalg.h"
#include "line/util/matrix.h"
Include dependency graph for map_varcount.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::mam

Functions

template<class T>
std::vector< T > line::mam::map_varcount (const Map< T > &m, const std::vector< T > &tset)
 Variance of the counts of a MAP over windows of length t, in the spelling of matlab/lib/kpctoolbox/map/map_varcount.m.

Detailed Description

Variance of the counts of a MAP over windows of length t, in the spelling of matlab/lib/kpctoolbox/map/map_varcount.m.

With Q = D0 + D1, pi the stationary phase vector, lambda = pi D1 e and tmp = (e pi - Q)^-1,

Var[N(t)] = (lambda - 2 lambda^2 + 2 pi D1 tmp D1 e) t

  • 2 pi D1 (I - exp(Q t)) tmp^2 D1 e.

This is algebraically identical to map_count_var.m (see map_count_var.h): e pi and Q commute because Q e = 0 and pi Q = 0, so tmp commutes with exp(Q t) and tmp (I - exp) tmp = (I - exp) tmp^2. Both spellings are ported because both are called from the MATLAB tree – map_acfc.m normalizes by map_varcount, not by map_count_var – and their agreement is a useful check on the exponential.

ARITHMETIC: transcendental, as map_count_var.

Definition in file map_varcount.h.