Examples of OutOfRangeException


Examples of org.apache.commons.math3.exception.OutOfRangeException

     */
    public DerivativeStructure value(final DerivativeStructure t)
        throws OutOfRangeException {
        final double x = t.getValue();
        if (x < lo || x > hi) {
            throw new OutOfRangeException(x, lo, hi);
        }
        double[] f = new double[t.getOrder() + 1];

        // function value
        f[0] = FastMath.log((x - lo) / (hi - x));
View Full Code Here

Examples of org.apache.commons.math3.exception.OutOfRangeException

     */
    @Override
    public double inverseCumulativeProbability(double p) throws OutOfRangeException {
        double ret;
        if (p < 0 || p > 1) {
            throw new OutOfRangeException(p, 0, 1);
        } else if (p == 0) {
            ret = Double.NEGATIVE_INFINITY;
        } else  if (p == 1) {
            ret = Double.POSITIVE_INFINITY;
        } else {
View Full Code Here

Examples of org.apache.commons.math3.exception.OutOfRangeException

            }

            // Boundaries are replaced by dummy values because the raised
            // exception is caught and the message never displayed.
            // TODO: Exceptions should not be used for flow control.
            throw new OutOfRangeException(y,
                                          Double.NEGATIVE_INFINITY,
                                          Double.POSITIVE_INFINITY);
        }
View Full Code Here

Examples of org.apache.commons.math3.exception.OutOfRangeException

    public double getParameterEstimate(int index) throws OutOfRangeException {
        if (parameters == null) {
            return Double.NaN;
        }
        if (index < 0 || index >= this.parameters.length) {
            throw new OutOfRangeException(index, 0, this.parameters.length - 1);
        }
        return this.parameters[index];
    }
View Full Code Here

Examples of org.apache.commons.math3.exception.OutOfRangeException

    public double getStdErrorOfEstimate(int index) throws OutOfRangeException {
        if (parameters == null) {
            return Double.NaN;
        }
        if (index < 0 || index >= this.parameters.length) {
            throw new OutOfRangeException(index, 0, this.parameters.length - 1);
        }
        double var = this.getVcvElement(index, index);
        if (!Double.isNaN(var) && var > Double.MIN_VALUE) {
            return FastMath.sqrt(var);
        }
View Full Code Here

Examples of org.apache.commons.math3.exception.OutOfRangeException

    public double getCovarianceOfParameters(int i, int j) throws OutOfRangeException {
        if (parameters == null) {
            return Double.NaN;
        }
        if (i < 0 || i >= this.parameters.length) {
            throw new OutOfRangeException(i, 0, this.parameters.length - 1);
        }
        if (j < 0 || j >= this.parameters.length) {
            throw new OutOfRangeException(j, 0, this.parameters.length - 1);
        }
        return this.getVcvElement(i, j);
    }
View Full Code Here

Examples of org.apache.commons.math3.exception.OutOfRangeException

     * spline function (smaller than the smallest knot point or larger than the
     * largest knot point).
     */
    public double value(double v) {
        if (v < knots[0] || v > knots[n]) {
            throw new OutOfRangeException(v, knots[0], knots[n]);
        }
        int i = Arrays.binarySearch(knots, v);
        if (i < 0) {
            i = -i - 2;
        }
View Full Code Here

Examples of org.apache.commons.math3.exception.OutOfRangeException

     * @since 3.1
     */
    public DerivativeStructure value(final DerivativeStructure t) {
        final double t0 = t.getValue();
        if (t0 < knots[0] || t0 > knots[n]) {
            throw new OutOfRangeException(t0, knots[0], knots[n]);
        }
        int i = Arrays.binarySearch(knots, t0);
        if (i < 0) {
            i = -i - 2;
        }
View Full Code Here

Examples of org.apache.commons.math3.exception.OutOfRangeException

    }

    @Override
    public double inverseCumulativeProbability(double p) throws OutOfRangeException {
        if (p < 0.0 || p > 1.0) {
            throw new OutOfRangeException(p, 0.0, 1.0);
        } else if (p == 0) {
            return Double.NEGATIVE_INFINITY;
        } else if (p == 1) {
            return Double.POSITIVE_INFINITY;
        }
View Full Code Here

Examples of org.apache.commons.math3.exception.OutOfRangeException

    throws OutOfRangeException {
        if (n < 3) {
            return Double.NaN;
        }
        if (alpha >= 1 || alpha <= 0) {
            throw new OutOfRangeException(LocalizedFormats.SIGNIFICANCE_LEVEL,
                                          alpha, 0, 1);
        }
        // No advertised NotStrictlyPositiveException here - will return NaN above
        TDistribution distribution = new TDistribution(n - 2);
        return getSlopeStdErr() *
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.