class CovarianceMatricesAggregator implements Serializable {

    CovarianceMatricesAggregator plus(CovarianceMatricesAggregator other) {
        A.ensure(this.mean.equals(other.mean), "this.mean == other.mean");

        return new CovarianceMatricesAggregator(
            mean,
            this.weightedSum.plus(other.weightedSum),
            this.rowCount + other.rowCount
        );
    }

      CovarianceMatricesAggregator(Vector mean);
      CovarianceMatricesAggregator(Vector mean, Matrix weightedSum, int rowCount);

}