The update of the k-distance does the opposite of the intention right now. The solution is to invert the comparator in this case so that elements are (partially) ordered in reverse so the most important element has the lowest number.
Actually, this was a set of faults in the code that seemed to be that the k distance was incorrect updated. Actually, it was the underlying nearest neighbours that were incorrectly updated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually, this was a set of faults in the code that seemed to be that the k distance was incorrect updated. Actually, it was the underlying nearest neighbours that were incorrectly updated.
Fixed in release 0.3