Class: Veritas::Optimizer::Function::Connective::Binary::ConstantOperands

Inherits:
Veritas::Optimizer::Function::Connective::Binary show all
Includes:
Binary::ConstantOperands
Defined in:
lib/veritas/optimizer/function/connective/binary.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 Connective with constant values is equivalent to a Proposition

Returns:

  • (Proposition)


168
169
170
# File 'lib/veritas/optimizer/function/connective/binary.rb', line 168

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