示例#1
0
        public override void Evaluate <T>(
            ICircuitEvaluator <T> evaluator,
            EvaluationState <T> evaluationState)
        {
            T value = evaluator.EvaluateXorGate(
                evaluationState.GetGateEvaluationValue(_leftInputGate),
                evaluationState.GetGateEvaluationValue(_rightInputGate)
                );

            evaluationState.SetGateEvaluationValue(this, value);
        }
示例#2
0
        public override void Evaluate <T>(
            ICircuitEvaluator <T> evaluator,
            EvaluationState <T> evaluationState,
            CircuitContext circuitContext)
        {
            T value = evaluator.EvaluateAndGate(
                evaluationState.GetGateEvaluationValue(_leftInputGate),
                evaluationState.GetGateEvaluationValue(_rightInputGate),
                Context,
                circuitContext
                );

            evaluationState.SetGateEvaluationValue(this, value);
        }
示例#3
0
 public override void Evaluate <T>(
     ICircuitEvaluator <T> evaluator,
     EvaluationState <T> evaluationState,
     CircuitContext circuitContext)
 {
     evaluationState.SetOutput(Context.TypeUniqueId, evaluationState.GetGateEvaluationValue(_inputGate));
 }
示例#4
0
        public override void Evaluate <T>(
            ICircuitEvaluator <T> evaluator,
            EvaluationState <T> evaluationState)
        {
            T value = evaluator.EvaluateNotGate(
                evaluationState.GetGateEvaluationValue(_inputGate)
                );

            evaluationState.SetGateEvaluationValue(this, value);
        }
示例#5
0
 public override void Evaluate <T>(
     ICircuitEvaluator <T> evaluator,
     EvaluationState <T> evaluationState)
 {
     evaluationState.SetOutput(_outputIndex, evaluationState.GetGateEvaluationValue(_inputGate));
 }