1function d = dmap_geo_mul_sum(DMAPA,DMAPB,alA,alB)
2% d=dmap_geo_mul_sum(DMAPA,DMAPB,alA,alB) - Geometric sum
for
3% autocorrelation distance computation of discrete-time MAPs.
5% Reference (continuous-time formulation):
6% G. Horvath,
"Measuring the distance between MAPs and some
7% applications," in Proc. ASMTA 2015, LNCS 9081, pp. 95-109.
10% Discrete-time extension by QORE Lab (https:
13% DMAPA: first D-MAP in the form of {D0,D1}
14% DMAPB: second D-MAP in the form of {D0,D1}
15% alA,alB: (optional) stationary vectors at arrival epochs
18% d: geometric sum value
20D0A=DMAPA{1}; D1A=DMAPA{2};
21D0B=DMAPB{1}; D1B=DMAPB{2};
22NA = size(D0A,1); NB = size(D0B,1);
23if nargin<4, alB=dtmc_solve(inv(eye(NB)-D0B)*D1B); end
24if nargin<3, alA=dtmc_solve(inv(eye(NA)-D0A)*D1A); end
26IA = eye(NA); IB = eye(NB);
30PAh = D0Ai*D1A - ones(NA,1)*alA;
31PBh = D0Bi*D1B - ones(NB,1)*alB;
33M = eye(NA*NB) - kron(PBh
', PAh);
37 X = dlyap(PAh, PBh, sum(D0Ai,2)*(alB*D0Bi));
38 d = sum(alA*D0Ai*X*D0Bi);