5#ifndef LINE_API_MAM_M3A_FIT_FROM_H
6#define LINE_API_MAM_M3A_FIT_FROM_H
58void trace_moments3(
const std::vector<T>& S, T* m1, T* m2, T* m3) {
59 if (S.empty())
throw InputError(
"m3a fit: the trace is empty");
60 const T zero = num_traits<T>::from_int(0);
61 T a = zero, b = zero, c = zero;
62 for (std::size_t i = 0; i < S.size(); ++i) {
68 const T n = num_traits<T>::from_int(
static_cast<long>(S.size()));
86 m3adetail::trace_moments3(S, &m1, &m2, &m3);
103 m3adetail::trace_moments3(S, &m1, &m2, &m3);
AMAP(2) fit of three moments and the autocorrelation decay rate (matlab/lib/m3a/m3a/amap2/amap2_fit_g...
APH(2) fit of three moments, with a fallback to adjusted moments (matlab/lib/m3a/m3a/aph2/aph2_fit....
The exception types the port throws.
Autocorrelation decay rate of a MAP: the gamma of the geometric model rho(k) = rho0 * gamma^k with rh...
Markovian arrival process descriptors: stationary vectors, rate, moments, autocorrelation and the ind...
Amap2FitGammaResult< T > amap2_fit_gamma_map(const Map< T > &m)
Fit an AMAP(2) to the three moments and the decay rate of a MAP.
Aph2FitResult< T > aph2_fit(const T &M1, const T &M2, const T &M3)
Fit an APH(2) to (M1, M2, M3), relaxing the moments if necessary.
Amap2FitGammaResult< T > amap2_fit_gamma(const T &M1, const T &M2, const T &M3, const T &GAMMA, const T &cvtol)
Fit an AMAP(2) to (M1, M2, M3, GAMMA).
Aph2FitResult< T > aph2_fit_trace(const std::vector< T > &S)
Fit an APH(2) to the first three sample moments of a trace.
T map_mean(const Map< T > &m)
Mean inter-arrival time, 1/lambda.
Aph2FitResult< T > aph2_fit_map(const Map< T > &m)
Fit an APH(2) to the first three moments of a MAP.
T map_moment(const Map< T > &m, unsigned k)
Raw moment of order k of the inter-arrival time: k!
Amap2FitGammaResult< T > amap2_fit_gamma_trace(const std::vector< T > &S)
Fit an AMAP(2) to the three sample moments and the fitted decay rate of a trace.
T map_gamma(const Map< T > &m, long limit=1000)
Autocorrelation decay rate of a MAP (map_gamma.m).
TraceGammaResult< T > trace_gamma(const std::vector< T > &S, long limit=1000, const std::vector< T > &grid=std::vector< T >())
Autocorrelation decay rate of a trace: the gamma of the geometric model rho(k) = rho0 * gamma^k,...
Number-type abstraction for the templated API port.
Result of amap2_fit_gamma.
A MAP as the pair of matrices (D0, D1).
Autocorrelation decay rate of a trace: the gamma of the geometric model rho(k) = rho0 * gamma^k,...