Gilles Sadowski created MATH-1640:
-------------------------------------
Summary: "KMeansPlusPlusClusterer": Do not change caller's
arguments
Key: MATH-1640
URL: https://issues.apache.org/jira/browse/MATH-1640
Project: Commons Math
Issue Type: Improvement
Affects Versions: 3.6.1
Reporter: Gilles Sadowski
Assignee: Gilles Sadowski
Fix For: 4.0
Class
[{{KMeansPlusPlusClusterer}}|https://gitbox.apache.org/repos/asf?p=commons-math.git;a=blob;f=commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/ml/clustering/KMeansPlusPlusClusterer.java;h=989019466d3257d87d76b81a68d74066deb21fe8;hb=HEAD]
tries to outguess the caller by [replacing negative values with
Integer.MAX_VALUE|https://gitbox.apache.org/repos/asf?p=commons-math.git;a=blob;f=commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/ml/clustering/KMeansPlusPlusClusterer.java;h=989019466d3257d87d76b81a68d74066deb21fe8;hb=HEAD#l198].
Such a behaviour can hide bugs on the caller's side.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)