Class LognormalPar

All Implemented Interfaces:
AutoCheck, Parameter

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

Copyright (c) 2021
Imperial College London
Author:
Giuliano Casale, g.casale@imperial.ac.uk
  • Constructor Summary

    Constructors
    Constructor
    Description
    LognormalPar(double mu, double sigma)
    It creates a new normal parameter according to the data provided by the user: the mean and the standard deviation of the normal distribution.
    LognormalPar(Double wmu, Double wsigma)
     
  • 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
    setMu(double mu)
    It allows the user to change the value of the mean of the normal distribution.
    void
    setSigma(double sigma)
    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 AbstractParameter

    setMean

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface Parameter

    setMean
  • 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.
    • getMu

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

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

      public void setMu(double mu) throws IncorrectDistributionParameterException
      It allows the user to change the value of the mean of the normal distribution.
      Parameters:
      mu - double indicating the mean of the normal distribution.
      Throws:
      IncorrectDistributionParameterException
    • setSigma

      public void setSigma(double sigma) 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:
      sigma - double indicating the standard deviation of the normal distribution.
      Throws:
      IncorrectDistributionParameterException - if the standard deviation is not greater than zero.