1function d = map_exp_mul_int(MAPA,MAPB,L,alA,alB)
2% d=map_exp_mul_int(MAPA,MAPB,L,alA,alB) - Joint density inner product
3% of two MAPs via recursive Sylvester (Lyapunov) equations.
6% G. Horvath,
"Measuring the distance between MAPs and some
7% applications," in Proc. ASMTA 2015, LNCS 9081, pp. 95-109.
11% MAPA: first MAP in the form of {D0,D1}
12% MAPB: second MAP in the form of {D0,D1}
13% L: number of inter-arrival times in the joint density
14% alA,alB: (optional) stationary vectors at arrival epochs
17% d: inner product of joint densities
19A0=MAPA{1}; A1=MAPA{2};
20B0=MAPB{1}; B1=MAPB{2};
27Z = lyap(B0
', A0, alB'*alA);
29 Z = lyap(B0
', A0, B1'*Z*A1);
31d = sum(-B0,2)
' * Z * sum(-A0,2);