Bintree.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <vector>
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
#endif
// Forward declarations
namespace geos {
namespace index {
namespace bintree {
class Interval;
class Root;
}
}
}
namespace geos {
namespace index { // geos::index
namespace bintree { // geos::index::bintree
class GEOS_DLL Bintree {
public:
static Interval* ensureExtent(const Interval* itemInterval,
double minExtent);
Bintree();
~Bintree();
int depth();
int size();
int nodeSize();
void insert(Interval* itemInterval, void* item);
std::vector<void*>* iterator();
std::vector<void*>* query(double x);
std::vector<void*>* query(Interval* interval);
void query(Interval* interval,
std::vector<void*>* foundItems);
private:
std::vector<Interval*>newIntervals;
Root* root;
double minExtent;
void collectStats(Interval* interval);
Bintree(const Bintree&) = delete;
Bintree& operator=(const Bintree&) = delete;
};
} // namespace geos::index::bintree
} // namespace geos::index
} // namespace geos
#ifdef _MSC_VER
#pragma warning(pop)
#endif
geos::index::bintree::Bintree::ensureExtent
static Interval * ensureExtent(const Interval *itemInterval, double minExtent)
Ensure that the Interval for the inserted item has non-zero extents.
geos::index::bintree::Bintree::insert
void insert(Interval *itemInterval, void *item)
geos::index::bintree::Interval
Represents an (1-dimensional) closed interval on the Real number line.
Definition bintree/Interval.h:24
geos::index::bintree::Root
The root node of a single Bintree.
Definition bintree/Root.h:40
geos::index::bintree
Contains classes that implement a Binary Interval Tree index.
Definition Bintree.h:28
geos::index
Provides classes for various kinds of spatial indexes.
Definition CleanCoverage.h:39
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38