lbehnke / hierarchical-clustering-java

Implementation of an agglomerative hierarchical clustering algorithm in Java. Different linkage approaches are supported.
141 stars 79 forks source link

names duplicate #7

Closed tyrcho closed 9 years ago

tyrcho commented 9 years ago

The error shown when you perform clustering with an array of non unique names is pretty tough to track ...

I suggest to add a check for uniqueness on the arguments here using for instance a new Hashset initialized with the names and compare the size of the hashset with the size of the names array.

lbehnke commented 9 years ago

Sounds good. Could you send a pull request?

tyrcho commented 9 years ago

OK, I'll try to have a look at it next week.