|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--BayesianNetworks.DiscreteVariable
Field Summary | |
protected BayesNet |
bn
|
static int |
CHANCE
|
static int |
DECISION
|
protected int |
explanation_index
|
protected int |
index
|
protected java.lang.String |
name
|
protected int |
observed_index
|
static int |
TRANSPARENT
|
protected int |
type
|
static int |
UTILITY
|
protected java.lang.String[] |
values
|
Constructor Summary | |
DiscreteVariable(java.lang.String n,
int t,
java.lang.String[] vs)
Constructor for a DiscreteVariable. |
Method Summary | |
int |
get_explanation_index()
Get the index of the assigned value in the variable. |
int |
get_index()
Get the index of the current DiscreteVariable. |
java.lang.String |
get_name()
Get the name of the current DiscreteVariable. |
DiscreteFunction |
get_numeric_values()
Produce an array of numeric values for the values of a variable. |
int |
get_observed_index()
Get the index of the observed value. |
int |
get_type()
Get the type of the DiscreteVariable. |
java.lang.String |
get_value(int i)
Get a value of the current DiscreteVariable. |
java.lang.String[] |
get_values()
Get the values of the current DiscreteVariable. |
int |
index_of_value(java.lang.String value)
Determine the index of a value given its name; returns INVALID_INDEX if there is no index. |
boolean |
is_explanation()
Indicate whether the current DiscreteVariable is an explanatory variable or not. |
boolean |
is_observed()
Indicate whether the current DiscreteVariable has been observed or not. |
int |
number_values()
Return the number of values in the current DiscreteVariable. |
void |
set_explanation_index(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 DiscreteVariable as invalid. |
void |
set_invalid_observed_index()
Set the DiscreteVariable as not observed.. |
void |
set_name(java.lang.String n)
Set the name of the current DiscreteVariable. |
void |
set_observed_value(java.lang.String v)
Set a value of the current DiscreteVariable as observed. |
void |
set_type(int t)
Set the type of the current DiscreteVariable. |
void |
set_values(java.lang.String[] vals)
Set the values of the current DiscreteVariable. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected BayesNet bn
protected java.lang.String name
protected int index
protected java.lang.String[] values
protected int type
protected int observed_index
protected int explanation_index
public static final int CHANCE
public static final int TRANSPARENT
public static final int DECISION
public static final int UTILITY
Constructor Detail |
public DiscreteVariable(java.lang.String n, int t, java.lang.String[] vs)
Method Detail |
public int index_of_value(java.lang.String value)
public DiscreteFunction get_numeric_values()
public java.lang.String get_name()
public void set_name(java.lang.String n)
public int get_index()
public int number_values()
public java.lang.String[] get_values()
public void set_values(java.lang.String[] vals)
public java.lang.String get_value(int i)
i
- Position of the value in the array of values.public 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_index(int i)
i
- Index of the value that is assigned to the variable.public int get_observed_index()
public int get_explanation_index()
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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |