Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public override void Evaluate <T>(
     ICircuitEvaluator <T> evaluator,
     EvaluationState <T> evaluationState,
     CircuitContext circuitContext)
 {
     evaluationState.SetOutput(Context.TypeUniqueId, evaluationState.GetGateEvaluationValue(_inputGate));
 }
Ejemplo n.º 4
0
        public override void Evaluate <T>(
            ICircuitEvaluator <T> evaluator,
            EvaluationState <T> evaluationState)
        {
            T value = evaluator.EvaluateNotGate(
                evaluationState.GetGateEvaluationValue(_inputGate)
                );

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