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

Method ViewArray

gecode/kernel/data/array.hpp:1120–1129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1118
1119 template<class View>
1120 ViewArray<View>::ViewArray(Space& home, const ViewArray<View>& a)
1121 : n(a.size()) {
1122 if (n>0) {
1123 x = home.alloc<View>(n);
1124 for (int i=0; i<n; i++)
1125 x[i] = a[i];
1126 } else {
1127 x = nullptr;
1128 }
1129 }
1130 template<class View>
1131 ViewArray<View>::ViewArray(Region& r, const ViewArray<View>& a)
1132 : n(a.size()) {

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected