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

- File List

# Bintree.h

    00001 /**********************************************************************
    00002  * $Id: Bintree.h 2556 2009-06-06 22:22:28Z strk $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2006 Refractions Research Inc.
    00008  *
    00009  * This is free software; you can redistribute and/or modify it under
    00010  * the terms of the GNU Lesser General Public Licence as published
    00011  * by the Free Software Foundation.
    00012  * See the COPYING file for more information.
    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 // Forward declarations
    00023 namespace geos {
    00024         namespace index {
    00025                 namespace bintree {
    00026                         class Interval;
    00027                         class Root;
    00028                 }
    00029         }
    00030 }
    00031
    00032 namespace geos {
    00033 namespace index { // geos::index
    00034 namespace bintree { // geos::index::bintree
    00035
    00052 class GEOS_DLL Bintree {
    00053
    00054 public:
    00055
    00066         static Interval* ensureExtent(const Interval *itemInterval,
    00067                                                          double minExtent);
    00068
    00069         Bintree();
    00070
    00071         ~Bintree();
    00072
    00073         int depth();
    00074
    00075         int size();
    00076
    00077         int nodeSize();
    00078
    00085         void insert(Interval *itemInterval, void* item);
    00086
    00087         std::vector<void*>* iterator();
    00088
    00089         std::vector<void*>* query(double x);
    00090
    00091         std::vector<void*>* query(Interval *interval);
    00092
    00093         void query(Interval *interval,
    00094                         std::vector<void*> *foundItems);
    00095
    00096 private:
    00097
    00098         std::vector<Interval *>newIntervals;
    00099
    00100         Root *root;
    00101
    00112         double minExtent;
    00113
    00114         void collectStats(Interval *interval);
    00115 };
    00116
    00117 } // namespace geos::index::bintree
    00118 } // namespace geos::index
    00119 } // namespace geos
    00120
    00121 #endif // GEOS_IDX_BINTREE_BINTREE_H
    00122
    00123 /**********************************************************************
    00124  * $Log$
    00125  * Revision 1.1  2006/03/22 16:01:33  strk
    00126  * indexBintree.h header split, classes renamed to match JTS
    00127  *
    00128  **********************************************************************/
    00129