%%%
function d = Ddst(X, map, lambda, p, m, K)
d = 0;
for i = 1: m
    for j = 1:K
        d = d + p(i,j)*dist(X(i,:),map(:,i),lambda(:,j));
    end
end
d = d/m;
