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

Method post

test/int/exec.cpp:156–167  ·  view source on GitHub ↗

Post when on \a x

Source from the content-addressed store, hash-verified

154 }
155 /// Post when on \a x
156 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
157 using namespace Gecode;
158 if (sf) {
159 auto sft = static_cast<std::function<void(Space&)>>
160 ([](Space& home) { t(home); });
161 auto sfe = static_cast<std::function<void(Space&)>>
162 ([](Space& home) { e(home); });
163 when(home, channel(home, x[0]), sft, sfe);
164 } else {
165 when(home, channel(home, x[0]), &t, &e);
166 }
167 }
168 /// Then-function to be executed
169 static void t(Gecode::Space& home) {
170 home.fail();

Callers

nothing calls this directly

Calls 4

tFunction · 0.85
whenFunction · 0.85
eFunction · 0.50
channelFunction · 0.50

Tested by

no test coverage detected