diff --git a/src/main/java/org/apache/commons/math/stat/clustering/EuclideanIntegerPoint.java b/src/main/java/org/apache/commons/math/stat/clustering/EuclideanIntegerPoint.java index 49dd71cf0..43b5474f7 100644 --- a/src/main/java/org/apache/commons/math/stat/clustering/EuclideanIntegerPoint.java +++ b/src/main/java/org/apache/commons/math/stat/clustering/EuclideanIntegerPoint.java @@ -98,5 +98,20 @@ public class EuclideanIntegerPoint implements Clusterable } return hashCode; } + + /** {@inheritDoc} */ + @Override + public String toString() { + final StringBuffer buff = new StringBuffer("("); + final int[] coordinates = getPoint(); + for (int i = 0; i < coordinates.length; i++) { + buff.append(coordinates[i]); + if (i < coordinates.length - 1) { + buff.append(","); + } + } + buff.append(")"); + return buff.toString(); + } }