- java.lang.Object
-
- org.logicng.solvers.datastructures.MSSoftClause
-
public final class MSSoftClause extends Object
A soft clause for the MaxSAT solver.- Since:
- 1.0
- Version:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description MSSoftClause(LNGIntVector clause, int weight, int assumptionVar, LNGIntVector relaxationVars)Constructs a new soft clause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intassumptionVar()Returns the assumption variable.LNGIntVectorclause()Returns the clause of this soft clause.LNGIntVectorrelaxationVars()Returns the relaxation variables of this soft clause.voidsetAssumptionVar(int assumptionVar)Sets the assumption variable.voidsetWeight(int weight)Sets the weightStringtoString()intweight()Returns the weight of this soft clause.
-
-
-
Constructor Detail
-
MSSoftClause
public MSSoftClause(LNGIntVector clause, int weight, int assumptionVar, LNGIntVector relaxationVars)
Constructs a new soft clause.- Parameters:
clause- the clauseweight- the weight of this clauseassumptionVar- the assumption variables of this clauserelaxationVars- 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
-
-