public class PropertiesState extends State implements PropertiesElement
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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. the user
should override this method in order to compute more meaningful measures
of performance.
|
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.
|
description, equals, getIndex, getMOP, getMOP, setMOP, setMOP, toString
getClass, hashCode, notify, notifyAll, wait, wait, wait
description, equals, toString
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.public void computeMOPs(MarkovProcess mp)
computeMOPs
in class State
mp
- The model being solved.State.computeMOPs(MarkovProcess)
public final int compareTo(State s)
State
public final int compareTo(PropertiesState ps)
ps
- The state to compare toState.compareTo(State)
public java.lang.String label()
label
in interface JMarkovElement
label
in class State
JMarkovElement.description()
public int getNumProps()
PropertiesElement
getNumProps
in interface PropertiesElement
PropertiesElement.getNumProps()
public final int[] getProperties()
getProperties
in interface PropertiesElement
PropertiesElement.getProperties()
public int getProperty(int index)
PropertiesElement
getProperty
in interface PropertiesElement
PropertiesElement.getProperty(int)
public PropertiesElement clone()
clone
in interface PropertiesElement
clone
in class java.lang.Object
PropertiesElement.clone()
public boolean isConsistent()
isConsistent
in class State
State.isConsistent()