* @param input The input.
* @return The output.
*/
public final double[] process(final double[] input) {
if (input.length != this.inputSize) {
throw new AnalystError("Invalid input size: " + input.length
+ ", should be " + this.inputSize);
}
this.buffer.add(0, EngineArray.arrayCopy(input));
// are we ready yet?
if (this.buffer.size() < this.totalDepth) {
return null;
}
// create output
final double[] output = new double[this.outputSize];
int outputIndex = 0;
for (final AnalystField field : this.analyst.getScript().getNormalize()
.getNormalizedFields()) {
if (!field.isIgnored()) {
if (!this.headingMap.containsKey(field.getName())) {
throw new AnalystError("Undefined field: "
+ field.getName());
}
final int headingIndex = this.headingMap.get(field.getName());
final int timeslice = translateTimeSlice(field.getTimeSlice());
final double[] row = this.buffer.get(timeslice);