Class EmpiricalEntry
java.lang.Object
random.EmpiricalEntry
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
FieldsModifier and TypeFieldDescriptionprotected doubleTheEmpiricalEntryprobability.protected ObjectTheEmpiricalEntryvalue. -
Constructor Summary
ConstructorsConstructorDescriptionEmpiricalEntry(String value, double probability) Creates a new instance of anEmpiricalEntryobject with specified value and probability.EmpiricalEntry(String value, Double probability) Creates a new instance of anEmpiricalEntryobject with specified value and probability.EmpiricalEntry(String value, String probability) Creates a new instance of anEmpiricalEntryobject with specified value and probability. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the probability linked to the internal value.getValue()Returns the internal value.voidsetProbability(double probability) Sets the internal probability linked to the value.voidSets the internal value with the givenObject.
-
Field Details
-
value
TheEmpiricalEntryvalue. -
probability
protected double probabilityTheEmpiricalEntryprobability.
-
-
Constructor Details
-
EmpiricalEntry
-
EmpiricalEntry
Creates a new instance of anEmpiricalEntryobject with specified value and probability.- Parameters:
value- A givenStringrepresenting a node value.probability- A givendoubleprobability linked to the value.
-
EmpiricalEntry
-
-
Method Details
-
getValue
Returns the internal value.- Returns:
- An object representing the internal value.
-
setValue
Sets the internal value with the givenObject.- Parameters:
value- A givenObject.
-
getProbability
public double getProbability()Returns the probability linked to the internal value.- Returns:
- A
doublerepresenting the probability.
-
setProbability
public void setProbability(double probability) Sets the internal probability linked to the value.- Parameters:
probability- A givenDoubleprobability.
-