public void addPoint(double x, double y) {
        numItems++;
        double xMinusMeanX = x - meanx;
        double yMinusMeanY = y - meany;
        sumsq += xMinusMeanX * yMinusMeanY * (numItems - 1) / numItems;
        meanx += xMinusMeanX / numItems;
        meany += yMinusMeanY / numItems;
    }
public void addPoint ( double x , double y ) { numItems ++ ; double xMinusMeanX = x - meanx ; double yMinusMeanY = y - meany ; sumsq += xMinusMeanX * yMinusMeanY * ( numItems - 1 ) / numItems ; meanx += xMinusMeanX / numItems ; meany += yMinusMeanY / numItems ; }
Update the covariance with another point.

@param x
x value
@param y
y value