dkm icon indicating copy to clipboard operation
dkm copied to clipboard

Avoid asking for a discrete_distribution when all weights are zero

Open hedtke opened this issue 3 years ago • 1 comments

I have the case that I sometimes ask for k-means when all input points are identical. Then all distances are zero and thus std::discrete_distribution is called with weight vector containing only zeros. On my platform, that results in a floating-point exception.

This could probably also fix

hedtke avatar Mar 24 '21 12:03 hedtke

this could probably also resolve issue #20, but I do not have access to VS to check that

hedtke avatar Mar 24 '21 12:03 hedtke