Class: Veritas::Optimizer::Function::Predicate::ConstantOperands

Inherits:
Veritas::Optimizer::Function::Predicate show all
Includes:
Binary::ConstantOperands
Defined in:
lib/veritas/optimizer/function/predicate.rb

Overview

Optimize when the operands are constants

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::ConstantOperands

#optimizable?

Methods included from Binary

#initialize

Methods inherited from Veritas::Optimizer

chain, #initialize, #optimizable?

Instance Method Details

#optimizeProposition

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 Predicate with constant values is equivalent to a Proposition

Returns:

  • (Proposition)


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

def optimize
  Veritas::Function::Proposition.new(super)
end