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

Method record_assigned

gecode/flatzinc/lastval.hh:85–94  ·  view source on GitHub ↗

Record (and forget) the values of any assigned views in \a x in the right position in \a last_val.

Source from the content-addressed store, hash-verified

83 public:
84 /// Record (and forget) the values of any assigned views in \a x in the right position in \a last_val.
85 static void record_assigned(FlatZincSpace& home, IdxViewArray<View>& x) {
86 int n = x.size();
87 for (int i = n; i--; ) {
88 if (x[i].view.assigned()) {
89 SetLastVal::set_last_val(home, x[i].idx, x[i].view);
90 x[i] = x[--n];
91 }
92 }
93 x.size(n);
94 }
95
96 /// Copy propagator during cloning
97 virtual Actor* copy(Space& home){ return new (home) LastVal(home,*this); }

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
assignedMethod · 0.45

Tested by

no test coverage detected