/** {@inheritDoc} */ @Override public double inverseCumulativeProbability(final double p) throws OutOfRangeException { if (p < 0.0 || p > 1.0) { throw new OutOfRangeException(p, 0, 1); } return value; }
/** * {@inheritDoc}. This method <em>must</em> be overriden by concrete * subclasses of {@link RealVector} (current implementation throws an * exception). * * @throws MathUnsupportedOperationException if this method is not * overridden. */ @Override public int hashCode() throws MathUnsupportedOperationException { throw new MathUnsupportedOperationException(); }
/** * Modify the denominator format. * @param format the new denominator format value. * @throws NullArgumentException if {@code format} is {@code null}. */ public void setDenominatorFormat(final NumberFormat format) { if (format == null) { throw new NullArgumentException(LocalizedFormats.DENOMINATOR_FORMAT); } this.denominatorFormat = format; }
/** * Replace all points. * Note that no deep-copy of {@code points} is performed. * * @param points New Points. */ protected void setPoints(PointValuePair[] points) { if (points.length != simplex.length) { throw new DimensionMismatchException(points.length, simplex.length); } simplex = points; }
/** * @param max Allowed number of evalutations. * @throws NotStrictlyPositiveException if {@code max <= 0}. */ public MaxEval(int max) { if (max <= 0) { throw new NotStrictlyPositiveException(max); } maxEval = max; }
/** Increment a number, detecting overflows. * @param n number to increment * @return n+1 if no overflows occur * @exception MathArithmeticException if an overflow occurs * @since 3.4 */ public static long incrementExact(final long n) throws MathArithmeticException { if (n == Long.MAX_VALUE) { throw new MathArithmeticException(LocalizedFormats.OVERFLOW_IN_ADDITION, n, 1); } return n + 1; }
/** * {@inheritDoc} * @throws TooManyIterationsException */ public void trigger(int max) { throw new TooManyIterationsException(max); } }
/** * {@inheritDoc} * @throws TooManyEvaluationsException */ public void trigger(int max) { throw new TooManyEvaluationsException(max); } }
@Override public double inverseCumulativeProbability(final double p) throws OutOfRangeException { if (p < 0.0 || p > 1.0) { throw new OutOfRangeException(p, 0, 1); } return p * (upper - lower) + lower; }
/** Check dimensions equality. * @param d1 first dimension * @param d2 second dimansion * @exception DimensionMismatchException if dimensions do not match */ private void checkDimensionsEquality(final int d1, final int d2) throws DimensionMismatchException { if (d1 != d2) { throw new DimensionMismatchException(d2, d1); } }
/** * {@inheritDoc} * * @throws MathUnsupportedOperationException in all circumstances. */ public void remove() throws MathUnsupportedOperationException { throw new MathUnsupportedOperationException(); } }
/** * Modify the whole format. * @param format The new whole format value. * @throws NullArgumentException if {@code format} is {@code null}. */ public void setWholeFormat(final NumberFormat format) { if (format == null) { throw new NullArgumentException(LocalizedFormats.WHOLE_FORMAT); } this.wholeFormat = format; } }
/** * @param n Number of observations * @throws NotStrictlyPositiveException if {@code n <= 0} */ public KolmogorovSmirnovDistribution(int n) throws NotStrictlyPositiveException { if (n <= 0) { throw new NotStrictlyPositiveException(LocalizedFormats.NOT_POSITIVE_NUMBER_OF_SAMPLES, n); } this.n = n; }
/** * {@inheritDoc} * * @throws TooManyIterationsException */ public void trigger(int max) { throw new TooManyIterationsException(max); } }
/** * {@inheritDoc} * * @throws MathUnsupportedOperationException in all * circumstances. */ @Override public void unitize() throws MathUnsupportedOperationException { throw new MathUnsupportedOperationException(); }
/** * @param max Allowed number of iterations. * @throws NotStrictlyPositiveException if {@code max <= 0}. */ public MaxIter(int max) { if (max <= 0) { throw new NotStrictlyPositiveException(max); } maxIter = max; }
/** * {@inheritDoc} * * @throws MathUnsupportedOperationException in all * circumstances. */ @Override public void setEntry(int index, double value) throws MathUnsupportedOperationException { throw new MathUnsupportedOperationException(); }
/** * {@inheritDoc} * * @throws MathUnsupportedOperationException in all * circumstances. */ @Override public void set(double value) throws MathUnsupportedOperationException { throw new MathUnsupportedOperationException(); }
/** * {@inheritDoc} * * @throws MathUnsupportedOperationException in all circumstances. */ @Override public RealVector mapToSelf(UnivariateFunction function) throws MathUnsupportedOperationException { throw new MathUnsupportedOperationException(); }
/** * {@inheritDoc} * * @throws MathUnsupportedOperationException in all * circumstances. */ @Override public RealVector mapAddToSelf(double d) throws MathUnsupportedOperationException { throw new MathUnsupportedOperationException(); }