LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
|
Interval
represents a closed interval of the real numbers by its upper and lower bounds.
More...
#include <Interval.h>
Public Member Functions | |
Interval () | |
This constructor creates an empty interval. | |
Interval (Scalar x) | |
This constructor creates a closed interval containing only x. | |
Interval (Scalar x, Scalar y) | |
This constructor creates an interval from the given endpoints. | |
bool | operator== (Interval const &i) const |
Two closed intervals are equal if their endpoints are the same, or both are empty. | |
bool | operator!= (Interval const &i) const |
bool | operator== (Scalar x) const |
A closed interval is equal to a point x if both endpoints equal x. | |
bool | operator!= (Scalar x) const |
Scalar | getA () const |
getA returns the lower endpoint of this interval. | |
Scalar | getB () const |
getB returns the upper endpoint of this interval. | |
bool | isEmpty () const |
isEmpty returns true if this interval does not contain any points. | |
Scalar | getCenter () const |
getCenter returns the center of this interval. | |
Scalar | getSize () const |
getSize returns the size (length, width) of this interval. | |
Interval & | dilateBy (Scalar x) |
For positive x, dilateBy morphologically dilates this interval by [-x,x], which is equivalent to the taking the Minkowski sum with [-x,x]. | |
Interval & | erodeBy (Scalar x) |
Derived | dilatedBy (Scalar x) const |
Derived | erodedBy (Scalar x) const |
bool | contains (Scalar x) const |
bool | contains (Interval const &x) const |
bool | isDisjointFrom (Scalar x) const |
bool | isDisjointFrom (Interval const &x) const |
bool | intersects (Scalar x) const |
bool | intersects (Interval const &x) const |
bool | isWithin (Scalar x) const |
bool | isWithin (Interval const &x) const |
Relationship | relate (Scalar x) const |
Relationship | relate (Interval const &x) const |
Interval & | clipTo (Scalar x) |
Interval & | clipTo (Interval const &x) |
Derived | clippedTo (Scalar x) const |
Derived | clippedTo (Interval const &x) const |
Interval & | expandTo (Scalar x) |
Interval & | expandTo (Interval const &x) |
Derived | expandedTo (Scalar x) const |
Derived | expandedTo (Interval const &x) const |
Interval
represents a closed interval of the real numbers by its upper and lower bounds.
It is parameterized by the Scalar type, which must be constructible from a double.
An interval with identical upper and lower bounds contains a single point, and is equal to that scalar bound.
An interval with an upper bound less than its lower bound is empty (contains no points), as are intervals with NaN as either bound.
Definition at line 55 of file Interval.h.
|
inline |
This constructor creates an empty interval.
Definition at line 58 of file Interval.h.
|
inlineexplicit |
This constructor creates a closed interval containing only x.
Definition at line 61 of file Interval.h.
|
inline |
This constructor creates an interval from the given endpoints.
Definition at line 64 of file Interval.h.
|
inline |
clippedTo
returns the intersection of this interval and x.
Definition at line 192 of file Interval.h.
|
inline |
clippedTo
returns the intersection of this interval and x.
Definition at line 190 of file Interval.h.
|
inline |
clipTo
shrinks this interval until all its points are in x.
Definition at line 177 of file Interval.h.
|
inline |
|
inline |
|
inline |
|
inline |
For positive x, dilateBy
morphologically dilates this interval by [-x,x], which is equivalent to the taking the Minkowski sum with [-x,x].
For negative x, it morphologically erodes this interval by [x,-x]. If x is zero or NaN, or this interval is empty, there is no effect.
Definition at line 237 of file Interval.h.
|
inline |
Definition at line 246 of file Interval.h.
|
inline |
Definition at line 245 of file Interval.h.
|
inline |
Definition at line 247 of file Interval.h.
|
inline |
expandedTo
returns the smallest interval containing the union of this interval and x.
Definition at line 227 of file Interval.h.
|
inline |
expandedTo
returns the smallest interval containing the union of this interval and x.
Definition at line 225 of file Interval.h.
|
inline |
|
inline |
|
inline |
getA
returns the lower endpoint of this interval.
The return value for empty intervals is arbitrary.
Definition at line 83 of file Interval.h.
|
inline |
getB
returns the upper endpoint of this interval.
The return value for empty intervals is arbitrary.
Definition at line 87 of file Interval.h.
|
inline |
getCenter
returns the center of this interval.
It is arbitrary for empty intervals.
Definition at line 96 of file Interval.h.
|
inline |
getSize
returns the size (length, width) of this interval.
It is zero for single-point intervals, and NaN or negative for empty intervals.
Definition at line 100 of file Interval.h.
|
inline |
intersects
returns true if the intersection of this interval and x is non-empty.
Definition at line 139 of file Interval.h.
|
inline |
intersects
returns true if the intersection of this interval and x is non-empty.
Definition at line 137 of file Interval.h.
|
inline |
|
inline |
isDisjointFrom
returns true if the intersection of this interval and x is empty.
Definition at line 122 of file Interval.h.
|
inline |
isEmpty
returns true if this interval does not contain any points.
Definition at line 90 of file Interval.h.
|
inline |
isWithin
returns true if the intersection of this interval and x is this interval.
Definition at line 151 of file Interval.h.
|
inline |
isWithin
returns true if the intersection of this interval and x is this interval.
Definition at line 147 of file Interval.h.
|
inline |
Definition at line 72 of file Interval.h.
|
inline |
Definition at line 79 of file Interval.h.
|
inline |
Two closed intervals are equal if their endpoints are the same, or both are empty.
Definition at line 68 of file Interval.h.
|
inline |
Relationship lsst::sphgeom::Interval< Derived, Scalar >::relate | ( | Interval< Derived, Scalar > const & | x | ) | const |
relate
returns a bitset S describing the spatial relationships between this interval and x. For each relation that holds, the bitwise AND of S and the corresponding Relationship will be non-zero.
Definition at line 276 of file Interval.h.
Relationship lsst::sphgeom::Interval< Derived, Scalar >::relate | ( | Scalar | x | ) | const |
relate
returns a bitset S describing the spatial relationships between this interval and x. For each relation that holds, the bitwise AND of S and the corresponding Relationship will be non-zero.
Definition at line 256 of file Interval.h.