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:
- 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 |
InputFieldArray2D(boolean usedForNetworkInput,
double[][] array,
int index2)
Construct a 2D array input field. |
Method Summary |
double |
getValue(int i)
Read a value from the specified index. |
int |
length()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
getValue
public double getValue(int i)
- Read a value from the specified index.
- Specified by:
getValue
in interface InputField
- Overrides:
getValue
in class BasicInputField
- Parameters:
i
- The index.
- Returns:
- The value read.
length
public int length()
- Specified by:
length
in interface HasFixedLength
- Returns:
- The number of rows in the array.
Copyright © 2014. All Rights Reserved.