public class OOStateGridder
extends java.lang.Object
OOState
. This class will generate a grid along dimensions for objects in the state belonging to specified
classes. To set the dimensions of objects of a specific object class to be part of the grid, use the
gridObjectClass(String, FlatStateGridder)
method.
In principle, the FlatStateGridder
could be used to accomplish the same effect, but grids would have to
be specified for every object-dimension pair. That is, if there are two objects of the same class, a FlatStateGridder
would require you independently set the grid specification for object. This class streamlines that process by
having you specify the gridding along each object class of interest, and it will automatically replicate
the grid specification for each object in the state that belongs to that class.
Grid a state with the gridState(MutableOOState)
method. If the state contains objects that belong to
classes that do not have grid specifications assigned for them, then they will be held constant in the returned
states.
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,FlatStateGridder> |
classesToGrid |
Constructor and Description |
---|
OOStateGridder() |
Modifier and Type | Method and Description |
---|---|
OOStateGridder |
gridObjectClass(java.lang.String className,
FlatStateGridder gridder)
Specifies the gridding for a given object class.
|
java.util.List<State> |
gridState(MutableOOState s)
Generates a set of states spaced along along.
|
protected java.util.Map<java.lang.String,FlatStateGridder> classesToGrid
public OOStateGridder gridObjectClass(java.lang.String className, FlatStateGridder gridder)
className
- the OO-MDP object class namegridder
- the gridding specification along objects of that classpublic java.util.List<State> gridState(MutableOOState s)
s
- the input state to grid