org.encog.util.normalize.input
Class InputFieldArray2D
- java.lang.Object
-
- org.encog.util.normalize.input.BasicInputField
-
- org.encog.util.normalize.input.InputFieldArray2D
-
- All Implemented Interfaces:
- java.io.Serializable, HasFixedLength, InputField
public class InputFieldArray2D extends BasicInputField implements HasFixedLength
An input field that comes from a 2D array. The first dimension of the array will be used to read each successive row. The second dimension is fixed, and specified in the constructor. You would create multiple InputFieldArray2D object to read each of the "columns" stored at each row. Note: this input field will not be persisted to an EG file. This is because it could point to a lengthy array, that really has no meaning inside of an EG file.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description InputFieldArray2D(boolean usedForNetworkInput, double[][] array, int index2)Construct a 2D array input field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetValue(int i)Read a value from the specified index.intlength()-
Methods inherited from class org.encog.util.normalize.input.BasicInputField
applyMinMax, getCurrentValue, getMax, getMin, getUsedForNetworkInput, setCurrentValue, setMax, setMin, setUsedForNetworkInput
-
-
-
-
Constructor Detail
-
InputFieldArray2D
public InputFieldArray2D(boolean usedForNetworkInput, double[][] array, int index2)Construct a 2D array input field.- Parameters:
usedForNetworkInput- Is this field used for neural network input?array- The array to use.index2- The secondary index to read the field from.
-
-
Method Detail
-
getValue
public double getValue(int i)
Read a value from the specified index.- Specified by:
getValuein interfaceInputField- Overrides:
getValuein classBasicInputField- Parameters:
i- The index.- Returns:
- The value read.
-
length
public int length()
- Specified by:
lengthin interfaceHasFixedLength- Returns:
- The number of rows in the array.
-
-
DMelt 3.0 © DataMelt by jWork.ORG