|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmdp.basic.ValueFunction<S>
public class ValueFunction<S extends State>
This structure matches each state with a double number representing its value function, or in some cases the steady state probabilities.
Constructor Summary | |
---|---|
ValueFunction()
Creates a new empty value function. |
|
ValueFunction(ValueFunction<S> vf)
Creates a value function from another given value function |
Method Summary | |
---|---|
double |
get(S s)
|
java.util.Iterator<java.util.Map.Entry<S,java.lang.Double>> |
iterator()
|
void |
print(java.io.PrintWriter pw)
Prints the Value Function. |
void |
print(java.io.PrintWriter pw,
java.lang.String statesFormat,
java.lang.String valuesFormat)
Prints the Value function with the given state format , and values format according to the Format String Syntax. |
void |
set(S s,
double val)
Associates a state and a double value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValueFunction()
public ValueFunction(ValueFunction<S> vf)
vf
- value functionMethod Detail |
---|
public void set(S s, double val)
s
- stateval
- valuepublic java.util.Iterator<java.util.Map.Entry<S,java.lang.Double>> iterator()
public double get(S s)
s
- given state
public void print(java.io.PrintWriter pw, java.lang.String statesFormat, java.lang.String valuesFormat)
pw
- statesFormat
- format for the states , for example "%-10S" to have 10 width left
aligned states.valuesFormat
- format to use for values. For example us "%6.2" to have 6
width and 2 decimals.Formatter
public void print(java.io.PrintWriter pw)
pw
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |