- java.lang.Object
-
- org.logicng.transformations.BDDNormalFormTransformation
-
- org.logicng.transformations.dnf.BDDDNFTransformation
-
- All Implemented Interfaces:
FormulaTransformation
public final class BDDDNFTransformation extends BDDNormalFormTransformation
Transformation of a formula in DNF by converting it to a BDD.- Since:
- 2.3.0
- Version:
- 2.3.0
-
-
Constructor Summary
Constructors Constructor Description BDDDNFTransformation()Constructs a new BDD-based DNF transformation and constructs a new BDD kernel for every formula application.BDDDNFTransformation(FormulaFactory f, int numVars)Constructs a new BDD-based DNF transformation for a given number of variables.BDDDNFTransformation(BDDKernel kernel)Constructs a new BDD-based DNF transformation with an optional BDD kernel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Formulaapply(Formula formula, boolean cache)Returns the transformed formula.-
Methods inherited from class org.logicng.transformations.BDDNormalFormTransformation
compute
-
-
-
-
Constructor Detail
-
BDDDNFTransformation
public BDDDNFTransformation(BDDKernel kernel)
Constructs a new BDD-based DNF transformation with an optional BDD kernel.Warning: You can use this object for arbitrarily many transformations, but the number of different variables in all applied formulas must not exceed the number of variables in the kernel.
- Parameters:
kernel- the optional BDD kernel
-
BDDDNFTransformation
public BDDDNFTransformation(FormulaFactory f, int numVars)
Constructs a new BDD-based DNF transformation for a given number of variables.Warning: You can use this object for arbitrarily many transformations, but the number of different variables in all applied formulas must not exceed
numVars.To improve performance you might want to use
BDDDNFTransformation(BDDKernel), where you have full control over the node and cache size in the used BDD kernel.- Parameters:
f- the formula factory to usenumVars- the number of variables
-
BDDDNFTransformation
public BDDDNFTransformation()
Constructs a new BDD-based DNF transformation and constructs a new BDD kernel for every formula application.
-
-
Method Detail
-
apply
public Formula apply(Formula formula, boolean cache)
Description copied from interface:FormulaTransformationReturns the transformed formula.- Parameters:
formula- the input formulacache- indicated whether the result (and associated predicates) should be cached in the formula's cache.- Returns:
- the transformed formula
-
-