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

# Bintree.h

    00001 /**********************************************************************
    00002  * $Id: Bintree.h 1820 2006-09-06 16:54:23Z mloskot $
    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 <vector>
    00020
    00021 // Forward declarations
    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 { // geos::index
    00033 namespace bintree { // geos::index::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 } // namespace geos::index::bintree
    00100 } // namespace geos::index
    00101 } // namespace geos
    00102
    00103 #endif // GEOS_IDX_BINTREE_BINTREE_H
    00104
    00105 /**********************************************************************
    00106  * $Log$
    00107  * Revision 1.1  2006/03/22 16:01:33  strk
    00108  * indexBintree.h header split, classes renamed to match JTS
    00109  *
    00110  **********************************************************************/
    00111