Module logicng

Class CCAMOBinary

  • All Implemented Interfaces:
    CCAtMostOne

    public final class CCAMOBinary
    extends Object
    implements CCAtMostOne
    Encodes that at most one variable is assigned value true. Uses the binary encoding due to Doggett, Frisch, Peugniez, and Nightingale.
    Since:
    1.1
    Version:
    2.0.0
    • 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