modules/ml-ext/ml/src/main/java/org/apache/ignite/ml/clustering/gmm/CovarianceMatricesAggregator.java [157:173]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    static List<CovarianceMatricesAggregator> reduce(List<CovarianceMatricesAggregator> l,
        List<CovarianceMatricesAggregator> r) {

        A.ensure(l != null || r != null, "Both partitions cannot equal to null");

        if (l == null || l.isEmpty())
            return r;
        if (r == null || r.isEmpty())
            return l;

        A.ensure(l.size() == r.size(), "l.size() == r.size()");
        List<CovarianceMatricesAggregator> res = new ArrayList<>();
        for (int i = 0; i < l.size(); i++)
            res.add(l.get(i).plus(r.get(i)));

        return res;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



modules/ml-ext/ml/src/main/java/org/apache/ignite/ml/clustering/gmm/MeanWithClusterProbAggregator.java [151:166]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    static List<MeanWithClusterProbAggregator> reduce(List<MeanWithClusterProbAggregator> l,
        List<MeanWithClusterProbAggregator> r) {
        A.ensure(l != null || r != null, "Both partitions cannot equal to null");

        if (l == null || l.isEmpty())
            return r;
        if (r == null || r.isEmpty())
            return l;

        A.ensure(l.size() == r.size(), "l.size() == r.size()");
        List<MeanWithClusterProbAggregator> res = new ArrayList<>();
        for (int i = 0; i < l.size(); i++)
            res.add(l.get(i).plus(r.get(i)));

        return res;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



