norsys.netica
Class State
java.lang.Object
|
+--norsys.netica.Generic
|
+--norsys.netica.State
- All Implemented Interfaces:
- NeticaListener
- public class State
- extends Generic
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 Generic, but currently the only facilities available are the name and title.
- Since:
- 2.08
- Version:
- 2.20 - May 7, 2002
Method Summary |
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 Node.setLevels ). |
void |
setNumeric(double value)
Sets the real value to be associated with this discrete state. |
Methods inherited from class norsys.netica.Generic |
addListener, eventOccurred, getComment, getEnviron, getName, getNthUserField, getTitle, getUserData, getUserField, removeListener, setComment, setName, setTitle, setUserData, setUserField, toString, user |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
getIndex
public int getIndex()
- Returns the index number of this state. It will be between 0 and one less than the number of states of the node.
Version:
In version 2.14 and later.
getNode
public Node getNode()
- Returns the Node that this state belongs to.
Version:
In version 2.14 and later.
getNumeric
public double getNumeric()
throws NeticaException
- Returns the real value that has been previously associated with this discrete state (by calling setNumeric or
Node.setLevels
).
Throws an exception if a real value has not been associated with this state.
Version:
In version 2.14 and later.
See Also:
setNumeric
public void setNumeric(double value)
throws NeticaException
- Sets the real value to be associated with this discrete state.
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.
Parameters:
double | | value | | value to be associated with this discrete state |
Version:
In version 2.14 and later.
See Also: