- java.lang.Object
-
- org.logicng.cardinalityconstraints.CCConfig.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CCConfig.BuilderalkEncoding(CCConfig.ALK_ENCODER alkEncoder)Sets the encoder for at-least-k constraints.CCConfig.BuilderamkEncoding(CCConfig.AMK_ENCODER amkEncoder)Sets the encoder for at-most-k constraints.CCConfig.BuilderamoEncoding(CCConfig.AMO_ENCODER amoEncoder)Sets the encoder for at-most-one constraints.CCConfig.BuilderbimanderFixedGroupSize(int bimanderFixedGroupSize)Sets the fixed group size for the bimander encoding.CCConfig.BuilderbimanderGroupSize(CCConfig.BIMANDER_GROUP_SIZE bimanderGroupSize)Sets the group size for the bimander encoding.CCConfigbuild()Builds the cardinality constraint encoder configuration.CCConfig.BuildercommanderGroupSize(int commanderGroupSize)Sets the group size for the nesting encoding.CCConfig.BuilderexkEncoding(CCConfig.EXK_ENCODER exkEncoder)Sets the encoder for exactly-k constraints.CCConfig.BuildernestingGroupSize(int nestingGroupSize)Sets the group size for the nesting encoding.CCConfig.BuilderproductRecursiveBound(int productRecursiveBound)Sets the recursive bound for the product encoding.
-
-
-
Method Detail
-
amoEncoding
public CCConfig.Builder amoEncoding(CCConfig.AMO_ENCODER amoEncoder)
Sets the encoder for at-most-one constraints. The default value isBEST.- Parameters:
amoEncoder- the at-most-one encoder- Returns:
- the builder
-
amkEncoding
public CCConfig.Builder amkEncoding(CCConfig.AMK_ENCODER amkEncoder)
Sets the encoder for at-most-k constraints. The default value isBEST.- Parameters:
amkEncoder- the at-most-k encoder- Returns:
- the builder
-
alkEncoding
public CCConfig.Builder alkEncoding(CCConfig.ALK_ENCODER alkEncoder)
Sets the encoder for at-least-k constraints. The default value isBEST.- Parameters:
alkEncoder- the at-least-k encoder- Returns:
- the builder
-
exkEncoding
public CCConfig.Builder exkEncoding(CCConfig.EXK_ENCODER exkEncoder)
Sets the encoder for exactly-k constraints. The default value isBEST.- Parameters:
exkEncoder- the exactly-k encoder- Returns:
- the builder
-
bimanderGroupSize
public CCConfig.Builder bimanderGroupSize(CCConfig.BIMANDER_GROUP_SIZE bimanderGroupSize)
Sets the group size for the bimander encoding. The default value isSQRT.- Parameters:
bimanderGroupSize- the bimander encoding group size- Returns:
- the builder
-
bimanderFixedGroupSize
public CCConfig.Builder bimanderFixedGroupSize(int bimanderFixedGroupSize)
Sets the fixed group size for the bimander encoding. The default value is 3. This setting is only used if the bimander group size is set toFIXED.- Parameters:
bimanderFixedGroupSize- the bimander encoding fixed group size- Returns:
- the builder
-
nestingGroupSize
public CCConfig.Builder nestingGroupSize(int nestingGroupSize)
Sets the group size for the nesting encoding. The default value is 4.- Parameters:
nestingGroupSize- the group size for the nesting encoding- Returns:
- the builder
-
productRecursiveBound
public CCConfig.Builder productRecursiveBound(int productRecursiveBound)
Sets the recursive bound for the product encoding. The default value is 20.- Parameters:
productRecursiveBound- the recursive bound for the product encoding- Returns:
- the builder
-
commanderGroupSize
public CCConfig.Builder commanderGroupSize(int commanderGroupSize)
Sets the group size for the nesting encoding. The default value is 4.- Parameters:
commanderGroupSize- the group size for the nesting encoding- Returns:
- the builder
-
build
public CCConfig build()
Builds the cardinality constraint encoder configuration.- Returns:
- the configuration
-
-