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 <geos/export.h>
00020 #include <vector>
00021
00022 #ifdef _MSC_VER
00023 #pragma warning(push)
00024 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00025 #endif
00026
00027
00028 namespace geos {
00029 namespace index {
00030 namespace bintree {
00031 class Interval;
00032 class Root;
00033 }
00034 }
00035 }
00036
00037 namespace geos {
00038 namespace index {
00039 namespace bintree {
00040
00057 class GEOS_DLL Bintree {
00058
00059 public:
00060
00071 static Interval* ensureExtent(const Interval *itemInterval,
00072 double minExtent);
00073
00074 Bintree();
00075
00076 ~Bintree();
00077
00078 int depth();
00079
00080 int size();
00081
00082 int nodeSize();
00083
00090 void insert(Interval *itemInterval, void* item);
00091
00092 std::vector<void*>* iterator();
00093
00094 std::vector<void*>* query(double x);
00095
00096 std::vector<void*>* query(Interval *interval);
00097
00098 void query(Interval *interval,
00099 std::vector<void*> *foundItems);
00100
00101 private:
00102
00103 std::vector<Interval *>newIntervals;
00104
00105 Root *root;
00106
00117 double minExtent;
00118
00119 void collectStats(Interval *interval);
00120 };
00121
00122 }
00123 }
00124 }
00125
00126 #ifdef _MSC_VER
00127 #pragma warning(pop)
00128 #endif
00129
00130 #endif // GEOS_IDX_BINTREE_BINTREE_H
00131
00132
00133
00134
00135
00136
00137
00138