org.encog.util.normalize.input
Class InputFieldArray1D
java.lang.Object
org.encog.util.normalize.input.BasicInputField
org.encog.util.normalize.input.InputFieldArray1D
- All Implemented Interfaces:
- Serializable, HasFixedLength, InputField
public class InputFieldArray1D
- extends BasicInputField
- implements HasFixedLength
An input field that comes from a 1D array.
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 |
InputFieldArray1D(boolean usedForNetworkInput,
double[] array)
Construct the 1D array field. |
Method Summary |
double |
getValue(int i)
Get the 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 |
InputFieldArray1D
public InputFieldArray1D(boolean usedForNetworkInput,
double[] array)
- Construct the 1D array field.
- Parameters:
usedForNetworkInput
- True if this field is used for the actual
input to the neural network. See getUsedForNetworkInput for more info.array
- The array to use.
getValue
public double getValue(int i)
- Get the value from the specified index.
- Specified by:
getValue
in interface InputField
- Overrides:
getValue
in class BasicInputField
- Parameters:
i
- The index to retrieve.
- Returns:
- The value at the specified index.
length
public int length()
- Specified by:
length
in interface HasFixedLength
- Returns:
- The length of the array.
Copyright © 2014. All Rights Reserved.