function D=cross_dis(X,Y)
M=size(Y,1);
N=size(X,1); 
A=sum(X.^2,2)*ones(1,M); 
C=ones(N,1)*sum(Y.^2,2)'; 
B=X*Y'; 
D=sqrt(A-2*B+C); 