GEOS  3.3.3
bintree/Interval.h
1 /**********************************************************************
2  * $Id: Interval.h 2556 2009-06-06 22:22:28Z strk $
3  *
4  * GEOS - Geometry Engine Open Source
5  * http://geos.refractions.net
6  *
7  * Copyright (C) 2006 Refractions Research Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  **********************************************************************/
15 
16 #ifndef GEOS_IDX_BINTREE_INTERVAL_H
17 #define GEOS_IDX_BINTREE_INTERVAL_H
18 
19 #include <geos/export.h>
20 
21 namespace geos {
22 namespace index { // geos::index
23 namespace bintree { // geos::index::bintree
24 
26 class GEOS_DLL Interval {
27 
28 public:
29 
30  double min, max;
31 
32  Interval();
33 
34  ~Interval();
35 
36  Interval(double nmin, double nmax);
37 
39  Interval(const Interval *interval);
40 
41  void init(double nmin, double nmax);
42 
43  double getMin() const;
44 
45  double getMax() const;
46 
47  double getWidth() const;
48 
49  void expandToInclude(Interval *interval);
50 
51  bool overlaps(const Interval *interval) const;
52 
53  bool overlaps(double nmin, double nmax) const;
54 
55  bool contains(const Interval *interval) const;
56 
57  bool contains(double nmin, double nmax) const;
58 
59  bool contains(double p) const;
60 };
61 
62 } // namespace geos::index::bintree
63 } // namespace geos::index
64 } // namespace geos
65 
66 #endif // GEOS_IDX_BINTREE_INTERVAL_H
67 
68 /**********************************************************************
69  * $Log$
70  * Revision 1.1 2006/03/22 16:01:33 strk
71  * indexBintree.h header split, classes renamed to match JTS
72  *
73  **********************************************************************/
74