public static List<Cluster> getMostSpreadOutClusters(final ClusterSet clusterSet, final ClusterSetInfo info,
                    int count) {
        List<Cluster> clusters = new ArrayList<>(clusterSet.getClusters());
        Collections.sort(clusters, new Comparator<Cluster>() {
            public int compare(Cluster o1, Cluster o2) {
                Double o1TotalDistance = info.getClusterInfo(o1.getId()).getTotalPointDistanceFromCenter();
                Double o2TotalDistance = info.getClusterInfo(o2.getId()).getTotalPointDistanceFromCenter();
                int comp = o1TotalDistance.compareTo(o2TotalDistance);
                return !clusterSet.getClusters().get(0).isInverse() ? -comp : comp;
            }
        });

        return clusters.subList(0, count);
    }
public static List < Cluster > getMostSpreadOutClusters ( final ClusterSet clusterSet , final ClusterSetInfo info , int count ) { List < Cluster > clusters = new ArrayList < > ( clusterSet . getClusters ( ) ) ; Collections . sort ( clusters , new Comparator < Cluster > ( ) { public int compare ( Cluster o1 , Cluster o2 ) { Double o1TotalDistance = info . getClusterInfo ( o1 . getId ( ) ) . getTotalPointDistanceFromCenter ( ) ; Double o2TotalDistance = info . getClusterInfo ( o2 . getId ( ) ) . getTotalPointDistanceFromCenter ( ) ; int comp = o1TotalDistance . compareTo ( o2TotalDistance ) ; return ! clusterSet . getClusters ( ) . get ( 0 ) . isInverse ( ) ? - comp : comp ; } } ) ; return clusters . subList ( 0 , count ) ; }
@param clusterSet
@param info
@param count
@return