GEOS 3.3.1
|
00001 /********************************************************************** 00002 * $Id: Interval.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_INTERVAL_H 00017 #define GEOS_IDX_BINTREE_INTERVAL_H 00018 00019 #include <geos/export.h> 00020 00021 namespace geos { 00022 namespace index { // geos::index 00023 namespace bintree { // geos::index::bintree 00024 00026 class GEOS_DLL Interval { 00027 00028 public: 00029 00030 double min, max; 00031 00032 Interval(); 00033 00034 ~Interval(); 00035 00036 Interval(double nmin, double nmax); 00037 00039 Interval(const Interval *interval); 00040 00041 void init(double nmin, double nmax); 00042 00043 double getMin() const; 00044 00045 double getMax() const; 00046 00047 double getWidth() const; 00048 00049 void expandToInclude(Interval *interval); 00050 00051 bool overlaps(const Interval *interval) const; 00052 00053 bool overlaps(double nmin, double nmax) const; 00054 00055 bool contains(const Interval *interval) const; 00056 00057 bool contains(double nmin, double nmax) const; 00058 00059 bool contains(double p) const; 00060 }; 00061 00062 } // namespace geos::index::bintree 00063 } // namespace geos::index 00064 } // namespace geos 00065 00066 #endif // GEOS_IDX_BINTREE_INTERVAL_H 00067 00068 /********************************************************************** 00069 * $Log$ 00070 * Revision 1.1 2006/03/22 16:01:33 strk 00071 * indexBintree.h header split, classes renamed to match JTS 00072 * 00073 **********************************************************************/ 00074