Class: Veritas::Optimizer::Function::Connective::Disjunction::ContradictionRightOperand

Inherits:
Veritas::Optimizer::Function::Connective::Disjunction show all
Defined in:
lib/veritas/optimizer/function/connective/disjunction.rb

Overview

Optimize when the right operand is a contradiction

Constant Summary

Constants inherited from Veritas::Optimizer

Noop, VERSION

Instance Attribute Summary

Attributes included from Binary

#left, #right

Attributes inherited from Veritas::Optimizer

#operation

Instance Method Summary collapse

Methods included from Binary

#initialize

Methods inherited from Veritas::Optimizer

chain, #initialize

Instance Method Details

#optimizable?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Test if the right operand is a contradiction

Returns:

  • (Boolean)


42
43
44
# File 'lib/veritas/optimizer/function/connective/disjunction.rb', line 42

def optimizable?
  right_contradiction?
end

#optimizeFunction

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

A Disjunction with a contradiction right operand is equivalent to the left

Returns:



51
52
53
# File 'lib/veritas/optimizer/function/connective/disjunction.rb', line 51

def optimize
  left
end