-public class Merger implements WireArrayObserver, Component {
- private WireArrayInput outI;
+public class Merger implements WireArrayObserver, Component
+{
+ private WireArrayEnd outI;
* @param union The output of merging n {@link WireArray}s into one. Must have length = a1.length() + a2.length() + ... + an.length().
* @param inputs The inputs to be merged into the union
*/
* @param union The output of merging n {@link WireArray}s into one. Must have length = a1.length() + a2.length() + ... + an.length().
* @param inputs The inputs to be merged into the union
*/
beginningIndex[i] = length;
length += inputs[i].length;
inputs[i].addObserver(this);
beginningIndex[i] = length;
length += inputs[i].length;
inputs[i].addObserver(this);
int index = find(initiator);
int beginning = beginningIndex[index];
outI.feedSignals(beginning, initiator.getValues());
}
int index = find(initiator);
int beginning = beginningIndex[index];
outI.feedSignals(beginning, initiator.getValues());
}