public class ValueFunctionRenderLayer extends java.lang.Object implements RenderLayer
StateValuePainter
StatePolicyPainter
and StaticDomainPainter
to paint the value function. Each state is iterated over and the the respective classes are used to pain its value function.
The visualizer requires a QComputablePlanner to retrieve the value function.Modifier and Type | Field and Description |
---|---|
protected java.util.Collection<State> |
statesToVisualize
The states to visualize
|
protected StateValuePainter |
svp
Painter used to visualize the value function
|
protected ValueFunction |
valueFunction
The
ValueFunction to query for state values |
Constructor and Description |
---|
ValueFunctionRenderLayer(java.util.Collection<State> states,
StateValuePainter svp,
ValueFunction valueFunction)
Initializes the visualizer.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<State> |
getStatesToVisualize()
Returns the states that will be visualized
|
StateValuePainter |
getSvp()
Returns the State-wise value function painter
|
void |
render(java.awt.Graphics2D g2,
float width,
float height) |
void |
setStatesToVisualize(java.util.Collection<State> stateValuesToVisualize)
Sets the states to visualize
|
void |
setSvp(StateValuePainter svp)
Sets the state-wise value function painter
|
protected java.util.Collection<State> statesToVisualize
protected StateValuePainter svp
protected ValueFunction valueFunction
ValueFunction
to query for state valuespublic ValueFunctionRenderLayer(java.util.Collection<State> states, StateValuePainter svp, ValueFunction valueFunction)
states
- the states whose value should be rendered.svp
- the value function state visualizer to use.valueFunction
- the valueFunction that can return the state values.public java.util.Collection<State> getStatesToVisualize()
public void setStatesToVisualize(java.util.Collection<State> stateValuesToVisualize)
stateValuesToVisualize
- the state to visualizepublic StateValuePainter getSvp()
public void setSvp(StateValuePainter svp)
svp
- state-wise value function painterpublic void render(java.awt.Graphics2D g2, float width, float height)
render
in interface RenderLayer