Class GammaDistrPar

All Implemented Interfaces:
AutoCheck, Parameter

public class GammaDistrPar extends AbstractParameter implements Parameter
This is the parameter that should be passed to the Gamma distribution.

Copyright (c) 2003
Politecnico di Milano - dipartimento di Elettronica e Informazione
Author:
Fabrizio Frontera - ffrontera@yahoo.it
  • Constructor Summary

    Constructors
    Constructor
    Description
    GammaDistrPar(double alpha, double lambda)
    It creates a new gamma parameter according to the value provided by the user.
    GammaDistrPar(Double walpha, Double wlambda)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    It controls if the parameters are correct or not.
    double
    It returns the value of the parameter alpha of the gamma distribution.
    double
    It returns the value of the parameter lambda of the gamma distribution.
    void
    setAlpha(double alpha)
    It allows the user to modify the value of the parameter alpha of the gamma distribution.
    void
    setLambda(double lambda)
    It allows the user to modify the value of the parameter lambda of the gamma distribution.
    void
    setMean(double value)
    Sets mean for a given distribution parameter.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • check

      public boolean check()
      It controls if the parameters are correct or not. For the gamma distribution, the parameters are right if they are both greater than zero.
      Specified by:
      check in interface AutoCheck
      Specified by:
      check in interface Parameter
      Overrides:
      check in class AbstractParameter
      Returns:
      boolean indicating if the parameters are correct or not.
    • getAlpha

      public double getAlpha()
      It returns the value of the parameter alpha of the gamma distribution.
      Returns:
      double with alpha.
    • getLambda

      public double getLambda()
      It returns the value of the parameter lambda of the gamma distribution.
      Returns:
      double with lambda.
    • setAlpha

      public void setAlpha(double alpha) throws IncorrectDistributionParameterException
      It allows the user to modify the value of the parameter alpha of the gamma distribution. It verifies if the new value is correct, that is if alpha is greater than zero.
      Parameters:
      alpha - double indicating the new value of the parameter alpha.
      Throws:
      IncorrectDistributionParameterException - if the value provided is not greater than zero.
    • setLambda

      public void setLambda(double lambda) throws IncorrectDistributionParameterException
      It allows the user to modify the value of the parameter lambda of the gamma distribution. It verifies if the new value is correct, that is if lambda is greater than zero.
      Parameters:
      lambda - double indicating the new value of the parameter lambda.
      Throws:
      IncorrectDistributionParameterException - if the value provided is not greater than zero.
    • setMean

      public void setMean(double value) throws IncorrectDistributionParameterException
      Sets mean for a given distribution parameter. This method is required to adjust the mean value of a distribution into Load Dependent Service Time Strategy.
      Author: Bertoli Marco
      Specified by:
      setMean in interface Parameter
      Overrides:
      setMean in class AbstractParameter
      Parameters:
      value - New mean value for this distribution.
      Throws:
      IncorrectDistributionParameterException - if mean value is invalid for this distribution.