ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Tree-M/PMT.cpp
(Generate patch)

Comparing Tree-M/PMT.cpp (file contents):
Revision 1.1 by root, Sun May 6 00:45:51 2001 UTC vs.
Revision 1.2 by root, Sun May 6 01:35:15 2001 UTC

145 Object o(k); 145 Object o(k);
146 Pred p(o); 146 Pred p(o);
147 SimpleQuery q(&p, r); 147 SimpleQuery q(&p, r);
148 GiSTlist<MTentry *> res = mt->RangeSearch(q); 148 GiSTlist<MTentry *> res = mt->RangeSearch(q);
149 149
150 while(!res.IsEmpty()) { 150 while(!res.IsEmpty())
151 {
151 MTentry *e = res.RemoveFront (); 152 MTentry *e = res.RemoveFront ();
152
153 add_result(e->Key()->distance, e->Ptr(), e->Key()->obj.data(), ndims); 153 add_result(e->Ptr(), e->Key()->obj.data(), ndims);
154
155 delete e; 154 delete e;
156 } 155 }
157} 156}
158 157
159void PMT::top(double *k, int n) const 158void PMT::top(double *k, int n) const
160{ 159{
161 abort (); 160 SETCUR;
161 Object o(k);
162 Pred p(o);
163 TopQuery q(&p, n);
164 MTentry **res = mt->TopSearch(q);
165
166 for (int i=0; i < n; i++)
167 {
168 MTentry *e = res[i];
169 add_result(e->Ptr(), e->Key()->obj.data(), ndims);
170 delete e;
171 }
162} 172}
173
174int PMT::maxlevel() const
175{
176 SETCUR;
177 return mt->MaxLevel();
178}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines