Skip to content
Snippets Groups Projects
Commit cac22329 authored by ac's avatar ac
Browse files

regularize min smarter

parent e8f906fe
Branches
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@
%
% 3. Altered source versions must be plainly marked as such, and must
% not be misrepresented as being the original software.
% Cluster.Regularize
%
% 4. The name of the author may not be used to endorse or promote
% products derived from this software without specific prior written
% permission.
......@@ -65,7 +65,13 @@ D=DistanceMatrix;
% D=D/b;
for i=1:size (D,1)
for j= 1:size(D,2)
D(i,j)= min([D(i,j),D(j,i)]);
if i~=j
if 0==D(i,j) || 0==D(j,i)
D(i,j) = max(D(i,j),D(j,i));
else
D(i,j)= min(D(i,j),D(j,i));
end
end
end
D(i,i)=0;
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment