![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Analytic distances between continuous-time MAPs. More...
#include <cstddef>#include <vector>#include "line/api/mam/dmap.h"#include "line/api/mam/map_moment.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/linalg.h"#include "line/util/lu.h"#include "line/util/matrix.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::mam |
Functions | |
| template<class T> | |
| T | line::mam::map_exp_mul_int (const Map< T > &a, const Map< T > &b, unsigned L, const std::vector< T > &alA, const std::vector< T > &alB) |
| Integral of the product of the two interarrival densities up to lag L. | |
| template<class T> | |
| T | line::mam::map_exp_mul_int (const Map< T > &a, const Map< T > &b, unsigned L) |
| map_exp_mul_int with both stationary embedded distributions taken from the MAPs. | |
| template<class T> | |
| T | line::mam::map_geo_mul_sum (const Map< T > &a, const Map< T > &b, const std::vector< T > &alA, const std::vector< T > &alB) |
| Geometrically weighted sum of the cross moments of the two embedded chains. | |
| template<class T> | |
| T | line::mam::map_geo_mul_sum (const Map< T > &a, const Map< T > &b) |
| map_geo_mul_sum with both embedded distributions taken from the MAPs. | |
| template<class T> | |
| T | line::mam::map_dist (const Map< T > &a, const Map< T > &b, unsigned L, const std::vector< T > &alA, const std::vector< T > &alB) |
| Squared L2 distance between the two joint densities up to lag L (map_dist.m). | |
| template<class T> | |
| T | line::mam::map_dist (const Map< T > &a, const Map< T > &b, unsigned L) |
| map_dist with both embedded distributions taken from the MAPs. | |
| template<class T> | |
| T | line::mam::map_dist_acf (const Map< T > &a, const Map< T > &b, const std::vector< T > &alA, const std::vector< T > &alB) |
| Squared L2 distance between the two autocorrelation functions (map_dist_acf.m). | |
| template<class T> | |
| T | line::mam::map_dist_acf (const Map< T > &a, const Map< T > &b) |
| map_dist_acf with both embedded distributions taken from the MAPs. | |
| template<class T> | |
| T | line::mam::map_dist_lag1 (const Map< T > &a, const Map< T > &b, const std::vector< T > &alA, const std::vector< T > &alB) |
| Squared L2 distance between the two lag-one joint densities (map_dist_lag1.m). | |
| template<class T> | |
| T | line::mam::map_dist_lag1 (const Map< T > &a, const Map< T > &b) |
| map_dist_lag1 with both embedded distributions taken from the MAPs. | |
Analytic distances between continuous-time MAPs.
Templated port of matlab/lib/kpctoolbox/map: map_exp_mul_int.m, map_geo_mul_sum.m, map_dist.m, map_dist_acf.m, map_dist_lag1.m and map_feastol.m. These are the objective functions the KPC fitters minimise, so they are evaluated once per iteration and must agree with the reference to full precision, not merely to the tolerance of a fitted MAP.
The discrete-time twins live in dmap.h and rest on Stein equations A X B - X + C = 0; the continuous ones rest on Sylvester equations A X + X B + C = 0, MATLAB's three-argument lyap. Both are solved here through the Kronecker form, which is exact in the rational backend where a Schur-based solver could not be. The single exception is map_geo_mul_sum, which still needs a Stein solve because its recursion is on the embedded chain rather than on the generator.
SIGN TRAP: MATLAB's lyap(A, B, C) solves A X + X B + C = 0, so C enters with a PLUS. Reading it as the control-theory Lyapunov equation A X + X A' = -C flips the sign of every distance and leaves the minimiser unchanged, which is why a fitter can look healthy on top of the error.
Definition in file map_dist.h.