Module logicng

Class CCAMOPure

  • All Implemented Interfaces:
    CCAtMostOne

    public final class CCAMOPure
    extends Object
    implements CCAtMostOne
    Encodes that at most one variable is assigned value true. Uses the 'naive' encoding with no introduction of new variables but quadratic size.
    Since:
    1.0
    Version:
    2.0.0
    • Constructor Detail

      • CCAMOPure

        public CCAMOPure()
        Constructs the naive AMO encoder.
    • Method Detail

      • build

        public void build​(EncodingResult result,
                          Variable... vars)
        Description copied from interface: CCAtMostOne
        Builds a cardinality constraint of the form var_1 + var_2 + ... + var_n <= 1.
        Specified by:
        build in interface CCAtMostOne
        Parameters:
        result - the result for the encoding
        vars - the variables var_1 ... var_n