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

Function atmostOne

gecode/set/distinct.cpp:40–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38namespace Gecode {
39
40 void
41 atmostOne(Home home, const SetVarArgs& xa, unsigned int c) {
42 Set::Limits::check(c, "Set::atmostOne");
43 GECODE_POST;
44 if (xa.size() < 2)
45 return;
46 ViewArray<SetView> x(home,xa);
47 GECODE_ES_FAIL(Distinct::AtmostOne::post(home, x, c));
48 }
49
50}
51

Callers 1

postMethod · 0.85

Calls 3

checkFunction · 0.50
postFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected