00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_IDX_BINTREE_BINTREE_H
00017 #define GEOS_IDX_BINTREE_BINTREE_H
00018
00019 #include <vector>
00020
00021
00022 namespace geos {
00023 namespace index {
00024 namespace bintree {
00025 class Interval;
00026 class Root;
00027 }
00028 }
00029 }
00030
00031 namespace geos {
00032 namespace index {
00033 namespace bintree {
00034
00051 class Bintree {
00052
00053 public:
00054
00055 static Interval* ensureExtent(Interval *itemInterval, double minExtent);
00056
00057 Bintree();
00058
00059 ~Bintree();
00060
00061 int depth();
00062
00063 int size();
00064
00065 int nodeSize();
00066
00067 void insert(Interval *itemInterval,void* item);
00068
00069 std::vector<void*>* iterator();
00070
00071 std::vector<void*>* query(double x);
00072
00073 std::vector<void*>* query(Interval *interval);
00074
00075 void query(Interval *interval,
00076 std::vector<void*> *foundItems);
00077
00078 private:
00079
00080 std::vector<Interval *>newIntervals;
00081
00082 Root *root;
00083
00094 double minExtent;
00095
00096 void collectStats(Interval *interval);
00097 };
00098
00099 }
00100 }
00101 }
00102
00103 #endif // GEOS_IDX_BINTREE_BINTREE_H
00104
00105
00106
00107
00108
00109
00110
00111