LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
map_dist.m
1function d = map_dist(MAPA,MAPB,L,alA,alB)
2% d=map_dist(MAPA,MAPB,L,alA,alB) - Squared L2 distance between the
3% lag-L joint densities 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% L: number of lags (L=1 for lag-1 joint density distance)
14% alA,alB: (optional) stationary vectors at arrival epochs
15%
16% Output:
17% d: squared L2 distance
18
19if nargin<5, alB=map_pie(MAPB); end
20if nargin<4, alA=map_pie(MAPA); end
21d = map_exp_mul_int(MAPA,MAPA,L+1,alA,alA) ...
22 - 2*map_exp_mul_int(MAPA,MAPB,L+1,alA,alB) ...
23 + map_exp_mul_int(MAPB,MAPB,L+1,alB,alB);
24end