|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmarkov.State
public abstract class State
The Class State represent a state in a MarkovProcess. The user of the class should estiblish her own coding convention AND code the compareTo method. If the State can be represented with a vector of integers describing its properties, then it might be easier to implement PropertiesState rather than State.
PropertiesState class
Constructor Summary | |
---|---|
State()
|
Method Summary | |
---|---|
protected boolean |
addMOPName(java.lang.String mopName)
Define a new Measure of Performance (MOP). |
void |
clearMOPs()
|
abstract int |
compareTo(State j)
The method compareTo should be implemented in order to establish a total ordering among the States. |
abstract void |
computeMOPs()
This method should be implemented in order to compute all the measures of performance MOPs. |
java.lang.String |
description()
Returns a String that describes the State. |
boolean |
equals(java.lang.Object o)
|
double |
getMOP(int index)
Gets the value of this MOP. |
double |
getMOP(java.lang.String mopName)
Gets the value of the MOP with this name. |
protected int |
getMOPIndex(java.lang.String name)
|
protected java.lang.String[] |
getMOPNames()
|
protected java.lang.String |
getMOPNames(int i)
|
int |
getNum()
|
java.util.SortedMap<State,java.lang.Double> |
getRates()
Gets the rate from this State to all other States. |
double |
getRateToState(State j)
Gets the rate from this State to State j |
abstract java.lang.String |
label()
Returns a (hopefully short) label that descibes the State. |
protected java.util.ArrayList<java.lang.String> |
mopsNames()
Returns the MOP names for this particular class that extends State. |
protected int |
numMOPNames()
|
int |
setMOP(int index,
double value)
Sets the value of this MOP. |
int |
setMOP(java.lang.String mopName,
double value)
Sets the value of the MP with this name. |
protected void |
setMOPNames(java.lang.String[] mopNames)
Sets the name of all measures of performance. |
void |
setRateToState(State j,
double newVal)
Sets the rate from this State to State j |
java.lang.String |
toString()
Returns the label. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public State()
Method Detail |
---|
public double getRateToState(State j)
j
- Destination Statepublic java.util.SortedMap<State,java.lang.Double> getRates()
double val; Double valObj; for (State j: i.getRates().keySet()) { valObj = (Double)i.getRates().get(j); val = valObj.doubleValue() // val is the rate from i to j // do something }
public void setRateToState(State j, double newVal)
public abstract int compareTo(State j)
compareTo
in interface java.lang.Comparable<State>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
protected java.util.ArrayList<java.lang.String> mopsNames()
protected boolean addMOPName(java.lang.String mopName)
mopName
-
protected void setMOPNames(java.lang.String[] mopNames)
mopNames
- an array with all names.protected java.lang.String[] getMOPNames()
protected java.lang.String getMOPNames(int i)
protected int getMOPIndex(java.lang.String name)
protected int numMOPNames()
public int setMOP(int index, double value)
index
- value
-
public int setMOP(java.lang.String mopName, double value)
mopName
- value
-
public double getMOP(java.lang.String mopName)
mopName
-
public abstract void computeMOPs()
setMop("Utilization server 1", x);
public double getMOP(int index)
index
-
public void clearMOPs()
public abstract java.lang.String label()
public java.lang.String description()
public final java.lang.String toString()
toString
in class java.lang.Object
label()
public int getNum()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |