Exemplo n.º 1
0
        public T[] EvaluateAndGateBatch(GateEvaluationInput <T>[] evaluationInputs)
        {
            T[] outputValues = new T[evaluationInputs.Length];
            for (int i = 0; i < evaluationInputs.Length; ++i)
            {
                GateEvaluationInput <T> evaluationInput = evaluationInputs[i];
                outputValues[i] = _innerEvaluator.EvaluateAndGate(
                    evaluationInput.LeftValue,
                    evaluationInput.RightValue
                    );
            }

            return(outputValues);
        }
Exemplo n.º 2
0
 public GateEvaluation(ForwardGate gate, GateEvaluationInput <T> input)
 {
     Gate  = gate;
     Input = input;
 }
Exemplo n.º 3
0
        protected override void ReceiveInputValues <T>(T leftValue, T rightValue, IBatchCircuitEvaluator <T> evaluator, ForwardEvaluationState <T> evaluationState)
        {
            GateEvaluationInput <T> evaluationInput = new GateEvaluationInput <T>(leftValue, rightValue);

            evaluationState.DelayAndGateEvaluation(new GateEvaluation <T>(this, evaluationInput));
        }