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

Method getDomains

gecode/flatzinc/flatzinc.cpp:1805–1824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1803 }
1804#endif
1805 std::string FlatZincSpace::getDomains(const Printer& p) const {
1806 std::ostringstream oss;
1807
1808 for (int i = 0; i < iv.size(); i++)
1809 printIntVar(oss, p.intVarName(i), iv[i]);
1810
1811 for (int i = 0; i < bv.size(); i++)
1812 printBoolVar(oss, p.boolVarName(i), bv[i]);
1813
1814#ifdef GECODE_HAS_FLOAT_VARS
1815 for (int i = 0; i < fv.size(); i++)
1816 printFloatVar(oss, p.floatVarName(i), fv[i]);
1817#endif
1818#ifdef GECODE_HAS_SET_VARS
1819 for (int i = 0; i < sv.size(); i++)
1820 oss << "var " << sv[i] << ": " << p.setVarName(i) << ";" << std::endl;
1821#endif
1822
1823 return oss.str();
1824 }
1825
1826#endif
1827

Callers 1

getInfoMethod · 0.80

Calls 5

printIntVarFunction · 0.85
printBoolVarFunction · 0.85
printFloatVarFunction · 0.85
sizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected