public class NumericVariableFeatures extends java.lang.Object implements DenseStateFeatures
DenseStateFeatures
that iterates through all state variables in a state
and places them into the returned double array. Note that the values for the state variable must
return a Number
value. Alternatively, you may only have a subset of the state variables be used
by setting up a white list of the variables to use with the addToWhiteList(Object)
method.
If you do not add any variables to the white list, then it will be assumed that all variables should be used.Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.lang.Object> |
whiteList |
Constructor and Description |
---|
NumericVariableFeatures() |
NumericVariableFeatures(java.util.List<java.lang.Object> whiteList) |
NumericVariableFeatures(java.lang.Object... keys) |
Modifier and Type | Method and Description |
---|---|
NumericVariableFeatures |
addToWhiteList(java.lang.Object variableKey) |
NumericVariableFeatures |
copy()
Returns a copy of this
DenseStateFeatures |
double[] |
features(State s)
Returns a feature vector represented as a double array for a given input state.
|
public NumericVariableFeatures()
public NumericVariableFeatures(java.lang.Object... keys)
public NumericVariableFeatures(java.util.List<java.lang.Object> whiteList)
public NumericVariableFeatures addToWhiteList(java.lang.Object variableKey)
public double[] features(State s)
DenseStateFeatures
features
in interface DenseStateFeatures
s
- the input state to turn into a feature vector.public NumericVariableFeatures copy()
DenseStateFeatures
DenseStateFeatures
copy
in interface DenseStateFeatures
DenseStateFeatures