Class: Veritas::Optimizer::Function::Predicate::LessThanOrEqualTo::Contradiction

Inherits:
Veritas::Optimizer::Function::Predicate::LessThanOrEqualTo show all
Includes:
Comparable::NeverComparable, Contradiction
Defined in:
lib/veritas/optimizer/function/predicate/less_than_or_equal_to.rb

Overview

Optimize when the operands are a contradiction

Constant Summary

Constant Summary

Constants inherited from Veritas::Optimizer

Identity, VERSION

Instance Attribute Summary

Attributes included from Binary

#left, #right

Attributes inherited from Veritas::Optimizer

#operation

Instance Method Summary (collapse)

Methods included from Contradiction

#optimize

Methods included from Binary

#initialize

Methods inherited from Veritas::Optimizer

chain, #initialize, link_optimizers, #optimize

Instance Method Details

- (Boolean) optimizable?

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 contradiction



21
22
23
# File 'lib/veritas/optimizer/function/predicate/less_than_or_equal_to.rb', line 21

def optimizable?
  super || GreaterThan::Tautology.new(operation.inverse).optimizable?
end