private double computeOverlap() {
        for (int c = 0; c < numFClusters; c++) {
            if (!(clustering.get(c) instanceof SphereCluster)) {
                System.out.println("Compactness only supports Sphere Cluster. Found: " + clustering.get(c).getClass());
                return Double.NaN;
            }
        }

        boolean[] overlap = new boolean[numFClusters];

        for (int c0 = 0; c0 < numFClusters; c0++) {
            if (overlap[c0]) continue;
            SphereCluster s0 = (SphereCluster) clustering.get(c0);
            for (int c1 = c0; c1 < clustering.size(); c1++) {
                if (c1 == c0) continue;
                SphereCluster s1 = (SphereCluster) clustering.get(c1);
                if (s0.overlapRadiusDegree(s1) > 0) {
                    overlap[c0] = overlap[c1] = true;
                }
            }
        }

        double totalOverlap = 0;
        for (int c0 = 0; c0 < numFClusters; c0++) {
            if (overlap[c0])
                totalOverlap++;
        }

        //        if(totalOverlap/(double)numFClusters > .8) RunVisualizer.pause();
        return totalOverlap / (double) numFClusters;
    }