MCPcopy Create free account
hub / github.com/Gecode/gecode / newIntVar

Method newIntVar

gecode/flatzinc/flatzinc.cpp:890–906  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

888 }
889
890 void
891 FlatZincSpace::newIntVar(IntVarSpec* vs) {
892 if (vs->alias) {
893 iv[intVarCount++] = iv[vs->i];
894 } else {
895 IntSet dom(vs2is(vs));
896 if (dom.size()==0) {
897 fail();
898 return;
899 } else {
900 iv[intVarCount++] = IntVar(*this, dom);
901 }
902 }
903 iv_introduced[2*(intVarCount-1)] = vs->introduced;
904 iv_introduced[2*(intVarCount-1)+1] = vs->funcDep;
905 iv_boolalias[intVarCount-1] = -1;
906 }
907
908 void
909 FlatZincSpace::aliasBool2Int(int iv, int bv) {

Callers 1

initfgFunction · 0.80

Calls 3

vs2isFunction · 0.85
IntVarClass · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected