NORSYS SOFTWARE © 2012 | NETICA API | JAVA   VERSION   5.04  |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--norsys.netica.General | +--norsys.netica.State
A state of a discrete Node, or a state of a discretized continuous Node.
There is no public constructor for State; obtain states by calling Node.state
.
States inherit from General, but currently the only facilities available are the name, title, and comment.
Field Summary | |
static int |
EVERY_STATE
A "wildcard" state that matches all states of a node. |
static int |
IMPOSS_STATE
Indicates that the state value is irrelevant, because it is for a condition that will never occur. |
static int |
UNDEF_STATE
Indicates that the state value is unknown or nonexistent. |
Fields inherited from class norsys.netica.General |
NAME_MAX |
Method Summary | |
void |
delete()
Removes this state from its node, so that the node has one fewer state. |
int |
getIndex()
Returns the index number of this state. |
Node |
getNode()
Returns the Node that this state belongs to. |
double |
getNumeric()
Returns the real value that has been previously associated with this discrete state (by calling setNumeric or |
void |
setNumeric(double value)
Sets the real value to be associated with this discrete state. |
Methods inherited from class norsys.netica.General |
addListener, eventOccurred, getComment, getEnviron, getLabel, getLabel, getName, getTitle, removeListener, setComment, setName, setTitle, toString, user |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int EVERY_STATE |
public static final int IMPOSS_STATE |
public static final int UNDEF_STATE |
Method Detail |
public void delete ( ) throws NeticaException |
This method is for discrete nodes only. It is not for continuous nodes, even if they have been discretized (use setLevels instead).
The CPTable will be renormalized to account for the missing state. If the probability for the missing state was 1.0 anywhere in the table, an error will be generated.
WARNING: You may want to remove any finding for this state's node before calling this method, since if this node has a finding, and it is for the state
being removed, an exception will be thrown. If it is for another state, then that state's index will be properly modified so that after the removal operation it will correspond to the same state as it did before.
Version:
addStates | Add one or more states instead | |
reorderStates | Assign a new order to the states | |
getIndex | Retrieve the new indexes of the states | |
getNumStates | stateIndex must be between 0 and one less than this, inclusive | |
setLevels | For continuous nodes | |
Node.finding().clear() | May want to call this first |
public int getIndex ( ) |
public Node getNode ( ) |
public double getNumeric ( ) throws NeticaException |
Node.setLevels
).
Throws an exception if a real value has not been associated with this state.
Version:
setNumeric | Sets it | |
Node.setLevels | Sets real value of all states, including this one | |
Node.getLevels | Retrieves the real values of all states |
public void setNumeric ( |
| ) throws NeticaException |
The number can be integer or real, negative or positive.
This is for discrete nodes only. An exception will be thrown if it is attempted on a continuous node, even one that has been discretized (use Node.setLevels
instead).
Parameters:
double | value | value to be associated with this discrete state |
getNumeric | Retrieves value | |
Node.setLevels | Sets real value for all states, including this one |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |