本文整理汇总了C++中ViewArray::update方法的典型用法代码示例。如果您正苦于以下问题:C++ ViewArray::update方法的具体用法?C++ ViewArray::update怎么用?C++ ViewArray::update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewArray
的用法示例。
在下文中一共展示了ViewArray::update方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NoOverlap
// Copy constructor during cloning
NoOverlap(Space& home, bool share, NoOverlap& p)
: Propagator(home,share,p) {
x.update(home,share,p.x);
y.update(home,share,p.y);
// Also copy width and height arrays
w = home.alloc<int>(x.size());
h = home.alloc<int>(y.size());
for (int i=x.size(); i--; ) {
w[i]=p.w[i]; h[i]=p.h[i];
}
}
示例2: NonLinearity
// copy constructor used during cloning
NonLinearity(Space& home, bool share, NonLinearity& p) :
Propagator(home,share,p), n(p.n), m(p.m), threshold(p.threshold), size(p.size),
pow2n(p.pow2n), pow2m(p.pow2m) {
// update the view
x.update(home, share, p.x);
// copy the scores
scores = home.alloc<int>(size);
std::copy(p.scores, p.scores+size, scores);
/*
for(int i=0; i<size; i++) {
scores[i] = p.scores[i];
}
*/
// copy the completed assignments
assigned = home.alloc<bool>(pow2n);
std::copy(p.assigned,p.assigned+pow2n,assigned);
/*
for(int i=0; i<pow2n; i++) {
assigned[i] = p.assigned[i];
}
*/
}
示例3: Warnsdorff
/// Copy constructor
Warnsdorff(Space& home, bool share, Warnsdorff& b)
: Brancher(home, share, b), start(b.start) {
x.update(home, share, b.x);
}