Class: Veritas::Optimizer::PredicatePartition
- Inherits:
-
Object
- Object
- Veritas::Optimizer::PredicatePartition
- Includes:
- Immutable
- Defined in:
- lib/veritas/optimizer/support/predicate_partition.rb
Overview
Partition a predicate to distribute it over binary operations
Constant Summary collapse
- TAUTOLOGY =
Veritas::Function::Proposition::Tautology.instance
Instance Attribute Summary collapse
-
#left ⇒ Function
readonly
private
Returns the predicate for the left header.
-
#remainder ⇒ Function
readonly
private
Returns the remainder predicate.
-
#right ⇒ Function
readonly
private
Returns the predicate for the right header.
Instance Method Summary collapse
-
#initialize(predicate, left_header, right_header) ⇒ undefined
constructor
private
Initialize a Predication Partition.
Constructor Details
#initialize(predicate, left_header, right_header) ⇒ undefined
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.
Initialize a Predication Partition
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/veritas/optimizer/support/predicate_partition.rb', line 47 def initialize(predicate, left_header, right_header) @left = TAUTOLOGY @right = TAUTOLOGY @remainder = TAUTOLOGY @left_header = left_header @right_header = right_header partition!(predicate) end |
Instance Attribute Details
#left ⇒ Function (readonly)
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.
Returns the predicate for the left header
17 18 19 |
# File 'lib/veritas/optimizer/support/predicate_partition.rb', line 17 def left @left end |
#remainder ⇒ Function (readonly)
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.
Returns the remainder predicate
31 32 33 |
# File 'lib/veritas/optimizer/support/predicate_partition.rb', line 31 def remainder @remainder end |
#right ⇒ Function (readonly)
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.
Returns the predicate for the right header
24 25 26 |
# File 'lib/veritas/optimizer/support/predicate_partition.rb', line 24 def right @right end |