public Circuit(int prime, IList<Gate> gates, IList<string> inputs, Gate outputGate) { Prime = prime; Gates = gates; Inputs = inputs; OutputGate = outputGate; }
private void SetGate(IList<Wire> inputWires, Wire outputWire, Operation op) { Gate gate = new Gate(inputWires, new List<Wire>() { outputWire }, op, prime); foreach (Wire wire in inputWires) wire.TargetGate = gate; outputWire.SourceGate = gate; }
public Wire(Gate sourceGate, bool isOutput) { this.IsOutput = isOutput; this.sourceGate = sourceGate; InputIndex = -1; }
public Wire(Gate sourceGate, Gate targetGate) : this() { this.sourceGate = sourceGate; this.targetGate = targetGate; }
public Wire(int inputIndex, Gate targetGate) { this.InputIndex = inputIndex; this.targetGate = targetGate; }