Package org.apache.commons.math3.exception

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


                bits |= ((long) next(32)) & 0xffffffffL;
                val  = bits % n;
            } while (bits - val + (n - 1) < 0);
            return val;
        }
        throw new NotStrictlyPositiveException(n);
    }
View Full Code Here


     */
    public LogisticDistribution(RandomGenerator rng, double mu, double s) {
        super(rng);

        if (s <= 0.0) {
            throw new NotStrictlyPositiveException(LocalizedFormats.NOT_POSITIVE_SCALE, s);
        }

        this.mu = mu;
        this.s = s;
    }
View Full Code Here

                               double inverseCumAccuracy)
        throws NotStrictlyPositiveException {
        super(rng);

        if (alpha <= 0) {
            throw new NotStrictlyPositiveException(LocalizedFormats.SHAPE,
                                                   alpha);
        }
        if (beta <= 0) {
            throw new NotStrictlyPositiveException(LocalizedFormats.SCALE,
                                                   beta);
        }
        scale = beta;
        shape = alpha;
        solverAbsoluteAccuracy = inverseCumAccuracy;
View Full Code Here

     * a bracketing interval.
     */
    public BracketFinder(double growLimit,
                         int maxEvaluations) {
        if (growLimit <= 0) {
            throw new NotStrictlyPositiveException(growLimit);
        }
        if (maxEvaluations <= 0) {
            throw new NotStrictlyPositiveException(maxEvaluations);
        }

        this.growLimit = growLimit;
        evaluations.setMaximalCount(maxEvaluations);
    }
View Full Code Here

     * @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;
    }
View Full Code Here

     * @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;
    }
View Full Code Here

     * @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;
    }
View Full Code Here

                                    final double absoluteThreshold,
                                    final int maxIter) {
        super(relativeThreshold, absoluteThreshold);

        if (maxIter <= 0) {
            throw new NotStrictlyPositiveException(maxIter);
        }
        maxIterationCount = maxIter;
    }
View Full Code Here

    public abstract double[] sample();

    /** {@inheritDoc} */
    public double[][] sample(final int sampleSize) {
        if (sampleSize <= 0) {
            throw new NotStrictlyPositiveException(LocalizedFormats.NUMBER_OF_SAMPLES,
                                                   sampleSize);
        }
        final double[][] out = new double[sampleSize][dimension];
        for (int i = 0; i < sampleSize; i++) {
            out[i] = sample();
View Full Code Here

               NotStrictlyPositiveException {
        if (exponent < 0) {
            throw new NotPositiveException(exponent);
        }
        if (elements <= 0) {
            throw new NotStrictlyPositiveException(elements);
        }

        microsphereElements = elements;
        brightnessExponent = exponent;
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.math3.exception.NotStrictlyPositiveException

Copyright © 2018 www.massapicom. 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.