GEOS
3.4.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2006 Refractions Research Inc. 00007 * 00008 * This is free software; you can redistribute and/or modify it under 00009 * the terms of the GNU Lesser General Public Licence as published 00010 * by the Free Software Foundation. 00011 * See the COPYING file for more information. 00012 * 00013 **********************************************************************/ 00014 00015 #ifndef GEOS_IDX_BINTREE_INTERVAL_H 00016 #define GEOS_IDX_BINTREE_INTERVAL_H 00017 00018 #include <geos/export.h> 00019 00020 namespace geos { 00021 namespace index { // geos::index 00022 namespace bintree { // geos::index::bintree 00023 00025 class GEOS_DLL Interval { 00026 00027 public: 00028 00029 double min, max; 00030 00031 Interval(); 00032 00033 ~Interval(); 00034 00035 Interval(double nmin, double nmax); 00036 00038 Interval(const Interval *interval); 00039 00040 void init(double nmin, double nmax); 00041 00042 double getMin() const; 00043 00044 double getMax() const; 00045 00046 double getWidth() const; 00047 00048 void expandToInclude(Interval *interval); 00049 00050 bool overlaps(const Interval *interval) const; 00051 00052 bool overlaps(double nmin, double nmax) const; 00053 00054 bool contains(const Interval *interval) const; 00055 00056 bool contains(double nmin, double nmax) const; 00057 00058 bool contains(double p) const; 00059 }; 00060 00061 } // namespace geos::index::bintree 00062 } // namespace geos::index 00063 } // namespace geos 00064 00065 #endif // GEOS_IDX_BINTREE_INTERVAL_H 00066