Huum, for a while I write a note to define Single Linkage Clustering Algorithm..
Well, I’m afraid I forget it or lose my note, so I’d like to write it here..

From data scratch, I need to redefine it into distance matrix..
//distance matrix
for i=1 to row
for j = i+1 to row
Mat[i,j] = Euclid(Data[i], Data[j])
end
end

//finish

then I need to find the minimum for each data point, and restore it into temporary variable
//run single linkage clustering
while 1
min = 0
for i = 1 to row
for j = i+1 to row
if min > Mat[i,j] and Mat[i,j] >= 0 then
min = Mat[i,j]
Dtx = i; Dty = j //store the row column that has minimum distance
end
end

end

MatH[Dtx, Dty] = min;
Mat[Dtx, Dty] = -1;
//it means, condition never meet the minimum value, because all value has already -1
if mean = 0 then
break
end

//finish

Hope it will run well :)