LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
map_dist_acf.m
1function d = map_dist_acf(MAPA,MAPB,alA,alB)
2% d=map_dist_acf(MAPA,MAPB,alA,alB) - Squared L2 distance between the
3% autocorrelation functions of two MAPs.
4%
5% Reference:
6% G. Horvath, "Measuring the distance between MAPs and some
7% applications," in Proc. ASMTA 2015, LNCS 9081, pp. 95-109.
8% https://link.springer.com/chapter/10.1007/978-3-319-18579-8_8
9%
10% Input:
11% MAPA: first MAP in the form of {D0,D1}
12% MAPB: second MAP in the form of {D0,D1}
13% alA,alB: (optional) stationary vectors at arrival epochs
14%
15% Output:
16% d: squared L2 distance of autocorrelation functions
17
18A0=MAPA{1}; B0=MAPB{1};
19if nargin<4, alB=map_pie(MAPB); end
20if nargin<3, alA=map_pie(MAPA); end
21
22momA = map_moment(MAPA, [1 2]);
23momB = map_moment(MAPB, [1 2]);
24mA = momA(1); mB = momB(1);
25varA = momA(2)-mA^2;
26varB = momB(2)-mB^2;
27
28d = (map_geo_mul_sum(MAPA,MAPA,alA,alA) - momA(2)^2/4) / varA^2 ...
29 - 2*(map_geo_mul_sum(MAPA,MAPB,alA,alB) - momA(2)*momB(2)/4) / varA / varB ...
30 + (map_geo_mul_sum(MAPB,MAPB,alB,alB) - momB(2)^2/4) / varB^2;
31end