Class: Axiom::Optimizer::Function::Predicate::Equality::Tautology

Inherits:
Axiom::Optimizer::Function::Predicate::Equality show all
Includes:
Tautology
Defined in:
lib/axiom/optimizer/function/predicate/equality.rb

Overview

Optimize when the operand are a tautology

Constant Summary

Constants inherited from Axiom::Optimizer

Identity, VERSION

Instance Attribute Summary

Attributes included from Binary

#left, #right

Attributes inherited from Axiom::Optimizer

#operation

Instance Method Summary collapse

Methods included from Tautology

#optimize

Methods included from Binary

#initialize

Methods inherited from Axiom::Optimizer

chain, #initialize, #optimize

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

Returns:

  • (Boolean)


26
27
28
# File 'lib/axiom/optimizer/function/predicate/equality.rb', line 26

def optimizable?
  left.equal?(right)
end