public class NormalizedVariableFeatures extends java.lang.Object implements DenseStateFeatures
variableDomain(Object, VariableDomain)
 method. If you do not set a range for a variable, then that variable will not have a corresponding entry in the
 constructed double array. If a state implements StateDomain, then you can give an example state to the
 useAllDomains(StateDomain) method, and it will automatically define the ranges for all variables that have
 corresponding VariableDomain entries defined in teh StateDomain.| Modifier and Type | Field and Description | 
|---|---|
protected java.util.Map<java.lang.Object,VariableDomain> | 
domains  | 
| Constructor and Description | 
|---|
NormalizedVariableFeatures()  | 
NormalizedVariableFeatures(java.util.Map<java.lang.Object,VariableDomain> domains)  | 
| Modifier and Type | Method and Description | 
|---|---|
DenseStateFeatures | 
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. 
 | 
NormalizedVariableFeatures | 
useAllDomains(StateDomain state)
Goes through the state and sets the ranges for all variables that have a  
VariableDomain set. | 
NormalizedVariableFeatures | 
variableDomain(java.lang.Object key,
              VariableDomain range)
Sets the variable range for the given variable. 
 | 
protected java.util.Map<java.lang.Object,VariableDomain> domains
public NormalizedVariableFeatures()
public NormalizedVariableFeatures(java.util.Map<java.lang.Object,VariableDomain> domains)
public NormalizedVariableFeatures variableDomain(java.lang.Object key, VariableDomain range)
key - the variable keyrange - the range of the variable.public NormalizedVariableFeatures useAllDomains(StateDomain state)
VariableDomain set. If
 the StateDomain.domain(Object) method returns null for a state variable key, then a range will not be set
 and the variable will be skipped (unless a range is then manually added with the variableDomain(Object, VariableDomain)
 method).state - the StateDomain to query for the the state ranges.public double[] features(State s)
DenseStateFeaturesfeatures in interface DenseStateFeaturess - the input state to turn into a feature vector.public DenseStateFeatures copy()
DenseStateFeaturesDenseStateFeaturescopy in interface DenseStateFeaturesDenseStateFeatures