class Axiom::Optimizer::Function::Connective::Negation::InvertibleOperand

Optimize when the operand can be inverted

Public Instance Methods

optimizable?() click to toggle source

Test if the operand can be inverted

@return [Boolean]

@api private

# File lib/axiom/optimizer/function/connective/negation.rb, line 20
def optimizable?
  operand.respond_to?(:inverse)
end
optimize() click to toggle source

A Negation of an Function is equivalent to the inverted Function

@return [Function]

@api private

# File lib/axiom/optimizer/function/connective/negation.rb, line 29
def optimize
  operand.inverse
end