GEOS 3.3.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

Bintree.h
1 /**********************************************************************
2 * $Id: Bintree.h 3255 2011-03-01 17:56:10Z mloskot $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2006 Refractions Research Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************/
15
16 #ifndef GEOS_IDX_BINTREE_BINTREE_H
17 #define GEOS_IDX_BINTREE_BINTREE_H
18
19 #include <geos/export.h>
20 #include <vector>
21
22 #ifdef _MSC_VER
23 #pragma warning(push)
24 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
25 #endif
26
27 // Forward declarations
28 namespace geos {
29 namespace index {
30 namespace bintree {
31 class Interval;
32 class Root;
33 }
34 }
35 }
36
37 namespace geos {
38 namespace index { // geos::index
39 namespace bintree { // geos::index::bintree
40
57 class GEOS_DLL Bintree {
58
59 public:
60
71 static Interval* ensureExtent(const Interval *itemInterval,
72 double minExtent);
73
74 Bintree();
75
76 ~Bintree();
77
78 int depth();
79
80 int size();
81
82 int nodeSize();
83
90 void insert(Interval *itemInterval, void* item);
91
92 std::vector<void*>* iterator();
93
94 std::vector<void*>* query(double x);
95
96 std::vector<void*>* query(Interval *interval);
97
98 void query(Interval *interval,
99 std::vector<void*> *foundItems);
100
101 private:
102
103 std::vector<Interval *>newIntervals;
104
105 Root *root;
106
117 double minExtent;
118
119 void collectStats(Interval *interval);
120 };
121
122 } // namespace geos::index::bintree
123 } // namespace geos::index
124 } // namespace geos
125
126 #ifdef _MSC_VER
127 #pragma warning(pop)
128 #endif
129
130 #endif // GEOS_IDX_BINTREE_BINTREE_H
131
132 /**********************************************************************
133 * $Log$
134 * Revision 1.1 2006/03/22 16:01:33 strk
135 * indexBintree.h header split, classes renamed to match JTS
136 *
137 **********************************************************************/
138