- java.lang.Object
-
- org.logicng.transformations.simplification.FactorOutSimplifier
-
- All Implemented Interfaces:
FormulaTransformation
public final class FactorOutSimplifier extends Object implements FormulaTransformation
Factor out simplification.Reduces the length for a formula by applying factor out operations.
- Since:
- 2.0.0
- Version:
- 2.0.0
-
-
Constructor Summary
Constructors Constructor Description FactorOutSimplifier()Constructs a new factor out simplification with the default rating functionDefaultRatingFunction.FactorOutSimplifier(RatingFunction<? extends Number> ratingFunction)Constructs a new factor out simplification with the given rating function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Formulaapply(Formula formula, boolean cache)Returns the transformed formula.
-
-
-
Constructor Detail
-
FactorOutSimplifier
public FactorOutSimplifier(RatingFunction<? extends Number> ratingFunction)
Constructs a new factor out simplification with the given rating function.- Parameters:
ratingFunction- the rating function
-
FactorOutSimplifier
public FactorOutSimplifier()
Constructs a new factor out simplification with the default rating functionDefaultRatingFunction.
-
-
Method Detail
-
apply
public Formula apply(Formula formula, boolean cache)
Description copied from interface:FormulaTransformationReturns the transformed formula.- Specified by:
applyin interfaceFormulaTransformation- Parameters:
formula- the input formulacache- indicated whether the result (and associated predicates) should be cached in the formula's cache.- Returns:
- the transformed formula
-
-