Class: Axiom::Optimizer::Function::Connective::Conjunction::Contradiction

Inherits:
Axiom::Optimizer::Function::Connective::Conjunction show all
Defined in:
lib/axiom/optimizer/function/connective/conjunction.rb

Overview

Optimize when the operands are a contradiction

Constant Summary

Constants inherited from Axiom::Optimizer

Identity, VERSION

Instance Attribute Summary

Attributes included from Binary

#left, #right

Attributes inherited from Axiom::Optimizer

#operation

Instance Method Summary collapse

Methods included from Binary

#initialize

Methods inherited from Axiom::Optimizer

chain, #initialize

Instance Method Details

#optimizable?Boolean

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

Returns:

  • (Boolean)


88
89
90
91
92
93
# File 'lib/axiom/optimizer/function/connective/conjunction.rb', line 88

def optimizable?
  left_contradiction?            ||
  right_contradiction?           ||
  equality_with_same_attributes? ||
  contradiction?
end

#optimizeContradiction

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.

Return a contradiction

Returns:



100
101
102
# File 'lib/axiom/optimizer/function/connective/conjunction.rb', line 100

def optimize
  Axiom::Function::Proposition::Contradiction.instance
end