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

The m3a fitters driven from a process or from a trace rather than from moments. More...

#include <cstddef>
#include <vector>
#include "line/api/mam/amap2_fit_gamma.h"
#include "line/api/mam/aph2_fit.h"
#include "line/api/mam/map_gamma.h"
#include "line/api/mam/map_moment.h"
#include "line/api/trace/trace_gamma.h"
#include "line/num/number.h"
#include "line/util/error.h"
Include dependency graph for m3a_fit_from.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::mam

Functions

template<class T>
Aph2FitResult< T > line::mam::aph2_fit_map (const Map< T > &m)
 Fit an APH(2) to the first three moments of a MAP.
template<class T>
Aph2FitResult< T > line::mam::aph2_fit_trace (const std::vector< T > &S)
 Fit an APH(2) to the first three sample moments of a trace.
template<class T>
Amap2FitGammaResult< T > line::mam::amap2_fit_gamma_map (const Map< T > &m)
 Fit an AMAP(2) to the three moments and the decay rate of a MAP.
template<class T>
Amap2FitGammaResult< T > line::mam::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.

Detailed Description

The m3a fitters driven from a process or from a trace rather than from moments.

Templated port of matlab/lib/m3a/m3a/aph2/{aph2_fit_map,aph2_fit_trace}.m and amap2/{amap2_fit_gamma_map,amap2_fit_gamma_trace}.m. Each is a four-line wrapper that measures the descriptors and hands them to the moment fitter, so what they really contribute is WHICH descriptors a given fitter consumes and how they are measured – and that is worth having in one place, because the two families disagree:

aph2_* (M1, M2, M3), no autocorrelation: an APH(2) is renewal. amap2_gamma_* (M1, M2, M3, gamma), where gamma is the autocorrelation decay rate, measured by map_gamma on a process and by trace_gamma on a trace.

THE TWO GAMMAS ARE NOT THE SAME MEASUREMENT. map_gamma reads the decay rate off the process's own autocorrelation; trace_gamma FITS one on a grid and returns the residual of that fit alongside it. The trace entry point here discards the residual, exactly as the reference does, but a caller that wants to know how well the geometric decay described the trace should call trace_gamma directly rather than infer it from the fit.

The trace moments are the RAW sample moments mean(T), mean(T^2), mean(T^3), not the unbiased estimators; that is the reference's choice and it matters at small sample sizes.

ARITHMETIC: transcendental, inherited from the fitters.

Definition in file m3a_fit_from.h.