Package org.apache.commons.math.exception

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


     * @param covariance Covariance instance
     */
    public PearsonsCorrelation(Covariance covariance) {
        RealMatrix covarianceMatrix = covariance.getCovarianceMatrix();
        if (covarianceMatrix == null) {
            throw new NullArgumentException(LocalizedFormats.COVARIANCE_MATRIX);
        }
        nObs = covariance.getN();
        correlationMatrix = covarianceToCorrelation(covarianceMatrix);
    }
View Full Code Here


     *
     * @param observations observed points upon which should base guess
     */
    public GaussianParametersGuesser(WeightedObservedPoint[] observations) {
        if (observations == null) {
            throw new NullArgumentException(LocalizedFormats.INPUT_ARRAY);
        }
        if (observations.length < 3) {
            throw new NumberIsTooSmallException(observations.length, 3, true);
        }
        this.observations = observations.clone();
View Full Code Here

     *         <code>parameters</code> length is not 3, or if
     *         <code>parameters[2]</code> is 0
     */
    public GaussianDerivativeFunction(double[] parameters) {
        if (parameters == null) {
            throw new NullArgumentException(LocalizedFormats.INPUT_ARRAY);
        }
        if (parameters.length != 3) {
            throw new DimensionMismatchException(3, parameters.length);
        }
        if (parameters[2] == 0.0) {
View Full Code Here

     * @throws ZeroException if <code>parameters[3]</code>
     *         (<tt>d</tt>) is 0
     */
    private void validateParameters(double[] parameters) throws ZeroException {
        if (parameters == null) {
            throw new NullArgumentException(LocalizedFormats.INPUT_ARRAY);
        }
        if (parameters.length != 4) {
            throw new DimensionMismatchException(4, parameters.length);
        }
        if (parameters[3] == 0.0) {
View Full Code Here

     *         <code>parameters</code> length is not 4, or if
     *         <code>parameters[3]</code> is 0
     */
    public GaussianFunction(double[] parameters) {
        if (parameters == null) {
            throw new NullArgumentException(LocalizedFormats.INPUT_ARRAY);
        }
        if (parameters.length != 4) {
            throw new DimensionMismatchException(4, parameters.length);
        }
        if (parameters[3] == 0.0) {
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.