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

Method PosValuesChoice

gecode/int/branch/view-values.cpp:38–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36namespace Gecode { namespace Int { namespace Branch {
37
38 PosValuesChoice::PosValuesChoice(const Brancher& b, const Pos& p, IntView x)
39 : PosChoice(b,x.size(),p), n(0) {
40 for (ViewRanges<IntView> r(x); r(); ++r)
41 n++;
42 pm = heap.alloc<PosMin>(n+1);
43 unsigned int w=0;
44 int i=0;
45 for (ViewRanges<IntView> r(x); r(); ++r) {
46 pm[i].min = r.min();
47 pm[i].pos = w;
48 w += r.width(); i++;
49 }
50 pm[i].pos = w;
51 }
52
53 PosValuesChoice::PosValuesChoice(const Brancher& b, unsigned int a, Pos p,
54 Archive& e)

Callers

nothing calls this directly

Calls 4

rFunction · 0.85
sizeMethod · 0.45
minMethod · 0.45
widthMethod · 0.45

Tested by

no test coverage detected