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

Method adjust

gecode/int/extensional/compact.hpp:46–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 */
45 template<class View, bool pos>
46 forceinline void
47 Compact<View,pos>::CTAdvisor::adjust(void) {
48 if (pos) {
49 {
50 int n = view().min();
51 assert((_fst->min <= n) && (n <= _lst->max));
52 while (n > _fst->max)
53 _fst++;
54 assert((_fst->min <= n) && (n <= _lst->max));
55 }
56 {
57 int n = view().max();
58 assert((_fst->min <= n) && (n <= _lst->max));
59 while (n < _lst->min)
60 _lst--;
61 assert((_fst->min <= n) && (n <= _lst->max));
62 }
63 } else {
64 {
65 int n = view().min();
66 while ((_fst <= _lst) && (n > _fst->max))
67 _fst++;
68 }
69 {
70 int n = view().max();
71 while ((_fst <= _lst) && (n < _lst->min))
72 _lst--;
73 }
74 }
75 }
76
77 template<class View, bool pos>
78 forceinline

Callers 2

propagateMethod · 0.45
adviseMethod · 0.45

Calls 2

minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected