19 #ifndef GEOS_INDEX_STRTREE_BOUNDABLEPAIR_H
20 #define GEOS_INDEX_STRTREE_BOUNDABLEPAIR_H
22 #include <geos/index/strtree/Boundable.h>
23 #include <geos/index/strtree/ItemDistance.h>
45 const Boundable* boundable1;
46 const Boundable* boundable2;
47 ItemDistance* itemDistance;
51 struct BoundablePairQueueCompare {
52 bool operator()(
const BoundablePair* a,
const BoundablePair* b) {
53 return a->getDistance() > b->getDistance();
57 typedef std::priority_queue<BoundablePair*, std::vector<BoundablePair*>, BoundablePairQueueCompare> BoundablePairQueue;
58 BoundablePair(
const Boundable* boundable1,
const Boundable* boundable2, ItemDistance* itemDistance);
67 const Boundable* getBoundable(
int i)
const;
78 double distance()
const;
90 double getDistance()
const;
97 bool isLeaves()
const;
99 static bool isComposite(
const Boundable* item);
101 static double area(
const Boundable* b);
103 void expandToQueue(BoundablePairQueue &,
double minDistance);
104 void expand(
const Boundable* bndComposite,
const Boundable* bndOther, BoundablePairQueue & priQ,
double minDistance);