Module logicng
Class AdvancedSimplifierConfig.Builder
- java.lang.Object
-
- org.logicng.transformations.simplification.AdvancedSimplifierConfig.Builder
-
- Enclosing class:
- AdvancedSimplifierConfig
public static class AdvancedSimplifierConfig.Builder extends Object
The builder for the advanced simplifier configuration.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdvancedSimplifierConfigbuild()Builds the configuration.AdvancedSimplifierConfig.BuilderfactorOut(boolean factorOut)Sets the flag for whether the formula should be factorized.AdvancedSimplifierConfig.Builderhandler(OptimizationHandler handler)Sets the handler to control the computation.AdvancedSimplifierConfig.BuilderratingFunction(RatingFunction<?> ratingFunction)Sets the rating function.AdvancedSimplifierConfig.BuilderrestrictBackbone(boolean restrictBackbone)Sets the flag for whether the formula should be restricted with the backbone.AdvancedSimplifierConfig.BuildersimplifyNegations(boolean simplifyNegations)Sets the flag for whether negations shall be simplified.
-
-
-
Method Detail
-
restrictBackbone
public AdvancedSimplifierConfig.Builder restrictBackbone(boolean restrictBackbone)
Sets the flag for whether the formula should be restricted with the backbone. The default is 'true'.- Parameters:
restrictBackbone- flag for the restriction- Returns:
- the current builder
-
factorOut
public AdvancedSimplifierConfig.Builder factorOut(boolean factorOut)
Sets the flag for whether the formula should be factorized. The default is 'true'.- Parameters:
factorOut- flag for the factorisation- Returns:
- the current builder
-
simplifyNegations
public AdvancedSimplifierConfig.Builder simplifyNegations(boolean simplifyNegations)
Sets the flag for whether negations shall be simplified. The default is 'true'.- Parameters:
simplifyNegations- flag- Returns:
- the current builder
-
ratingFunction
public AdvancedSimplifierConfig.Builder ratingFunction(RatingFunction<?> ratingFunction)
Sets the rating function. The aim of the simplification is to minimize the formula with respect to this rating function, e.g. finding a formula with a minimal number of symbols when represented as string. The default is theDefaultRatingFunction.- Parameters:
ratingFunction- the desired rating function- Returns:
- the current builder
-
handler
public AdvancedSimplifierConfig.Builder handler(OptimizationHandler handler)
Sets the handler to control the computation. The default is 'no handler'.- Parameters:
handler- the optimization handler- Returns:
- the current builder
-
build
public AdvancedSimplifierConfig build()
Builds the configuration.- Returns:
- the configuration.
-
-