|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpt.tumba.ngram.bayes.DiscreteVariable
pt.tumba.ngram.bayes.ProbabilityVariable
public class ProbabilityVariable
***************************************************************
| Field Summary | |
|---|---|
protected BayesNet |
bn
|
static int |
CHANCE
|
protected int |
explanation_index
|
(package private) static java.lang.String |
explanation_property_name
|
protected int |
observed_index
|
(package private) static java.lang.String |
observed_property_name
|
protected java.util.Vector |
properties
|
static int |
TRANSPARENT
|
protected int |
type
|
| Fields inherited from class pt.tumba.ngram.bayes.DiscreteVariable |
|---|
index, name, values |
| Constructor Summary | |
|---|---|
ProbabilityVariable()
Default constructor for a ProbabilityVariable. |
|
ProbabilityVariable(BayesNet b_n,
ProbabilityVariable pv)
Constructor for ProbabilityVariable. |
|
ProbabilityVariable(BayesNet b_n,
java.lang.String n_vb,
int vi,
java.lang.String[] vl,
java.util.Vector p)
Constructor for ProbabilityVariable. |
|
ProbabilityVariable(BayesNet b_n,
java.lang.String n_vb,
java.util.Vector p)
Constructor for ProbabilityVariable. |
|
ProbabilityVariable(ProbabilityVariable pv)
Constructor for ProbabilityVariable. |
|
| Method Summary | |
|---|---|
void |
add_property(java.lang.String prop)
Add a property to the current ProbabilityVariable. |
java.util.Enumeration |
get_enumerated_properties()
Get an Enumeration with the properties. |
int |
get_explanation_index()
Get the index of the assigned value in the variable. |
int |
get_observed_index()
Get the index of the observed value. |
java.util.Vector |
get_properties()
Get the properties. |
int |
get_type()
Get the type of the ProbabilityVariable. |
boolean |
is_explanation()
Indicate whether the current ProbabilityVariable is an explanatory variable or not. |
boolean |
is_observed()
Indicate whether the current ProbabilityVariable has been observed or not. |
void |
print(java.io.PrintStream out)
Print method for ProbabilityVariable. |
(package private) void |
process_properties()
Determine: 1) whether a variable is observed 2) whether a variable is a explanation variable |
void |
remove_property(int i)
Remove a property from the current ProbabilityVariable given the position of the property. |
void |
remove_property(java.lang.String prop)
Remove a property from the current ProbabilityVariable. |
void |
save_xml_0_3(java.io.PrintStream out)
Save the contents of a ProbabilityVariable object into a PrintStream using the XMLBIF v0.3 format. |
void |
save_xml(java.io.PrintStream out)
Save the contents of a ProbabilityVariable object into a PrintStream. |
void |
set_explanation_value(int i)
Set the variable as explanatory with a given value. |
void |
set_index(int ind)
Set the index of the variable. |
void |
set_invalid_index()
Set the index of the current ProbabilityVariable as invalid (variable is not observed). |
void |
set_invalid_observed_index()
Set the ProbabilityVariable as not observed.. |
void |
set_observed_value(java.lang.String v)
Set a value of the current ProbabilityVariable as observed. |
void |
set_properties(java.util.Vector prop)
Set the properties. |
void |
set_type(int t)
Set the type of the current ProbabilityVariable. |
| Methods inherited from class pt.tumba.ngram.bayes.DiscreteVariable |
|---|
get_index, get_name, get_numeric_values, get_value, get_values, index_of_value, number_values, print, set_name, set_values |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int type
protected int observed_index
protected int explanation_index
protected java.util.Vector properties
protected BayesNet bn
public static final int CHANCE
public static final int TRANSPARENT
static final java.lang.String observed_property_name
static final java.lang.String explanation_property_name
| Constructor Detail |
|---|
public ProbabilityVariable()
public ProbabilityVariable(BayesNet b_n,
java.lang.String n_vb,
java.util.Vector p)
public ProbabilityVariable(BayesNet b_n,
java.lang.String n_vb,
int vi,
java.lang.String[] vl,
java.util.Vector p)
public ProbabilityVariable(ProbabilityVariable pv)
public ProbabilityVariable(BayesNet b_n,
ProbabilityVariable pv)
| Method Detail |
|---|
void process_properties()
public void save_xml_0_3(java.io.PrintStream out)
public void save_xml(java.io.PrintStream out)
public void print(java.io.PrintStream out)
print in class DiscreteVariablepublic int get_type()
public boolean is_explanation()
public boolean is_observed()
public void set_observed_value(java.lang.String v)
v - Observed value.public void set_explanation_value(int i)
i - Index of the value that is assigned to the variable.public void add_property(java.lang.String prop)
public void remove_property(java.lang.String prop)
public void remove_property(int i)
public int get_observed_index()
public int get_explanation_index()
public java.util.Vector get_properties()
public void set_properties(java.util.Vector prop)
public java.util.Enumeration get_enumerated_properties()
public void set_index(int ind)
public void set_invalid_index()
public void set_invalid_observed_index()
public void set_type(int t)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||