Sha256: 2381d0c21047c4494bfd1cb76a84e9252390c139ca1168155ec45625f6299f30
Contents?: true
Size: 1.12 KB
Versions: 3
Compression:
Stored size: 1.12 KB
Contents
# encoding: utf-8 module Axiom class Optimizer module Function class Predicate # Abstract base class representing Exclusion optimizations class Exclusion < self include Enumerable # Optimize when the right operand is empty class EmptyRight < self include Enumerable::EmptyRight, Predicate::Tautology end # class EmptyRight # Optimize when the right operand has one entry class OneRight < self include Enumerable::OneRight # An Exclusion with a single right operand is equivalent to an Inequality # # @return [Inequality] # # @api private def optimize left.ne(right.first) end end # class OneRight Axiom::Function::Predicate::Exclusion.optimizer = chain( ConstantOperands, EmptyRight, OneRight, Enumerable::UnoptimizedOperands ) end # class Exclusion end # class Predicate end # module Function end # class Optimizer end # module Axiom
Version data entries
3 entries across 3 versions & 1 rubygems