GEOS 3.4.2

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

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