public class InputMapper
extends java.lang.Object
Constructor and Description |
---|
InputMapper(java.util.Hashtable<java.lang.String,XMLFieldEntry> properties,
NESRandom generator,
int nInput,
int maxInputValues) |
Modifier and Type | Method and Description |
---|---|
InputMapper |
clone() |
org.dom4j.Element |
exportXml(org.dom4j.Element element) |
java.util.ArrayList<java.lang.Integer> |
getEncodedInputValues(java.util.ArrayList<java.lang.Float> sensorInputs)
Converts the inputs to their position between min and max.
|
IntegerInput |
getInput(int index) |
IntegerInput[] |
getInputs() |
int |
getInputValueCombinations() |
static java.lang.String |
getIntegerArrayListAsString(java.util.ArrayList<java.lang.Integer> list) |
int |
getNumberOfInputs() |
int |
getNumberOfThresholds() |
int |
getPositionInSortedInputList(java.util.ArrayList<java.lang.Float> sensorInputs) |
int |
getSumOfThresholds() |
int |
getThreshold(int i) |
int |
getThresholdId(int i) |
java.util.ArrayList<java.lang.Integer> |
getThresholds() |
static boolean |
isNotEmpty(java.lang.String source) |
void |
loadDefaultProperties()
Loads default settings: each input is thresholded.
|
static InputMapper |
loadFromXML(org.dom4j.Node n) |
void |
mutateThreshold(int id,
ThresholdedIntegerInput.MutationType mutationType) |
void |
printInfos() |
void |
setThreshold(int index,
java.lang.Integer value)
Set a thresholds value.
|
void |
setThresholdId(int i,
int value) |
public InputMapper(java.util.Hashtable<java.lang.String,XMLFieldEntry> properties, NESRandom generator, int nInput, int maxInputValues)
public InputMapper clone()
clone
in class java.lang.Object
public int getNumberOfInputs()
public int getNumberOfThresholds()
public IntegerInput[] getInputs()
public org.dom4j.Element exportXml(org.dom4j.Element element)
public java.util.ArrayList<java.lang.Integer> getThresholds()
public void setThreshold(int index, java.lang.Integer value)
index
- value
- public int getSumOfThresholds()
public int getThreshold(int i)
public int getThresholdId(int i)
public void setThresholdId(int i, int value)
public static InputMapper loadFromXML(org.dom4j.Node n)
public static java.lang.String getIntegerArrayListAsString(java.util.ArrayList<java.lang.Integer> list)
public void mutateThreshold(int id, ThresholdedIntegerInput.MutationType mutationType)
public java.util.ArrayList<java.lang.Integer> getEncodedInputValues(java.util.ArrayList<java.lang.Float> sensorInputs)
public int getPositionInSortedInputList(java.util.ArrayList<java.lang.Float> sensorInputs)
public int getInputValueCombinations()
public void loadDefaultProperties()
public void printInfos()
public IntegerInput getInput(int index)
public static boolean isNotEmpty(java.lang.String source)