else {
// TODO: Test with spiking outputs?
float[] values = new float[myDimension];
Iterator<PassthroughTermination> it = myTerminations.values().iterator();
while (it.hasNext()) {
PassthroughTermination termination = it.next();
InstantaneousOutput io = termination.getValues();
if (io instanceof RealOutput) {
values = MU.sum(values, ((RealOutput) io).getValues());
} else if (io instanceof SpikeOutput) {
boolean[] spikes = ((SpikeOutput) io).getValues();
for (int i = 0; i < spikes.length; i++) {
if (spikes[i]) {
values[i] += 1f/(endTime - startTime);
}
}
} else if (io == null) {
throw new SimulationException("Null input to Termination " + termination.getName());
} else {
throw new SimulationException("Output type unknown: " + io.getClass().getName());
}
}
// Send values over the socket.