Commit 5d079fbd authored by lafabregue's avatar lafabregue

fix ROI compatibilty with new version

parent f7a5a66a
......@@ -133,8 +133,10 @@ public class SimpleClusteringResult extends ClusteringResult {
this.clusterMap = new int[clusterMap.length];
for (int i = 0; i < this.clusterMap.length; i++) {
this.clusterMap[i] = clusterMap[i];
// we save the number of element in each cluster
clusterSize[clusterMap[i]]++;
// we save the number of element in each cluster, only if it is classified
if (clusterMap[i] >= 0) {
clusterSize[clusterMap[i]]++;
}
}
final Vector<Cluster> clusters = new Vector<Cluster>();
......@@ -165,7 +167,10 @@ public class SimpleClusteringResult extends ClusteringResult {
clustersData[k] = new ArrayList<DataObject>();
}
for(int j = 0 ; j < clusterMap.length ; j++) {
((List<DataObject>) clustersData[clusterMap[j]]).add(iter.next());
// we just consider classified data
if (clusterMap[j] >= 0) {
((List<DataObject>) clustersData[clusterMap[j]]).add(iter.next());
}
}
for (int i = 0; i < nbClusters; i++) {
// if (membershipDegree == null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment