public class FlatStateGridder
extends java.lang.Object
gridDimension(Object, VariableGridSpec)
or gridDimension(Object, double, double, int)
method. Gridding is performed by manipulating (and copying) an input MutableState
. If the input state
contains state variables that do not have a grid spec, then those values will hold constant.Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.Object,VariableGridSpec> |
gridSpecs |
Constructor and Description |
---|
FlatStateGridder() |
Modifier and Type | Method and Description |
---|---|
FlatStateGridder |
gridDimension(java.lang.Object varKey,
double lowerVal,
double upperVal,
int numGridPoints)
Specify a state variable as a dimension of the grid
|
FlatStateGridder |
gridDimension(java.lang.Object varKey,
VariableGridSpec gridSpec)
Specify a state variable as a dimension of a the grid
|
VariableGridSpec |
gridSpec(java.lang.Object varKey)
Returns the grid spec defined for the variable key
|
java.util.List<State> |
gridState(MutableState s)
Grids the input state.
|
protected void |
gridStateHelper(MutableState s,
java.util.List<java.util.Map.Entry<java.lang.Object,VariableGridSpec>> gridDims,
int index,
java.util.List<State> createdStates) |
java.util.Set<java.util.Map.Entry<java.lang.Object,VariableGridSpec>> |
specs()
Returns the set of all grid specs defined.
|
protected java.util.Map<java.lang.Object,VariableGridSpec> gridSpecs
public FlatStateGridder gridDimension(java.lang.Object varKey, double lowerVal, double upperVal, int numGridPoints)
varKey
- the variable keylowerVal
- the lower value of gridupperVal
- the upper value of the gridnumGridPoints
- the number of grid points that spans the lower to upper boundpublic FlatStateGridder gridDimension(java.lang.Object varKey, VariableGridSpec gridSpec)
varKey
- the variable keygridSpec
- the grid specificationpublic VariableGridSpec gridSpec(java.lang.Object varKey)
varKey
- the variable keypublic java.util.Set<java.util.Map.Entry<java.lang.Object,VariableGridSpec>> specs()
public java.util.List<State> gridState(MutableState s)
s
- the input state to grid.protected void gridStateHelper(MutableState s, java.util.List<java.util.Map.Entry<java.lang.Object,VariableGridSpec>> gridDims, int index, java.util.List<State> createdStates)