Module logicng

Class MSSoftClause


  • public final class MSSoftClause
    extends Object
    A soft clause for the MaxSAT solver.
    Since:
    1.0
    Version:
    1.0
    • Constructor Detail

      • MSSoftClause

        public MSSoftClause​(LNGIntVector clause,
                            int weight,
                            int assumptionVar,
                            LNGIntVector relaxationVars)
        Constructs a new soft clause.
        Parameters:
        clause - the clause
        weight - the weight of this clause
        assumptionVar - the assumption variables of this clause
        relaxationVars - the relaxation variables
    • Method Detail

      • clause

        public LNGIntVector clause()
        Returns the clause of this soft clause.
        Returns:
        the clause
      • weight

        public int weight()
        Returns the weight of this soft clause.
        Returns:
        the weight
      • setWeight

        public void setWeight​(int weight)
        Sets the weight
        Parameters:
        weight - the weight
      • relaxationVars

        public LNGIntVector relaxationVars()
        Returns the relaxation variables of this soft clause.
        Returns:
        the relaxation variables
      • assumptionVar

        public int assumptionVar()
        Returns the assumption variable.
        Returns:
        the assumption variable
      • setAssumptionVar

        public void setAssumptionVar​(int assumptionVar)
        Sets the assumption variable.
        Parameters:
        assumptionVar - the assumption variable