Permalink
Browse files

missing line error fixed

  • Loading branch information...
1 parent 6d141a8 commit d5a61ea2293f39a4dabb590580aaf2ad1f72e4f0 @nutanong nutanong committed Jun 6, 2011
Showing with 13 additions and 11 deletions.
  1. +5 −4 src/rtree/RTree.cc
  2. +8 −7 src/spatialindex/Region.cc
View
@@ -619,13 +619,13 @@ double SpatialIndex::RTree::RTree::hausdorff(ISpatialIndex& query, uint64_t& id1
} else if (mode==2) {
double max = std::numeric_limits<double>::min();
- Region r = Region(2);
+ //Region r = Region(2);
int counter = 0;
for (int i=this->m_vec_pMBR.size()-1; i>=0; i--) {
- this->m_vec_pMBR[i]->getMBR(r);
- //max = this->m_vec_pMBR[i]->getHausDistLB(queryRTreePtr->m_vec_pMBR,max,counter);
- max = std::max(max,r.getHausDistLB(queryRTreePtr->m_vec_pMBR,max,counter));
+ //this->m_vec_pMBR[i]->getMBR(r);
+ max = this->m_vec_pMBR[i]->getHausDistLB(queryRTreePtr->m_vec_pMBR,max,counter);
+ //max = std::max(max,r.getHausDistLB(queryRTreePtr->m_vec_pMBR,max,counter));
}
@@ -1001,6 +1001,7 @@ void SpatialIndex::RTree::RTree::selectMBRs(const int num) {
IShape *pShape;
e->m_pEntry->getShape(&pShape);
Region *pMBR = new Region(2);
+ pShape->getMBR(*pMBR);
m_vec_pMBR.push_back(pMBR);
m_vec_pointCount.push_back(n->updatePointCount());
delete pShape;
View
@@ -56,11 +56,11 @@ Region::Region(const Point& low, const Point& high)
Region::Region(const Region& r)
{
initialize(r.m_pLow, r.m_pHigh, r.m_dimension);
- for (int i=0; i < 4; i++) {
- Region *pR = new Region(2);
- this->getEdge(i,*pR);
- this->m_vec_pEdge.push_back(pR);
- }
+ //for (int i=0; i < 4; i++) {
+ //Region *pR = new Region(2);
+ //this->getEdge(i,*pR);
+ //this->m_vec_pEdge.push_back(pR);
+ //}
}
void Region::initialize(const double* pLow, const double* pHigh, uint32_t dimension)
@@ -263,6 +263,7 @@ void Region::getMBR(Region& out) const
{
out = *this;
+
out.m_vec_pEdge.clear();
for (int i=0; i < 4; i++) {
Region *pR = new Region(2);
@@ -636,11 +637,11 @@ double Region::getHausDistLB(const std::vector<const Region*> vec_pMBR, double m
//}
max = max*max;
- Region edge1 = Region(2);
+ //Region edge1 = Region(2);
for (int i=0; i<4; i++) {
- this->getEdge(i,edge1);
+ //this->getEdge(i,edge1);
double min = std::numeric_limits<double>::max();
for (int j=0; j< vec_pMBR.size(); j++) {

0 comments on commit d5a61ea

Please sign in to comment.