LSSTApplications
19.0.0-10-g4a5fae6+3,19.0.0-10-g920eed2,19.0.0-11-g48a0200+2,19.0.0-18-gfc4e62b+16,19.0.0-2-g3b2f90d+2,19.0.0-2-gd671419+6,19.0.0-20-g5a5a17ab+14,19.0.0-21-g2644856+17,19.0.0-24-g0913cb1,19.0.0-24-g878c510+4,19.0.0-25-g6c8df7140+1,19.0.0-25-gb330496+4,19.0.0-3-g2b32d65+6,19.0.0-3-g8227491+15,19.0.0-3-g9c54d0d+15,19.0.0-3-gca68e65+11,19.0.0-3-gcfc5f51+6,19.0.0-3-ge110943+14,19.0.0-3-ge74d124,19.0.0-30-g9c3fd16+5,19.0.0-4-g06f5963+6,19.0.0-4-g10df615,19.0.0-4-g3d16501+17,19.0.0-4-g4a9c019+6,19.0.0-4-g5a8b323,19.0.0-4-g66397f0+1,19.0.0-4-g8557e14,19.0.0-4-g8964aba+16,19.0.0-4-ge404a01+15,19.0.0-5-g40f3a5a,19.0.0-5-g4db63b3,19.0.0-5-gb9eeb60,19.0.0-5-gfb03ce7+16,19.0.0-6-gbaebbfb+15,19.0.0-61-gec4c6e08+5,19.0.0-7-g039c0b5+15,19.0.0-7-gbea9075+4,19.0.0-7-gc567de5+16,19.0.0-72-g37abf38+2,19.0.0-9-g463f923+15,v20.0.0.rc1
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
22 #ifndef LSST_GEOM_INTERVAL_H
23 #define LSST_GEOM_INTERVAL_H
91 template <
typename Iter>
94 for (
auto i =
first; i != last; ++i) {
259 ndarray::View<boost::fusion::vector1<ndarray::index::Range> >
getSlice()
const;
262 bool isEmpty() const noexcept {
return _size == 0; }
374 template <typename T>
433 template <typename Iter>
436 for (
auto i =
first; i != last; ++i) {
576 Element getCenter() const noexcept;
A 1-d integer coordinate range.
bool isEmpty() const noexcept
Return true if the interval contains no points.
static IntervalI fromMinMax(Element min, Element max)
Construct an interval from its lower and upper bounds.
Element getBegin() const noexcept
bool isFinite() const noexcept
Return true if the interval's size is finite.
IntervalD & operator=(IntervalD &&) noexcept=default
Standard move assignment operator.
bool intersects(IntervalD const &other) const noexcept
Return the size of the interval.
ndarray::View< boost::fusion::vector1< ndarray::index::Range > > getSlice() const
Return slice to extract the interval's region from an ndarray::Array.
Element getMax() const noexcept
Return the size of the interval.
IntervalI expandedTo(Element other) const
Expand an interval to ensure that contains(other) is true (returning a new object).
bool isDisjointFrom(IntervalI const &other) const noexcept
Return true if there are no points in both this and other.
static IntervalI fromSpannedPoints(Iter first, Iter last)
Construct an interval that contains all of the given points.
IntervalI shiftedBy(Element offset) const
Shift the position of the interval by the given offset (returning a new object).)
IntervalD erodedBy(Element buffer) const
Decrease the size of the interval by the given amount in both directions (returning a new object).
EdgeHandlingEnum
Enum used to indicate how to handle conversions from floating-point to integer intervals.
static IntervalI fromCenterSize(double center, Element size)
Create an interval centered as closely as possible on a particular point.
IntervalD(IntervalD &&) noexcept=default
Standard move constructor.
std::size_t hash_value() const noexcept
Return a hash of this object.
IntervalI & operator=(IntervalI &&) noexcept=default
Standard move assignment operatior.
IntervalI & operator=(IntervalI const &) noexcept=default
Standard copy assignment operator.
IntervalI() noexcept
Construct an empty interval.
size_t operator()(argument_type const &x) const noexcept
Element getMin() const noexcept
@ EXPAND
Include all pixels that overlap the floating-point interval at all.
ItemVariant const * other
IntervalI erodedBy(Element buffer) const
Decrease the size of the interval by the given amount in both directions (returning a new object).
static IntervalI fromMinSize(Element min, Element size)
Construct an interval from its lower bound and size.
IntervalI clippedTo(IntervalI const &other) const noexcept
Shrink an interval to ensure that it is contained by other (returning a new)
bool operator==(IntervalI const &other) const noexcept
Compare two intervals for equality.
A base class for image defects.
static IntervalD fromSpannedPoints(std::vector< Element > const &elements)
Construct an interval that contains all of the given points.
A floating-point coordinate rectangle geometry.
IntervalI(IntervalI &&) noexcept=default
Standard move constructor.
bool intersects(IntervalI const &other) const noexcept
Return slice to extract the interval's region from an ndarray::Array.
Element getSize() const noexcept
Return slice to extract the interval's region from an ndarray::Array.
static IntervalI fromMaxSize(Element max, Element size)
Construct an interval from its upper bound and size.
static IntervalD fromSpannedPoints(ndarray::Array< Element const, 1 > const &elements)
static IntervalI fromSpannedPoints(ndarray::Array< Element const, 1 > const &elements)
@ SHRINK
Include only pixels that are wholly contained by the floating-point interval.
void swap(IntervalI &other) noexcept
IntervalI(IntervalI const &) noexcept=default
Standard copy constructor.
bool contains(Element point) const noexcept
Return true if the interval contains the point.
bool operator!=(IntervalI const &other) const noexcept
Compare two intervals for equality.
IntervalD(IntervalD const &) noexcept=default
Standard copy constructor.
IntervalI dilatedBy(Element buffer) const
Increase the size of the interval by the given amount in both directions (returning a new object).
IntervalI reflectedAbout(Element point) const
Reflect an interval about a point (returning a new object).
Element getEnd() const noexcept
IntervalD & operator=(IntervalD const &) noexcept=default
Standard copy assignment operator.
bool overlaps(IntervalI const &other) const noexcept
Return true if there are any points in both this and other.
std::string toString() const
Return slice to extract the interval's region from an ndarray::Array.
size_t operator()(argument_type const &x) const noexcept
Element getMax() const noexcept
static IntervalI fromSpannedPoints(std::vector< Element > const &elements)
Construct an interval that contains all of the given points.