- java.lang.Object
-
- org.logicng.transformations.cnf.CNFConfig.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CNFConfig.Builderalgorithm(CNFConfig.Algorithm algorithm)Sets the algorithm for the CNF encoding.CNFConfig.BuilderatomBoundary(int atomBoundary)Sets the boundary for how many atoms in a formula factorization is performed in Tseitin and Plaisted & Greenbaum.CNFConfigbuild()Builds the configuration.CNFConfig.BuildercreatedClauseBoundary(int createdClauseBoundary)Sets the boundary how many clauses should be created in the factorization before the method is switched (in theADVANCEDencoding).CNFConfig.BuilderdistributionBoundary(int distributionBoundary)Sets the boundary how many distributions should be performed in the factorization before the method is switched (in theADVANCEDencoding).CNFConfig.BuilderfallbackAlgorithmForAdvancedEncoding(CNFConfig.Algorithm fallbackAlgorithmForAdvancedEncoding)Sets the fallback algorithm for the advanced CNF encoding.
-
-
-
Method Detail
-
algorithm
public CNFConfig.Builder algorithm(CNFConfig.Algorithm algorithm)
Sets the algorithm for the CNF encoding. The default value isADVANCED.- Parameters:
algorithm- the algorithm for the CNF encoding- Returns:
- the builder
-
fallbackAlgorithmForAdvancedEncoding
public CNFConfig.Builder fallbackAlgorithmForAdvancedEncoding(CNFConfig.Algorithm fallbackAlgorithmForAdvancedEncoding)
Sets the fallback algorithm for the advanced CNF encoding. When the boundaries for the factorization are met, the encoding switches to this algorithm. The default value isTSEITIN.- Parameters:
fallbackAlgorithmForAdvancedEncoding- the fallback algorithm for the advanced CNF encoding- Returns:
- the builder
-
distributionBoundary
public CNFConfig.Builder distributionBoundary(int distributionBoundary)
Sets the boundary how many distributions should be performed in the factorization before the method is switched (in theADVANCEDencoding). Disable this boundary by setting it to -1. The default value is -1.- Parameters:
distributionBoundary- the distribution boundary- Returns:
- the builder
-
createdClauseBoundary
public CNFConfig.Builder createdClauseBoundary(int createdClauseBoundary)
Sets the boundary how many clauses should be created in the factorization before the method is switched (in theADVANCEDencoding). Disable this boundary by setting it to -1. The default value is 1000.- Parameters:
createdClauseBoundary- the clause creation boundary- Returns:
- the builder
-
atomBoundary
public CNFConfig.Builder atomBoundary(int atomBoundary)
Sets the boundary for how many atoms in a formula factorization is performed in Tseitin and Plaisted & Greenbaum. The default value is 12.- Parameters:
atomBoundary- the atom boundary- Returns:
- the builder
-
build
public CNFConfig build()
Builds the configuration.- Returns:
- the configuration.
-
-