Class ParetoPar

All Implemented Interfaces:
AutoCheck, Parameter

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

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

    Constructors
    Constructor
    Description
    ParetoPar(double alpha, double k)
    It creates a new pareto parameter according to the data provided by the user: the parameter alpha and k of the pareto distribution.
    ParetoPar(Double walpha, Double wk)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    It controls if the parameter is correct.
    double
    It returns the value of the parameter alpha of the pareto distribution.
    double
    It returns the value of the parameter k of the pareto distribution.
    void
    setAlpha(double alpha)
    It allows the user to change the value of the parameter alpha of the pareto distribution and verifies if alpha is greater than two.
    void
    setK(double k)
    It allows the user to change the value of the parameter k of the pareto 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 parameter is correct. For the pareto distribution, the parameter is right if alpha is greater than two and k is 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 parameter is correct or not.
    • getAlpha

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

      public double getK()
      It returns the value of the parameter k of the pareto distribution.
      Returns:
      double with the parameter k of the pareto distribution.
    • setAlpha

      public void setAlpha(double alpha) throws IncorrectDistributionParameterException
      It allows the user to change the value of the parameter alpha of the pareto distribution and verifies if alpha is greater than two.
      Parameters:
      alpha - double indicating the parameter alpha of the pareto distribution.
      Throws:
      IncorrectDistributionParameterException - if alpha is not greater than two.
    • setK

      public void setK(double k) throws IncorrectDistributionParameterException
      It allows the user to change the value of the parameter k of the pareto distribution. It verifies if k is greater than zero.
      Parameters:
      k - double indicating the parameter k of the pareto distribution.
      Throws:
      IncorrectDistributionParameterException - if k 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.