Itseez/opencv — pull request #2779 by pemmanuelviel (2014-05-21 11:29:07+00:00)
Title: Kmeanspp square dist

The user was already afford a method to be sure, without any extra computational cost, that the returned distance was already ^2 (default result for L2, but not for L1).
Now we offer to the user the "int ensureSimpleDistance(int)" method to ensure L2 distance and other distances that are squared by default in FLANN will be finally squared root without any unnecessary extra computation.