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

Method Create

test/int/mm-lin.cpp:2144–2172  ·  view source on GitHub ↗

Perform creation and registration

Source from the content-addressed store, hash-verified

2142 public:
2143 /// Perform creation and registration
2144 Create(void) {
2145 int n = sizeof(li)/sizeof(LinInstr*);
2146 for (int i=0; i<n; i++) {
2147 std::string s = Test::str(i);
2148 if (i < 10) {
2149 s = "00" + s;
2150 } else if (i < 100) {
2151 s = "0" + s;
2152 }
2153 (void) new LinExprInt(li[i],s);
2154 (void) new LinExprBool(li[i],s);
2155 (void) new LinExprMixed(li[i],s);
2156 }
2157 IntRelTypes irts;
2158 for (int i=0; i<n/2; i++) {
2159 std::string s = Test::str(i);
2160 if (i < 10) {
2161 s = "00" + s;
2162 } else if (i < 100) {
2163 s = "0" + s;
2164 }
2165 (void) new LinRelInt(li[2*i],li[2*i+1],irts.irt(),s);
2166 (void) new LinRelBool(li[2*i],li[2*i+1],irts.irt(),s);
2167 (void) new LinRelMixed(li[2*i],li[2*i+1],irts.irt(),s);
2168 ++irts;
2169 if (!irts())
2170 irts.reset();
2171 }
2172 }
2173 };
2174
2175 Create c;

Callers

nothing calls this directly

Calls 2

irtMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected