• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List

SortedPackedIntervalRTree.h

00001 /**********************************************************************
00002  * $Id: SortedPackedIntervalRTree.h 2540 2009-06-05 09:28:04Z 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 
00017 #ifndef GEOS_INDEX_INTERVALRTREE_SORTEDPACKEDINTERVALRTREE_H
00018 #define GEOS_INDEX_INTERVALRTREE_SORTEDPACKEDINTERVALRTREE_H
00019 
00020 #include <geos/index/intervalrtree/IntervalRTreeNode.h>
00021 
00022 // forward declarations
00023 namespace geos {
00024         namespace index {
00025                 class ItemVisitor;
00026         }
00027 }
00028 
00029 namespace geos {
00030 namespace index {
00031 namespace intervalrtree {
00032 
00050 class SortedPackedIntervalRTree 
00051 {
00052 private:
00053         IntervalRTreeNode::ConstVect * leaves;
00054         const IntervalRTreeNode * root;
00055         int level;
00056 
00057         void init();
00058         void buildLevel( IntervalRTreeNode::ConstVect * src, IntervalRTreeNode::ConstVect * dest);
00059         const IntervalRTreeNode * buildTree();
00060 
00061 protected:
00062 public:
00063         SortedPackedIntervalRTree();
00064         
00065         ~SortedPackedIntervalRTree();
00066 
00076         void insert( double min, double max, void * item);
00077  
00086         void query( double min, double max, index::ItemVisitor * visitor);
00087 
00088 };
00089 
00090 } // geos::intervalrtree
00091 } // geos::index
00092 } // geos
00093 
00094 #endif // GEOS_INDEX_INTERVALRTREE_SORTEDPACKEDINTERVALRTREE_H
00095 /**********************************************************************
00096  * $Log$
00097  **********************************************************************/
00098 

Generated on Thu Jul 22 2010 for GEOS by  doxygen 1.7.1