Comparing Objectivity and Versant: Predicates
sigma3 = 3.0*star_iterator1->_sigma();
xlow = star_iterator1->_x() - sigma3;
xhigh = xlow + 2.*sigma3;
ylow = star_iterator1->_y() - sigma3;
yhigh = ylow + 2.*sigma3;
(void) sprintf(pred,"xcentre>%f && xcentre<%f && ycentre>%f && ycentre<%f",xlow,xhigh,ylow,yhigh);
if(star_iterator2.scan(cHandle2,oocRead,oocAll,pred)) {
while (star_iterator2.next()) {
x = star_iterator2->_x();
y = star_iterator2->_y();
d = star_iterator1->(x,y);
nearest = star_iterator2->_catalogue();
sigma3 = 3.0*a[i]->_sigma();
xlow = a[i]->_x() - sigma3;
xhigh = xlow + 2.*sigma3;
ylow = a[i]->_y() - sigma3;
yhigh = ylow + 2.*sigma3;
pred = PAttribute("Star::xcentre") > xlow &&
PAttribute("Star::xcentre") < xhigh &&
PAttribute("Star::ycentre") > ylow &&
PAttribute("Star::ycentre") < yhigh;
PClassObject<>::Object().select("starsdb2",FALSE,pred);
nearest = b[j]->_catalogue();
The Versant predicate is not the same as an Obvjectivity predicate