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

Method copy

gecode/int/linear/bool-scale.hpp:223–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221
222 template<class SBAP, class SBAN, class VX>
223 Actor*
224 EqBoolScale<SBAP,SBAN,VX>::copy(Space& home) {
225 if (p.empty()) {
226 EmptyScaleBoolArray ep;
227 if (x.assigned()) {
228 ZeroIntView z;
229 return new (home) EqBoolScale<EmptyScaleBoolArray,SBAN,ZeroIntView>
230 (home,*this,ep,n,z,c+x.val());
231 } else {
232 return new (home) EqBoolScale<EmptyScaleBoolArray,SBAN,VX>
233 (home,*this,ep,n,x,c);
234 }
235 } else if (n.empty()) {
236 EmptyScaleBoolArray en;
237 if (x.assigned()) {
238 ZeroIntView z;
239 return new (home) EqBoolScale<SBAP,EmptyScaleBoolArray,ZeroIntView>
240 (home,*this,p,en,z,c+x.val());
241 } else {
242 return new (home) EqBoolScale<SBAP,EmptyScaleBoolArray,VX>
243 (home,*this,p,en,x,c);
244 }
245 } else {
246 return new (home) EqBoolScale<SBAP,SBAN,VX>(home,*this,p,n,x,c);
247 }
248 }
249
250 template<class SBAP, class SBAN, class VX>
251 ExecStatus

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
assignedMethod · 0.45
valMethod · 0.45

Tested by

no test coverage detected