class MillerUpdatingRegression implements UpdatingMultipleLinearRegression {

    public void addObservation(final double[] x, final double y)
    throws ModelSpecificationException {

        if ((!this.hasIntercept && x.length != nvars) ||
               (this.hasIntercept && x.length + 1 != nvars)) {
            throw new ModelSpecificationException(LocalizedFormats.INVALID_REGRESSION_OBSERVATION,
                    x.length, nvars);
        }
        if (!this.hasIntercept) {
            include(MathArrays.copyOf(x, x.length), 1.0, y);
        } else {
            final double[] tmp = new double[x.length + 1];
            System.arraycopy(x, 0, tmp, 1, x.length);
            tmp[0] = 1.0;
            include(tmp, 1.0, y);
        }
        ++nobs;

    }

    @SuppressWarnings("unused") private  MillerUpdatingRegression();
    public  MillerUpdatingRegression(int numberOfVariables, boolean includeConstant, double errorTolerance);
    public  MillerUpdatingRegression(int numberOfVariables, boolean includeConstant);

}