Module logicng

Class Ladder


  • public class Ladder
    extends Encoding
    Encodes that exactly one literal from 'lits' is assigned value true. Uses the Ladder/Regular encoding for translating the AMO constraint into CNF.
    Since:
    1.0
    Version:
    2.0.0
    • Constructor Detail

      • Ladder

        public Ladder()
    • Method Detail

      • encode

        public void encode​(MiniSatStyleSolver s,
                           LNGIntVector lits)
        Encodes and adds the AMO constraint to the given solver.
        Parameters:
        s - the solver
        lits - the literals for the constraint