|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.tumba.ngram.bayes.DiscreteVariable
public class DiscreteVariable
***************************************************************
Field Summary | |
---|---|
protected int |
index
|
protected java.lang.String |
name
|
protected java.lang.String[] |
values
|
Constructor Summary | |
---|---|
DiscreteVariable()
Default constructor for a DiscreteVariable. |
|
DiscreteVariable(DiscreteVariable dv)
Simple constructor for DiscreteVariable. |
|
DiscreteVariable(java.lang.String n_vb)
Simple constructor for DiscreteVariable. |
|
DiscreteVariable(java.lang.String vb,
int vi,
java.lang.String[] vl)
Simple constructor for DiscreteVariable. |
Method Summary | |
---|---|
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. |
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. |
int |
number_values()
Return the number of values in the current DiscreteVariable. |
void |
print()
Print method for DiscreteVariable. |
void |
print(java.io.PrintStream out)
Print method for DiscreteVariable. |
void |
set_name(java.lang.String n)
Set the name 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 java.lang.String name
protected int index
protected java.lang.String[] values
Constructor Detail |
---|
public DiscreteVariable()
public DiscreteVariable(java.lang.String n_vb)
n_vb
- Name of the variable.public DiscreteVariable(java.lang.String vb, int vi, java.lang.String[] vl)
vb
- Name of the variable.vi
- Index of the variable.vl
- Values of the variable.public DiscreteVariable(DiscreteVariable dv)
dv
- DiscreteVariable that is copied into current DiscreteVariable.Method Detail |
---|
public int index_of_value(java.lang.String value)
public DiscreteFunction get_numeric_values()
public void print()
public void print(java.io.PrintStream out)
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |