Module logicng

Class CCConfig.Builder

  • Enclosing class:
    CCConfig

    public static class CCConfig.Builder
    extends Object
    The builder for a cardinality constraint encoder configuration.
    • Method Detail

      • amoEncoding

        public CCConfig.Builder amoEncoding​(CCConfig.AMO_ENCODER amoEncoder)
        Sets the encoder for at-most-one constraints. The default value is BEST.
        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 is BEST.
        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 is BEST.
        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 is BEST.
        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 is SQRT.
        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 to FIXED.
        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