Class: Veritas::Optimizer::Function::Predicate::GreaterThanOrEqualTo::Tautology

Inherits:
Veritas::Optimizer::Function::Predicate::GreaterThanOrEqualTo show all
Includes:
Tautology
Defined in:
lib/veritas/optimizer/function/predicate/greater_than_or_equal_to.rb

Overview

Optimize when the operands are a tautology

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 Tautology

#optimize

Methods included from Binary

#initialize

Methods inherited from Veritas::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)


36
37
38
39
40
# File 'lib/veritas/optimizer/function/predicate/greater_than_or_equal_to.rb', line 36

def optimizable?
  operation = self.operation
  GreaterThan::Tautology.new(operation).optimizable? ||
  Equality::Tautology.new(operation).optimizable?
end