Class: Veritas::Optimizer::Function::Connective::Negation::ConstantOperand

Inherits:
Veritas::Optimizer::Function::Connective::Negation show all
Includes:
Unary::ConstantOperand
Defined in:
lib/veritas/optimizer/function/connective/negation.rb

Overview

Optimize when the operand is constant

Constant Summary

Constants inherited from Veritas::Optimizer

Noop, VERSION

Instance Attribute Summary

Attributes included from Unary

#operand

Attributes inherited from Veritas::Optimizer

#operation

Instance Method Summary collapse

Methods included from Unary::ConstantOperand

#optimizable?

Methods included from Unary

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

Returns:

  • (Proposition)


44
45
46
# File 'lib/veritas/optimizer/function/connective/negation.rb', line 44

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