Package org.apache.commons.math.exception

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


     *         range of the specified <code>points</code>
     */
    private double interpolateXAtY(WeightedObservedPoint[] points,
                                   int startIdx, int idxStep, double y) throws OutOfRangeException {
        if (idxStep == 0) {
            throw new ZeroException();
        }
        WeightedObservedPoint[] twoPoints = getInterpolationPointsForY(points, startIdx, idxStep, y);
        WeightedObservedPoint pointA = twoPoints[0];
        WeightedObservedPoint pointB = twoPoints[1];
        if (pointA.getY() == y) {
View Full Code Here


     */
    private WeightedObservedPoint[] getInterpolationPointsForY(WeightedObservedPoint[] points,
                                                               int startIdx, int idxStep, double y)
        throws OutOfRangeException {
        if (idxStep == 0) {
            throw new ZeroException();
        }
        for (int i = startIdx;
             (idxStep < 0) ? (i + idxStep >= 0) : (i + idxStep < points.length);
             i += idxStep) {
            if (isBetween(y, points[i].getY(), points[i + idxStep].getY())) {
View Full Code Here

     *
     * @throws IllegalArgumentException if <code>d</code> is 0
     */
    public GaussianDerivativeFunction(double b, double c, double d) {
        if (d == 0.0) {
            throw new ZeroException();
        }
        this.b = b;
        this.c = c;
        this.d2 = d * d;
    }
View Full Code Here

        }
        if (parameters.length != 3) {
            throw new DimensionMismatchException(3, parameters.length);
        }
        if (parameters[2] == 0.0) {
            throw new ZeroException();
        }
        this.b = parameters[0];
        this.c = parameters[1];
        this.d2 = parameters[2] * parameters[2];
    }
View Full Code Here

        }
        if (parameters.length != 4) {
            throw new DimensionMismatchException(4, parameters.length);
        }
        if (parameters[3] == 0.0) {
            throw new ZeroException();
        }
    }
View Full Code Here

     *
     * @throws IllegalArgumentException if <code>d</code> is 0
     */
    public GaussianFunction(double a, double b, double c, double d) {
        if (d == 0.0) {
            throw new ZeroException();
        }
        this.a = a;
        this.b = b;
        this.c = c;
        this.d = d;
View Full Code Here

        }
        if (parameters.length != 4) {
            throw new DimensionMismatchException(4, parameters.length);
        }
        if (parameters[3] == 0.0) {
            throw new ZeroException();
        }
        this.a = parameters[0];
        this.b = parameters[1];
        this.c = parameters[2];
        this.d = parameters[3];
View Full Code Here

TOP

Related Classes of org.apache.commons.math.exception.ZeroException

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.