docs: public static double uncenteredCorrelation(double[] x, double[] y) {
      final int xdim = x.length, ydim = y.length;
      if(xdim != ydim) {
        throw new IllegalArgumentException("Invalid arguments: number vectors differ in dimensionality.");
      }
      double sumXX = 0., sumYY = 0., sumXY = 0.;
      for(int i = 0; i < xdim; i++) {
        final double xv = x[i], yv = y[i];
        sumXX += xv * xv;
        sumYY += yv * yv;
        sumXY += xv * yv;
      }
      // One or both series were constant:
      if(!(sumXX > 0. && sumYY > 0.)) {
        return (sumXX == sumYY) ? 1. : 0.;
      }
      return sumXY / FastMath.sqrt(sumXX * sumYY);
    }