Module logicng

Class PBConfig.Builder

  • Enclosing class:
    PBConfig

    public static class PBConfig.Builder
    extends Object
    The builder for a pseudo-Boolean encoder configuration.
    • Method Detail

      • pbEncoding

        public PBConfig.Builder pbEncoding​(PBConfig.PB_ENCODER pbEncoder)
        Sets the encoder for pseudo-Boolean constraints. The default value is BEST.
        Parameters:
        pbEncoder - the pseudo-Boolean encoder
        Returns:
        the builder
      • binaryMergeUseGAC

        public PBConfig.Builder binaryMergeUseGAC​(boolean binaryMergeUseGAC)
        Sets whether general arc consistency should be used in the binary merge encoding. The default value is true.
        Parameters:
        binaryMergeUseGAC - true if general arc consistency should be used, false otherwise
        Returns:
        the builder
      • binaryMergeNoSupportForSingleBit

        public PBConfig.Builder binaryMergeNoSupportForSingleBit​(boolean binaryMergeNoSupportForSingleBit)
        Sets the support for single bits in the binary merge encoding. The default value is false.
        Parameters:
        binaryMergeNoSupportForSingleBit - true if the support for single bits should be disabled, false otherwise
        Returns:
        the builder
      • binaryMergeUseWatchDog

        public PBConfig.Builder binaryMergeUseWatchDog​(boolean binaryMergeUseWatchDog)
        Sets whether the watchdog encoding should be used in the binary merge encoding. The default value is true.
        Parameters:
        binaryMergeUseWatchDog - true if the watchdog encoding should be used, false otherwise
        Returns:
        the builder
      • build

        public PBConfig build()
        Builds the pseudo-Boolean encoder configuration.
        Returns:
        the configuration