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

Method SupportValues

gecode/int/support-values.hpp:44–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43 template<class View, class A>
44 inline
45 SupportValues<View,A>::SupportValues(A& a0, View x0)
46 : a(a0), x(x0), bs(a,x.size(),true) {
47 unsigned int n = 0;
48 for (ViewRanges<View> r(x); r(); ++r)
49 n++;
50 rp_fst = a.template alloc<RangePos>(n+1);
51 rp_lst = rp_fst + n;
52 unsigned int p = 0;
53 int i = 0;
54 for (ViewRanges<View> r(x); r(); ++r) {
55 rp_fst[i].min = r.min();
56 rp_fst[i].pos = p;
57 p += r.width(); i++;
58 }
59 rp_fst[i].pos=p;
60 reset();
61 }
62
63 template<class View, class A>
64 forceinline

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