Package org.apache.commons.math.exception

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


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


     * @throws IllegalArgumentException if the array is null
     */
    @Override
    public double evaluate(final double[] values) {
        if (values == null) {
            throw new NullArgumentException(LocalizedFormats.INPUT_ARRAY);
        }
        return evaluate(values, 0, values.length);
    }
View Full Code Here

     * @throws NullPointerException if either source or dest is null
     */
    public static void copy(Variance source, Variance dest) {
        if (source == null ||
            dest == null) {
            throw new NullArgumentException();
        }
        dest.setData(source.getDataRef());
        dest.moment = source.moment.copy();
        dest.isBiasCorrected = source.isBiasCorrected;
        dest.incMoment = source.incMoment;
View Full Code Here

     * @param format The new whole format value.
     * @throws NullArgumentException if {@code format} is {@code null}.
     */
    public void setWholeFormat(NumberFormat format) {
        if (format == null) {
            throw new NullArgumentException(LocalizedFormats.WHOLE_FORMAT);
        }
        this.wholeFormat = format;
    }
View Full Code Here

    protected UnivariateRealIntegratorImpl(final UnivariateRealFunction f,
                                           final int defaultMaximalIterationCount)
        throws IllegalArgumentException {
        super(defaultMaximalIterationCount, 1.0e-15);
        if (f == null) {
            throw new NullArgumentException(LocalizedFormats.FUNCTION);
        }

        this.f = f;

        // parameters that are problem specific
View Full Code Here

     * @param imaginaryFormat The new imaginaryFormat value.
     * @throws NullArgumentException if {@code imaginaryFormat} is {@code null}.
     */
    public void setImaginaryFormat(NumberFormat imaginaryFormat) {
        if (imaginaryFormat == null) {
            throw new NullArgumentException(LocalizedFormats.IMAGINARY_FORMAT);
        }
        this.imaginaryFormat = imaginaryFormat;
    }
View Full Code Here

     * @param realFormat The new realFormat value.
     * @throws NullArgumentException if {@code realFormat} is {@code null}.
     */
    public void setRealFormat(NumberFormat realFormat) {
        if (realFormat == null) {
            throw new NullArgumentException(LocalizedFormats.REAL_FORMAT);
        }
        this.realFormat = realFormat;
    }
View Full Code Here

    protected UnivariateRealSolverImpl(final UnivariateRealFunction f,
                                       final int defaultMaximalIterationCount,
                                       final double defaultAbsoluteAccuracy) {
        super(defaultMaximalIterationCount, defaultAbsoluteAccuracy);
        if (f == null) {
            throw new NullArgumentException(LocalizedFormats.FUNCTION);
        }
        this.f = f;
        this.defaultFunctionValueAccuracy = 1.0e-15;
        this.functionValueAccuracy = defaultFunctionValueAccuracy;
    }
View Full Code Here

            double initial, double lowerBound, double upperBound,
            int maximumIterations) throws ConvergenceException,
            FunctionEvaluationException {

        if (function == null) {
            throw new NullArgumentException(LocalizedFormats.FUNCTION);
        }
        if (maximumIterations <= 0)  {
            throw MathRuntimeException.createIllegalArgumentException(
                  LocalizedFormats.INVALID_MAX_ITERATIONS, maximumIterations);
        }
View Full Code Here

     * @param f  input function
     * @throws IllegalArgumentException if f is null
     */
    private static void setup(UnivariateRealFunction f) {
        if (f == null) {
            throw new NullArgumentException(LocalizedFormats.FUNCTION);
        }
    }
View Full Code Here

TOP

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

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.