Class AndOrSimplifier
java.lang.Object
com.yahoo.search.predicate.optimization.AndOrSimplifier
- All Implemented Interfaces:
PredicateProcessor
Simplifies a predicate by:
- Combining child-AND/OR nodes with direct parents of the same type
- Pushing negations down to leaf nodes by using De Morgan's law.
- Author:
- Magnar Nedland, bjorncs
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprocess
(Predicate predicate, PredicateOptions options) Processes a predicate.simplifySubTree
(Predicate predicate, boolean negated)
-
Constructor Details
-
AndOrSimplifier
public AndOrSimplifier()
-
-
Method Details
-
simplifySubTree
-
process
Description copied from interface:PredicateProcessor
Processes a predicate.- Specified by:
process
in interfacePredicateProcessor
- Returns:
- the processed predicate.
-