* @throws MathIllegalArgumentException if the number of rows of {@code x}
* is not larger than the number of columns + 1
*/
protected void validateSampleData(double[][] x, double[] y) throws MathIllegalArgumentException {
if ((x == null) || (y == null)) {
throw new NullArgumentException();
}
if (x.length != y.length) {
throw new DimensionMismatchException(y.length, x.length);
}
if (x.length == 0) { // Must be no y data either