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

Method commit

gecode/int/branch/view-values.hpp:142–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140
141 template<int n, bool min, class Filter, class Print>
142 ExecStatus
143 ViewValuesBrancher<n,min,Filter,Print>::commit(Space& home, const Choice& c,
144 unsigned int a) {
145 const PosValuesChoice& pvc
146 = static_cast<const PosValuesChoice&>(c);
147 IntView x(ViewBrancher<IntView,Filter,n>::view(pvc.pos()));
148 unsigned int b = min ? a : (pvc.alternatives() - 1 - a);
149 return me_failed(x.eq(home,pvc.val(b))) ? ES_FAILED : ES_OK;
150 }
151
152 template<int n, bool min, class Filter, class Print>
153 NGL*

Callers

nothing calls this directly

Calls 5

me_failedFunction · 0.85
alternativesMethod · 0.80
posMethod · 0.45
eqMethod · 0.45
valMethod · 0.45

Tested by

no test coverage detected