Package jmt.common.exception

Examples of jmt.common.exception.IncorrectDistributionParameterException


      cacheFilled = true;
      // If generated number is in the past, reruns this method
      double ret = mean + standardDeviation * y * z;
      return (ret > 0) ? ret : nextRand(p);
    } else {
      throw new IncorrectDistributionParameterException("Remember: standardDeviation must be gtz");
    }
  }
View Full Code Here


      //double alpha = p.getAlpha();
      double r = ((ErlangPar) p).getR();
      double alpha = ((ErlangPar) p).getAlpha();
      return (Math.pow(alpha, r) / Gamma.gamma(r)) * Math.pow(x, (r - 1)) * Math.exp(-alpha * x);
    } else {
      throw new IncorrectDistributionParameterException("Remember: alpha and r must be gtz");
    }
  }
View Full Code Here

        a = Math.pow((alpha * x), i) / Arithmetic.factorial(i);
        sum = sum + a;
      };
      return 1 - Math.exp(-alpha * x) * sum;
    } else {
      throw new IncorrectDistributionParameterException("Remember: alpha and r must be gtz");
    }
  }
View Full Code Here

      //double alpha = p.getAlpha();
      double r = ((ErlangPar) p).getR();
      double alpha = ((ErlangPar) p).getAlpha();
      return r / alpha;
    } else {
      throw new IncorrectDistributionParameterException("Remember: alpha and r must be gtz");
    }
  }
View Full Code Here

      //double alpha = p.getAlpha();
      double r = ((ErlangPar) p).getR();
      double alpha = ((ErlangPar) p).getAlpha();
      return r / (alpha * alpha);
    } else {
      throw new IncorrectDistributionParameterException("Remember: alpha and r must be gtz");
    }
  }
View Full Code Here

      for (int i = 0; i < r; i++) {
        par = par * engine.raw();
      }
      return (-1 / alpha) * (Math.log(par));
    } else {
      throw new IncorrectDistributionParameterException("Remember: alpha and r must be gtz");
    }
  }
View Full Code Here

      //double alfa = p.getAlpha();
      //double k = p.getK();
      double alfa = ((ParetoPar) p).getAlpha();
      double k = ((ParetoPar) p).getK();
      if (x <= alfa) {
        throw new IncorrectDistributionParameterException("Error: x must be >alpha.");
      }
      return (alfa * Math.pow(k, alfa) / Math.pow(x, (alfa + 1)));
    } else {
      throw new IncorrectDistributionParameterException("Remember: parameter alpha and k must be gtz");
    }
  }
View Full Code Here

      if (x <= alfa) {
        return 0.0;
      }
      return 1.0 - Math.pow((k / x), alfa);
    } else {
      throw new IncorrectDistributionParameterException("Remember: parameter alpha and k must be gtz");
    }
  }
View Full Code Here

      //double k = p.getK();
      double alfa = ((ParetoPar) p).getAlpha();
      double k = ((ParetoPar) p).getK();
      return (alfa * k / (alfa - 1));
    } else {
      throw new IncorrectDistributionParameterException("Remember: parameter alpha and k must be gtz");
    }
  }
View Full Code Here

      //double k = p.getK();
      double alfa = ((ParetoPar) p).getAlpha();
      double k = ((ParetoPar) p).getK();
      return (alfa * k * k / ((alfa - 1) * (alfa - 1) * (alfa - 2)));
    } else {
      throw new IncorrectDistributionParameterException("Remember: parameter alpha and k must be gtz");
    }
  }
View Full Code Here

TOP

Related Classes of jmt.common.exception.IncorrectDistributionParameterException

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.