class ClusterEvaluationUtil implements AllWindowFunction<Row, Row, TimeWindow> {

    public static Params getBasicClusterStatistics(Iterable<Row> rows){
        Map<String, Double> map = new HashMap<>(0);
        int count = 0;
        for (Row row : rows) {
            if(row != null && row.getField(0) != null) {
                count++;
                String key = row.getField(0).toString();
                map.merge(key, 1.0, (k,v) -> k + 1.0);
            }
        }
        int c = 0;
        double[] values = new double[map.size()];
        String[] keys = new String[map.size()];
        for(Map.Entry<String, Double> entry : map.entrySet()){
            keys[c] = entry.getKey();
            values[c++] = entry.getValue();
        }
        return new Params()
            .set(ClusterMetrics.COUNT, count)
            .set(ClusterMetrics.K, map.size())
            .set(ClusterMetrics.CLUSTER_ARRAY, keys)
            .set(ClusterMetrics.COUNT_ARRAY, values);
    }

    public  ClusterEvaluationUtil(ContinuousDistance distance);

}