#include "ops.h"
#include "element.h"
-Edge getElementValueConstraint(SATEncoder* This, Element* elem, uint64_t value) {
+Edge getElementValueConstraint(SATEncoder* This, Element* elem, uint64_t value) {
switch(getElementEncoding(elem)->type){
case ONEHOT:
return getElementValueOneHotConstraint(This, elem, value);
#include "element.h"
#include "csolver.h"
#include "satencoder.h"
+#include "set.h"
uint64_t getElementValueBinaryIndexSATTranslator(CSolver* This, ElementEncoding* elemEnc){
uint index=0;
}
uint64_t getElementValueSATTranslator(CSolver* This, Element* element){
+ Set* set = getElementSet(element);
+ if(getSetSize( set ) ==1) //case when the set has only one item
+ return getSetElement(set, 0);
ElementEncoding* elemEnc = getElementEncoding(element);
switch(elemEnc->type){
case ONEHOT: