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

Function channel

gecode/set/channel.cpp:51–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 }
50
51 void
52 channel(Home home, const IntVarArgs& x, const SetVarArgs& y) {
53 GECODE_POST;
54 ViewArray<Int::CachedView<Int::IntView> > xa(home,x.size());
55 for (int i=x.size(); i--;)
56 new (&xa[i]) Int::CachedView<Int::IntView>(x[i]);
57 ViewArray<Set::CachedView<Set::SetView> > ya(home,y.size());
58 for (int i=y.size(); i--;)
59 new (&ya[i]) Set::CachedView<Set::SetView>(y[i]);
60 GECODE_ES_FAIL((Set::Channel::ChannelInt<Set::SetView>::post(home,xa,ya)));
61 }
62
63 void
64 channel(Home home, const BoolVarArgs& x, SetVar y) {

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 2

postFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected