QUICK CLUSTER: Remove sqrt from Euclidean distance calculations
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 13 Nov 2015 12:57:38 +0000 (13:57 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 13 Nov 2015 19:39:20 +0000 (20:39 +0100)
commit654d2360a1dce57033dbf0030d17522d3c797987
treeefbd4547f90e62048fa0b2e3e161c3841cea53b8
parent1ce269be245e84fce66e071f195a28ac93ad8c54
QUICK CLUSTER: Remove sqrt from Euclidean distance calculations

The Euclidean distance is used only for comparison with other Euclidean
distances.  Since it is invariant that (sqrt(x) < sqrt(y))  === (x < y)
for all non-negative x,y  it is a waste of effort calculating the sqrt.
src/language/stats/quick-cluster.c