- java.lang.Object
-
- org.logicng.cardinalityconstraints.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 Summary
Constructors Constructor Description CCAMOPure()Constructs the naive AMO encoder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuild(EncodingResult result, Variable... vars)Builds a cardinality constraint of the formvar_1 + var_2 + ... + var_n <= 1.StringtoString()
-
-
-
Method Detail
-
build
public void build(EncodingResult result, Variable... vars)
Description copied from interface:CCAtMostOneBuilds a cardinality constraint of the formvar_1 + var_2 + ... + var_n <= 1.- Specified by:
buildin interfaceCCAtMostOne- Parameters:
result- the result for the encodingvars- the variablesvar_1 ... var_n
-
-