import java.util.List;\r
\r
import era.mi.logic.Bit;\r
import era.mi.logic.components.BasicComponent;\r
import era.mi.logic.wires.WireArray;\r
import java.util.List;\r
\r
import era.mi.logic.Bit;\r
import era.mi.logic.components.BasicComponent;\r
import era.mi.logic.wires.WireArray;\r
- protected MultiInputGate(int processTime, Operation op, WireArray out, WireArray... in) {\r
+ protected MultiInputGate(int processTime, Operation op, WireArray out, WireArray... in)\r
+ {\r
if (w.length != length)\r
throw new IllegalArgumentException("All wires connected to the gate must be of uniform length.");\r
w.addObserver(this);\r
if (w.length != length)\r
throw new IllegalArgumentException("All wires connected to the gate must be of uniform length.");\r
w.addObserver(this);\r
Bit[] result = in[0].getValues();\r
for (int i = 1; i < in.length; i++)\r
result = op.execute(result, in[i].getValues());\r
outI.feedSignals(result);\r
}\r
\r
Bit[] result = in[0].getValues();\r
for (int i = 1; i < in.length; i++)\r
result = op.execute(result, in[i].getValues());\r
outI.feedSignals(result);\r
}\r
\r