Class BooleanSimplifier
java.lang.Object
com.yahoo.search.predicate.optimization.BooleanSimplifier
- All Implemented Interfaces:
PredicateProcessor
Simplifies a predicate by collapsing TRUE/FALSE-children into their parents.
E.g. if an AND node has a FALSE child, the entire node is replaced by FALSE.
Replaces single-child AND/OR-nodes with the child.
- Author:
- Magnar Nedland, bjorncs
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprocess
(Predicate predicate, PredicateOptions options) Processes a predicate.simplifySubTree
(Predicate predicate)
-
Constructor Details
-
BooleanSimplifier
public BooleanSimplifier()
-
-
Method Details
-
simplifySubTree
-
process
Description copied from interface:PredicateProcessor
Processes a predicate.- Specified by:
process
in interfacePredicateProcessor
- Returns:
- the processed predicate.
-