|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmarkov.basic.State
jmarkov.basic.PropertiesState
public class PropertiesState
The states are characterized by an array of integer-valued properties, whose meaning will change from implementation to implementation. The class must be extended.
| Field Summary | |
|---|---|
protected int[] |
prop
This array contains the properties that characterize the state. |
| Constructor Summary | |
|---|---|
PropertiesState(int K)
Constructs a State charcterized by K properties. |
|
PropertiesState(int[] properties)
This creates a PropertiesState with the given array. |
|
PropertiesState(int[] properties,
boolean deepCopy)
This creates a PropertiesState with the given array. |
|
PropertiesState(PropertiesState s)
Constructs a new State by cloning the given State. |
|
| Method Summary | |
|---|---|
PropertiesElement |
clone()
|
int |
compareTo(PropertiesState ps)
Compares according to the internal properties in lexicographic order. |
int |
compareTo(State s)
The method compareTo should be implemented in order to establish a total ordering among the States. |
void |
computeMOPs(MarkovProcess mp)
By default it computes the long run average for each property. |
int |
getNumProps()
Returns the number of properties in the array that characterize this element. |
int[] |
getProperties()
Crates a copy of the properties array. |
int |
getProperty(int index)
Gets the value of this property at this index. |
boolean |
isConsistent()
It is strongly recommended that the user implements this method. |
java.lang.String |
label()
Returns a string representation of this state in vector form. |
protected void |
setProperty(int index,
int value)
Sets the value of the property at the given index |
| Methods inherited from class jmarkov.basic.State |
|---|
description, equals, getIndex, getMOP, getMOP, setMOP, setMOP, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jmarkov.basic.JMarkovElement |
|---|
description, equals, toString |
| Field Detail |
|---|
protected final int[] prop
| Constructor Detail |
|---|
public PropertiesState(int K)
K - Number of Propertiespublic PropertiesState(int[] properties)
properties - An integer valued array with the proerties that characterize
this state.
public PropertiesState(int[] properties,
boolean deepCopy)
properties - An integer valued array with the proerties that characterize
this state.deepCopy - true if the constructor should make a deep copy of the array.
This causes some overhead but increased security.public PropertiesState(PropertiesState s)
public YourState clone() {
return new PropertiesState(this);
}
s - A given State.| Method Detail |
|---|
public void computeMOPs(MarkovProcess mp)
computeMOPs in class Statemp - The model being solved.State.computeMOPs(MarkovProcess)public final int compareTo(State s)
State
compareTo in interface java.lang.Comparable<State>compareTo in class StateComparable.compareTo(Object)public final int compareTo(PropertiesState ps)
ps - The state to compare to
State.compareTo(State)public java.lang.String label()
label in interface JMarkovElementlabel in class StateJMarkovElement.description()public int getNumProps()
PropertiesElement
getNumProps in interface PropertiesElementPropertiesElement.getNumProps()public final int[] getProperties()
getProperties in interface PropertiesElementPropertiesElement.getProperties()public int getProperty(int index)
PropertiesElement
getProperty in interface PropertiesElementPropertiesElement.getProperty(int)
protected void setProperty(int index,
int value)
index - value - public PropertiesElement clone()
clone in interface PropertiesElementclone in class java.lang.ObjectPropertiesElement.clone()public boolean isConsistent()
isConsistent in class StateState.isConsistent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||