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

Method post

gecode/int/exec/when.hpp:49–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 }
48
49 forceinline ExecStatus
50 When::post(Home home, BoolView x,
51 std::function<void(Space& home)> t,
52 std::function<void(Space& home)> e) {
53 if (!t)
54 throw InvalidFunction("When::When");
55 if (!e)
56 throw InvalidFunction("When::When");
57 if (x.zero()) {
58 e(home);
59 return home.failed() ? ES_FAILED : ES_OK;
60 } else if (x.one()) {
61 t(home);
62 return home.failed() ? ES_FAILED : ES_OK;
63 } else {
64 (void) new (home) When(home,x,t,e);
65 return ES_OK;
66 }
67 }
68
69}}}
70

Callers

nothing calls this directly

Calls 5

tFunction · 0.85
eFunction · 0.50
zeroMethod · 0.45
failedMethod · 0.45
oneMethod · 0.45

Tested by

no test coverage detected