Class NormalPar

All Implemented Interfaces:
AutoCheck, Parameter

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

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

    Constructors
    Constructor
    Description
    NormalPar(double mean, double standardDeviation)
    It creates a new normal parameter according to the data provided by the user: the mean and the standard deviation of the normal distribution.
    NormalPar(Double wmean, Double wstandardDeviation)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    It verifies that the parameter is correct.
    double
    It returns the value of the mean of the normal distribution.
    double
    It returns the value of the standard deviation of the normal distribution.
    void
    setMean(double mean)
    It allows the user to change the value of the mean of the normal distribution.
    void
    setStandardDeviation(double standardDeviation)
    It allows the user to change the value of the standard deviation of the normal distribution and verifies if it is greater than zero.

    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 verifies that the parameter is correct. For the normal distribution, the parameter is right if the standard deviation 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.
    • getMean

      public double getMean()
      It returns the value of the mean of the normal distribution.
      Returns:
      double with the mean of the normal distribution.
    • getStandardDeviation

      public double getStandardDeviation()
      It returns the value of the standard deviation of the normal distribution.
      Returns:
      double with the standard deviation of the normal distribution.
    • setMean

      public void setMean(double mean) throws IncorrectDistributionParameterException
      It allows the user to change the value of the mean of the normal distribution.
      Specified by:
      setMean in interface Parameter
      Overrides:
      setMean in class AbstractParameter
      Parameters:
      mean - double indicating the mean of the normal distribution.
      Throws:
      IncorrectDistributionParameterException
    • setStandardDeviation

      public void setStandardDeviation(double standardDeviation) throws IncorrectDistributionParameterException
      It allows the user to change the value of the standard deviation of the normal distribution and verifies if it is greater than zero.
      Parameters:
      standardDeviation - double indicating the standard deviation of the normal distribution.
      Throws:
      IncorrectDistributionParameterException - if the standard deviation is not greater than zero.