Class EmpiricalEntry

java.lang.Object
random.EmpiricalEntry

public class EmpiricalEntry extends Object
Class used for the empirical distribution, through which the user provides the data needed to construct the empirical distribution: for each empirical entry the requested data are a value and the probability of that value.
Version:
Date: 27-nov-2003 Time: 10.27.00
Author:
cattai
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected double
    The EmpiricalEntry probability.
    protected Object
    The EmpiricalEntry value.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EmpiricalEntry(String value, double probability)
    Creates a new instance of an EmpiricalEntry object with specified value and probability.
    EmpiricalEntry(String value, Double probability)
    Creates a new instance of an EmpiricalEntry object with specified value and probability.
    EmpiricalEntry(String value, String probability)
    Creates a new instance of an EmpiricalEntry object with specified value and probability.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the probability linked to the internal value.
    Returns the internal value.
    void
    setProbability(double probability)
    Sets the internal probability linked to the value.
    void
    Sets the internal value with the given Object.

    Methods inherited from class Object

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

    • value

      protected Object value
      The EmpiricalEntry value.
    • probability

      protected double probability
      The EmpiricalEntry probability.
  • Constructor Details

    • EmpiricalEntry

      public EmpiricalEntry(String value, String probability)
      Creates a new instance of an EmpiricalEntry object with specified value and probability.
      Parameters:
      value - A given String representing a node value.
      probability - A given String representing the value probability.
    • EmpiricalEntry

      public EmpiricalEntry(String value, double probability)
      Creates a new instance of an EmpiricalEntry object with specified value and probability.
      Parameters:
      value - A given String representing a node value.
      probability - A given double probability linked to the value.
    • EmpiricalEntry

      public EmpiricalEntry(String value, Double probability)
      Creates a new instance of an EmpiricalEntry object with specified value and probability.
      Parameters:
      value - A given String representing a node value.
      probability - A given Double probability linked to the value.
  • Method Details

    • getValue

      public Object getValue()
      Returns the internal value.
      Returns:
      An object representing the internal value.
    • setValue

      public void setValue(Object value)
      Sets the internal value with the given Object.
      Parameters:
      value - A given Object.
    • getProbability

      public double getProbability()
      Returns the probability linked to the internal value.
      Returns:
      A double representing the probability.
    • setProbability

      public void setProbability(double probability)
      Sets the internal probability linked to the value.
      Parameters:
      probability - A given Double probability.