- java.lang.Object
-
- org.logicng.transformations.PureExpansionTransformation
-
- All Implemented Interfaces:
FormulaTransformation
public final class PureExpansionTransformation extends Object implements FormulaTransformation
Transformation of a formula to a formula with expanded at-most-one and exactly-one cardinality constraints. Each subformula of the formula that is a pseudo-Boolean constraint of type AMO or EXO gets replaced by a pure encoding such that the resulting formula is equivalent and free of pseudo-Boolean constraints.- Since:
- 2.0.0
- Version:
- 2.3.0
-
-
Constructor Summary
Constructors Constructor Description PureExpansionTransformation()Deprecated.In the next version, the standard constructor will be replaced by a private constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Formulaapply(Formula formula, boolean cache)Returns the transformed formula.static PureExpansionTransformationget()Returns the singleton instance of this function.StringtoString()
-
-
-
Constructor Detail
-
PureExpansionTransformation
@Deprecated public PureExpansionTransformation()
Deprecated.In the next version, the standard constructor will be replaced by a private constructor. In order to instantiate an object of this class, use theget()method.Constructs a new transformation instance.
-
-
Method Detail
-
get
public static PureExpansionTransformation get()
Returns the singleton instance of this function.- Returns:
- an instance of this function
-
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
-
-