Examples of IncorrectDistributionParameterException


Examples of jmt.common.exception.IncorrectDistributionParameterException

   *
   * @throws IncorrectDistributionParameterException if any of the double provided is less or equal to zero.
   */
  private void testParameters() throws IncorrectDistributionParameterException {
    if (alpha <= 0) {
      throw new IncorrectDistributionParameterException("alpha <=0");
    }
    if (r <= 0) {
      throw new IncorrectDistributionParameterException("r <=0");
    }
  }
View Full Code Here

Examples of jmt.common.exception.IncorrectDistributionParameterException

   * @throws IncorrectDistributionParameterException if mean value is invalid for this distribution
   */
  @Override
  public void setMean(double meanValue) throws IncorrectDistributionParameterException {
    if (meanValue <= 0 || Double.isInfinite(meanValue)) {
      throw new IncorrectDistributionParameterException("Mean value must be finite and greater than zero");
    }
    alpha = r / meanValue;
  }
View Full Code Here

Examples of jmt.common.exception.IncorrectDistributionParameterException

  public ParetoPar(double alpha, double k) throws IncorrectDistributionParameterException {
    this.alpha = alpha;
    this.k = k;
    if (!check()) {
      if (k <= 0) {
        throw new IncorrectDistributionParameterException("k must be gtz");
      }
      if (alpha <= 0) {
        throw new IncorrectDistributionParameterException("alpha must be gtz");
      }
    }
  }
View Full Code Here

Examples of jmt.common.exception.IncorrectDistributionParameterException

   *
   */

  public void setAlpha(double alpha) throws IncorrectDistributionParameterException {
    if (alpha <= 0) {
      throw new IncorrectDistributionParameterException("alpha must be gtz");
    } else {
      this.alpha = alpha;
    }
  }
View Full Code Here

Examples of jmt.common.exception.IncorrectDistributionParameterException

   *
   */

  public void setK(double k) throws IncorrectDistributionParameterException {
    if (k <= 0) {
      throw new IncorrectDistributionParameterException("k must be gtz");
    } else {
      this.k = k;
    }
  }
View Full Code Here

Examples of jmt.common.exception.IncorrectDistributionParameterException

   * @throws IncorrectDistributionParameterException if mean value is invalid for this distribution
   */
  @Override
  public void setMean(double meanValue) throws IncorrectDistributionParameterException {
    if (meanValue <= 0 || Double.isInfinite(meanValue)) {
      throw new IncorrectDistributionParameterException("Mean value must be finite and greater than zero");
    }
    k = meanValue * (alpha - 1) / alpha;
  }
View Full Code Here

Examples of jmt.common.exception.IncorrectDistributionParameterException

  public void setLambda(double lambda) throws IncorrectDistributionParameterException {
    if (lambda > 0) //verify that the parameter lambda is gtz, as required.
    {
      this.lambda = lambda;
    } else {
      throw new IncorrectDistributionParameterException("Remember: parameter lambda must be gtz");
    }
  }
View Full Code Here

Examples of jmt.common.exception.IncorrectDistributionParameterException

   * @throws IncorrectDistributionParameterException if mean value is invalid for this distribution
   */
  @Override
  public void setMean(double meanValue) throws IncorrectDistributionParameterException {
    if (meanValue <= 0 || Double.isInfinite(meanValue)) {
      throw new IncorrectDistributionParameterException("Mean value must be finite and greater than zero");
    }
    lambda = 1 / meanValue;
  }
View Full Code Here

Examples of jmt.common.exception.IncorrectDistributionParameterException

   * @throws IncorrectDistributionParameterException if mean is not greater than zero.
   *
   */
  public PoissonPar(double mean) throws IncorrectDistributionParameterException {
    if (mean <= 0) {
      throw new IncorrectDistributionParameterException("mean must be gtz");
    } else {
      this.mean = mean;
    }
  }
View Full Code Here

Examples of jmt.common.exception.IncorrectDistributionParameterException

   */

  @Override
  public void setMean(double mean) throws IncorrectDistributionParameterException {
    if (mean <= 0) {
      throw new IncorrectDistributionParameterException("mean must be gtz");
    } else {
      this.mean = mean;
    }
  }
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.