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

Function viewarray

gecode/int/bool.cpp:576–585  ·  view source on GitHub ↗

Return view array

Source from the content-addressed store, hash-verified

574
575 /// Return view array
576 ViewArray<Int::ConstIntView>
577 viewarray(Space& home, const IntArgs& x) {
578 ViewArray<Int::ConstIntView> xv(home, x.size());
579 for (int i=0; i<x.size(); i++) {
580 if ((x[i] != 0) && (x[i] != 1))
581 throw Int::NotZeroOne("Int::rel");
582 xv[i] = Int::ConstIntView(x[i]);
583 }
584 return xv;
585 }
586
587 }
588

Callers 1

relFunction · 0.70

Calls 2

ConstIntViewClass · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected