Examples of OutOfRangeException


Examples of JSci.maths.statistics.OutOfRangeException

   *            the variance.
   */
  public NormalDistribution(double mu, double var) {
    mean = mu;
    if (var <= 0.0)
      throw new OutOfRangeException(
          "The variance should be (strictly) positive.");
    variance = var;
    pdfDenominator = SQRT2PI * Math.sqrt(variance);
    cdfDenominator = SQRT2 * Math.sqrt(variance);
  }
 
View Full Code Here

Examples of com.bj58.spat.gaea.serializer.component.exception.OutOfRangeException

*/
public class ByteHelper {

    public static short ToInt16(byte[] buffer) throws OutOfRangeException {
        if (buffer.length < 2) {
            throw new OutOfRangeException();
        }
        short int16 = 0;
        int16 = (short) (buffer[0] & 0xff);
        int16 |= ((short) buffer[1] << 8) & 0xff00;
        return int16;
View Full Code Here

Examples of com.foundationdb.server.error.OutOfRangeException

            return
                lonLo <= lonHi
                ? new Box(latLo, latHi, lonLo, lonHi)
                : new BoxLatLonWithWraparound(latLo, latHi, lonLo, lonHi);
        } catch (IllegalArgumentException e) {
            throw new OutOfRangeException(String.format("latLo = %s, latHi = %s, lonLo = %s, lonHi = %s",
                                                        latLo, latHi, lonLo, lonHi));
        }
    }
View Full Code Here

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

     * {@inheritDoc}
     */
    public double value(double x, double y, double z) {
        final int i = searchIndex(x, xval);
        if (i == -1) {
            throw new OutOfRangeException(x, xval[0], xval[xval.length - 1]);
        }
        final int j = searchIndex(y, yval);
        if (j == -1) {
            throw new OutOfRangeException(y, yval[0], yval[yval.length - 1]);
        }
        final int k = searchIndex(z, zval);
        if (k == -1) {
            throw new OutOfRangeException(z, zval[0], zval[zval.length - 1]);
        }

        final double xN = (x - xval[i]) / (xval[i + 1] - xval[i]);
        final double yN = (y - yval[j]) / (yval[j + 1] - yval[j]);
        final double zN = (z - zval[k]) / (zval[k + 1] - zval[k]);
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.0 || p > 1.0) {
            throw new OutOfRangeException(p, 0.0, 1.0);
        } else if (p == 1.0) {
            ret = Double.POSITIVE_INFINITY;
        } else {
            ret = -mean * FastMath.log(1.0 - p);
        }
View Full Code Here

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

        if (lo >= hi) {
            throw new NumberIsTooLargeException(lo, hi, false);
        }
        if (init < lo ||
            init > hi) {
            throw new OutOfRangeException(init, lo, hi);
        }

        lower = lo;
        upper = hi;
        start = init;
View Full Code Here

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

    @Override
    public double inverseCumulativeProbability(double p)
        throws OutOfRangeException {
        if (p < 0 || p > 1) {
            throw new OutOfRangeException(p, 0, 1);
        }
        if (p == 0) {
            return a;
        }
        if (p == 1) {
View Full Code Here

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

     */
    public double value(double x, double y, double z)
        throws OutOfRangeException {
        final int i = searchIndex(x, xval);
        if (i == -1) {
            throw new OutOfRangeException(x, xval[0], xval[xval.length - 1]);
        }
        final int j = searchIndex(y, yval);
        if (j == -1) {
            throw new OutOfRangeException(y, yval[0], yval[yval.length - 1]);
        }
        final int k = searchIndex(z, zval);
        if (k == -1) {
            throw new OutOfRangeException(z, zval[0], zval[zval.length - 1]);
        }

        final double xN = (x - xval[i]) / (xval[i + 1] - xval[i]);
        final double yN = (y - yval[j]) / (yval[j + 1] - yval[j]);
        final double zN = (z - zval[k]) / (zval[k + 1] - zval[k]);
View Full Code Here

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

     * {@code z} are not in the interval {@code [0, 1]}.
     */
    public double value(double x, double y, double z)
        throws OutOfRangeException {
        if (x < 0 || x > 1) {
            throw new OutOfRangeException(x, 0, 1);
        }
        if (y < 0 || y > 1) {
            throw new OutOfRangeException(y, 0, 1);
        }
        if (z < 0 || z > 1) {
            throw new OutOfRangeException(z, 0, 1);
        }

        final double x2 = x * x;
        final double x3 = x2 * x;
        final double[] pX = { 1, x, x2, x3 };
View Full Code Here

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

     * @param dimension the space dimension
     * @throws OutOfRangeException if the space dimension is outside the allowed range of [1, 1000]
     */
    public SobolSequenceGenerator(final int dimension) throws OutOfRangeException {
        if (dimension < 1 || dimension > MAX_DIMENSION) {
            throw new OutOfRangeException(dimension, 1, MAX_DIMENSION);
        }

        // initialize the other dimensions with direction numbers from a resource
        final InputStream is = getClass().getResourceAsStream(RESOURCE_NAME);
        if (is == null) {
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.