src/main/java/it/uniroma2/dicii/sabd/covidproject/Query3.java
/*
    * Given a list of trend coefficient values belonging to the same cluster, computes the centroid of the cluster
    * */
Given a list of trend coefficient values belonging to the same cluster, computes the centroid of the cluster
Given a list of trend coefficient values belonging to the same cluster computes the centroid of the cluster
private static Double computeClusterCentroid(Iterable<RegionData> clusterPoints) {
        double sum = 0.0;
        int count = 0;
        for (RegionData rd : clusterPoints) {
            sum += rd.getTrendLineCoefficient();
            count += 1;
        }
        return  sum / count;
    }
private static Double computeClusterCentroid ( Iterable < RegionData > clusterPoints ) { double sum = 0.0 ; int count = 0 ; for ( RegionData rd : clusterPoints ) { sum += rd . getTrendLineCoefficient ( ) ; count += 1 ; } return sum / count ; }
Given a list of trend coefficient values belonging to the same cluster, computes the centroid of the cluster
Given a list of trend coefficient values belonging to the same cluster computes the centroid of the cluster