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

Function element

gecode/set/element.cpp:51–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 using namespace Gecode::Set;
50
51 void
52 element(Home home, SetOpType op, const SetVarArgs& x, SetVar y, SetVar z,
53 const IntSet& universe) {
54 GECODE_POST;
55
56 switch (op) {
57 case SOT_DUNION:
58 {
59 Set::Element::ElementDisjoint<SetView,SetView>::IdxViewArray
60 iv(home, x);
61 GECODE_ES_FAIL((Element::ElementDisjoint<SetView,SetView>::
62 post(home,iv,y)));
63 }
64 // fall through
65 case SOT_UNION:
66 {
67 Set::Element::ElementUnion<SetView,SetView,SetView>::IdxViewArray
68 iv(home, x);
69 GECODE_ES_FAIL(
70 (Element::ElementUnion<SetView,SetView,SetView>::
71 post(home,iv,y,z)));
72 }
73 break;
74 case SOT_INTER:
75 {
76 Set::Element::ElementIntersection<SetView,SetView,SetView>::IdxViewArray
77 iv(home, x);
78 GECODE_ES_FAIL(
79 (Element::ElementIntersection<SetView,SetView,SetView>::
80 post(home,iv,y,z,universe)));
81 }
82 break;
83 case SOT_MINUS:
84 throw IllegalOperation("Set::element");
85 break;
86 default:
87 throw UnknownOperation("Set::element");
88 }
89 }
90
91 void
92 element(Home home, SetOpType op, const IntVarArgs& x, SetVar y, SetVar z,

Callers 15

iteFunction · 0.70
postMethod · 0.50
postMethod · 0.50
postMethod · 0.50
postMethod · 0.50
postMethod · 0.50
postMethod · 0.50
postMethod · 0.50
postMethod · 0.50
postMethod · 0.50
postMethod · 0.50
postMethod · 0.50

Calls 6

ConstSetViewClass · 0.85
IntSetClass · 0.85
pairFunction · 0.70
postFunction · 0.50
checkFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected