|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectalun.markov.BasicVariable
public class BasicVariable
A BasicVariable can take only positive integer values, and setStates can only restrict the possible states among those that were possible on construction.
| Constructor Summary | |
|---|---|
BasicVariable(int n)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getName()
|
int |
getNStates()
Returns the current number of possible states. |
int |
getState()
Returns the value of the current state of the Variable. |
int[] |
getStates()
|
void |
init()
|
static void |
main(java.lang.String[] args)
Test main. |
boolean |
next()
|
void |
setName(java.lang.String s)
|
boolean |
setState(int i)
Sets the current state to the given integer. |
void |
setStates(Function f)
Restricts the set of values that the variable can take to those among the current set for which the given function has positive value. |
void |
setStates(int[] x)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicVariable(int n)
| Method Detail |
|---|
public void setName(java.lang.String s)
public java.lang.String getName()
public java.lang.String toString()
toString in class java.lang.Objectpublic void init()
init in interface Iterablepublic boolean next()
next in interface Iterablepublic int getState()
Variable
getState in interface Variablepublic int getNStates()
Variable
getNStates in interface Variablepublic boolean setState(int i)
Variable
setState in interface Variablepublic void setStates(int[] x)
setStates in interface Variablepublic int[] getStates()
getStates in interface Variablepublic void setStates(Function f)
Variable
setStates in interface Variablepublic static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||