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

Method IntSet

gecode/int/int-set.cpp:150–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148 }
149
150 IntSet::IntSet(std::initializer_list<int> r) {
151 int n = static_cast<int>(r.size());
152 assert(n > 0);
153 Region reg;
154 Range* dr = reg.alloc<Range>(n);
155 int j=0;
156 for (int k : r) {
157 dr[j].min=dr[j].max=k; j++;
158 }
159 normalize(&dr[0],j);
160 }
161
162 IntSet::IntSet(std::initializer_list<std::pair<int,int>> r) {
163 int n = static_cast<int>(r.size());

Callers

nothing calls this directly

Calls 2

normalizeFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected