Class: Veritas::Optimizer::Function::Connective::Disjunction::Tautology
- Inherits:
-
Veritas::Optimizer::Function::Connective::Disjunction
- Object
- Veritas::Optimizer
- Binary
- Veritas::Optimizer::Function::Connective::Disjunction
- Veritas::Optimizer::Function::Connective::Disjunction::Tautology
- Defined in:
- lib/veritas/optimizer/function/connective/disjunction.rb
Overview
Optimize when the operands are a tautology
Constant Summary
Constants inherited from Veritas::Optimizer
Instance Attribute Summary
Attributes included from Binary
Attributes inherited from Veritas::Optimizer
Instance Method Summary collapse
-
#optimizable? ⇒ Boolean
private
Test if the operands are a tautology.
-
#optimize ⇒ Tautology
private
Return a tautology.
Methods included from Binary
Methods inherited from Veritas::Optimizer
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 operands are a tautology
88 89 90 91 92 93 |
# File 'lib/veritas/optimizer/function/connective/disjunction.rb', line 88 def optimizable? left_tautology? || right_tautology? || inequality_with_same_attributes? || contradiction? end |
#optimize ⇒ Tautology
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.
Return a tautology
100 101 102 |
# File 'lib/veritas/optimizer/function/connective/disjunction.rb', line 100 def optimize Veritas::Function::Proposition::Tautology.instance end |