]> AND Private Git Repository - these_gilles.git/blob - THESE/codes/graphe/Ncut_9/X2distances.m
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
11 oct
[these_gilles.git] / THESE / codes / graphe / Ncut_9 / X2distances.m
1 function distances = X2distances(X,Sigma);\r
2 %Timothee Cour, 2004\r
3 [n,k] = size(X);\r
4 if nargin >= 2\r
5     X = X*inv(sqrtm(Sigma));\r
6 end\r
7 temp = sum(X.*X,2);\r
8 temp = repmat(temp,1,n);\r
9 distances = -2*X*X' + temp + temp';