Exemple #1
0
 public BigCircuit(BigInteger prime, IList <BigGate> gates, IList <string> inputs, BigGate outputGate)
 {
     Prime      = prime;
     Gates      = gates;
     Inputs     = inputs;
     OutputGate = outputGate;
 }
Exemple #2
0
 public BigCircuit(BigInteger prime, IList<BigGate> gates, IList<string> inputs, BigGate outputGate)
 {
     Prime = prime;
     Gates = gates;
     Inputs = inputs;
     OutputGate = outputGate;
 }
Exemple #3
0
        private void SetGate(IList <BigWire> inputWires, BigWire outputWire, Operation op)
        {
            BigGate gate = new BigGate(inputWires, new List <BigWire>()
            {
                outputWire
            }, op, prime);

            foreach (BigWire wire in inputWires)
            {
                wire.TargetGate = gate;
            }

            outputWire.SourceGate = gate;
        }
Exemple #4
0
 public BigWire(BigGate sourceGate, BigGate targetGate)
     : this()
 {
     this.sourceGate = sourceGate;
     this.targetGate = targetGate;
 }
Exemple #5
0
 public BigWire(BigGate sourceGate, bool isOutput)
 {
     this.IsOutput = isOutput;
     this.sourceGate = sourceGate;
     InputIndex = -1;
 }
Exemple #6
0
 public BigWire(int inputIndex, BigGate targetGate)
 {
     this.InputIndex = inputIndex;
     this.targetGate = targetGate;
 }
Exemple #7
0
 public BigWire(BigGate sourceGate, BigGate targetGate)
     : this()
 {
     this.sourceGate = sourceGate;
     this.targetGate = targetGate;
 }
Exemple #8
0
 public BigWire(BigGate sourceGate, bool isOutput)
 {
     this.IsOutput   = isOutput;
     this.sourceGate = sourceGate;
     InputIndex      = -1;
 }
Exemple #9
0
 public BigWire(int inputIndex, BigGate targetGate)
 {
     this.InputIndex = inputIndex;
     this.targetGate = targetGate;
 }
Exemple #10
0
        private void SetGate(IList<BigWire> inputWires, BigWire outputWire, Operation op)
        {
            BigGate gate = new BigGate(inputWires, new List<BigWire>() { outputWire }, op, prime);
            foreach (BigWire wire in inputWires)
                wire.TargetGate = gate;

            outputWire.SourceGate = gate;
        }