public class BayesianEvent
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
BayesianEvent(java.lang.String theLabel)
Construct a boolean event.
|
BayesianEvent(java.lang.String theLabel,
java.util.List<BayesianChoice> theChoices)
Construct an event with the specified label and choices.
|
BayesianEvent(java.lang.String theLabel,
java.lang.String[] theChoices)
Construct an event with the specified label and choices.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(BayesianEvent e)
Add a child event.
|
void |
addParent(BayesianEvent e)
Add a parent event.
|
int |
calculateParameterCount() |
void |
finalizeStructure()
Finalize the structure.
|
static java.lang.String |
formatEventName(BayesianEvent event,
int value)
Format the event name with +, - and =.
|
java.util.List<BayesianEvent> |
getChildren() |
BayesianChoice |
getChoice(int arg)
Return the choice specified by the index.
|
java.util.Set<BayesianChoice> |
getChoices() |
java.lang.String |
getLabel() |
java.util.List<BayesianEvent> |
getParents() |
BayesianTable |
getTable() |
boolean |
hasChildren() |
boolean |
hasGiven(java.lang.String l)
Return true if the event has the specified given event.
|
boolean |
hasParents() |
boolean |
isBoolean() |
int |
matchChoiceToRange(double d)
Match a continuous value to a discrete range.
|
void |
removeAllRelations()
Remove all relations.
|
void |
reset()
Reset the logic table.
|
boolean |
rollArgs(double[] args)
Roll the specified arguments through all of the possible values, return
false if we are at the final iteration.
|
java.lang.String |
toFullString() |
java.lang.String |
toString() |
void |
validate()
Validate the event.
|
public BayesianEvent(java.lang.String theLabel,
java.util.List<BayesianChoice> theChoices)
theLabel - The label.theChoices - The choices, or states.public BayesianEvent(java.lang.String theLabel,
java.lang.String[] theChoices)
theLabel - The label.theChoices - The choices, or states.public BayesianEvent(java.lang.String theLabel)
theLabel - The label.public java.util.List<BayesianEvent> getParents()
public java.util.List<BayesianEvent> getChildren()
public java.lang.String getLabel()
public void addChild(BayesianEvent e)
e - The child event.public void addParent(BayesianEvent e)
e - The parent event.public boolean hasParents()
public boolean hasChildren()
public java.lang.String toFullString()
public java.lang.String toString()
toString in class java.lang.Objectpublic int calculateParameterCount()
public java.util.Set<BayesianChoice> getChoices()
public BayesianTable getTable()
public void finalizeStructure()
public void validate()
public boolean isBoolean()
public boolean rollArgs(double[] args)
args - The arguments to enumerate.public void removeAllRelations()
public static java.lang.String formatEventName(BayesianEvent event, int value)
event - The event to format.value - The value to format for.public boolean hasGiven(java.lang.String l)
l - The event to check for.public void reset()
public int matchChoiceToRange(double d)
d - The continuous value.public BayesianChoice getChoice(int arg)
arg - The argument number.