LSST Applications g0265f82a02+0e5473021a,g02d81e74bb+bd2ed33bd6,g1470d8bcf6+de7501a2e0,g14a832a312+ff425fae3c,g2079a07aa2+86d27d4dc4,g2305ad1205+91a32aca49,g295015adf3+762506a1ad,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g3ddfee87b4+c34e8be1fa,g487adcacf7+5fae3daba8,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+ea1711114f,g5a732f18d5+53520f316c,g64a986408d+bd2ed33bd6,g858d7b2824+bd2ed33bd6,g8a8a8dda67+585e252eca,g99cad8db69+016a06b37a,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+ef4e3a5875,gb0e22166c9+60f28cb32d,gb6a65358fc+0e5473021a,gba4ed39666+c2a2e4ac27,gbb8dafda3b+09e12c87ab,gc120e1dc64+bc2e06c061,gc28159a63d+0e5473021a,gcf0d15dbbd+c34e8be1fa,gdaeeff99f8+f9a426f77a,ge6526c86ff+508d0e0a30,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gf18bd8381d+8d59551888,gf1cff7945b+bd2ed33bd6,w.2024.16
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
lsst::sphgeom::Interval1d Class Reference

Interval1d represents closed intervals of ℝ. More...

#include <Interval1d.h>

Inheritance diagram for lsst::sphgeom::Interval1d:
lsst::sphgeom::Interval< Interval1d, double >

Public Member Functions

 Interval1d ()
 
 Interval1d (double x)
 
 Interval1d (double x, double y)
 
 Interval1d (Base const &base)
 
bool isFull () const
 isFull returns true if this interval = ℝ.
 
bool operator== (Interval const &i) const
 Two closed intervals are equal if their endpoints are the same, or both are empty.
 
bool operator== (double x) const
 A closed interval is equal to a point x if both endpoints equal x.
 
bool operator!= (Interval const &i) const
 
bool operator!= (double x) const
 
double getA () const
 getA returns the lower endpoint of this interval.
 
double getB () const
 getB returns the upper endpoint of this interval.
 
bool isEmpty () const
 isEmpty returns true if this interval does not contain any points.
 
double getCenter () const
 getCenter returns the center of this interval.
 
double getSize () const
 getSize returns the size (length, width) of this interval.
 
IntervaldilateBy (double x)
 For positive x, dilateBy morphologically dilates this interval by [-x,x], which is equivalent to the taking the Minkowski sum with [-x,x].
 
IntervalerodeBy (double x)
 
Interval1d dilatedBy (double x) const
 
Interval1d erodedBy (double x) const
 
bool contains (double x) const
 
bool contains (Interval const &x) const
 
bool isDisjointFrom (double x) const
 
bool isDisjointFrom (Interval const &x) const
 
bool intersects (double x) const
 
bool intersects (Interval const &x) const
 
bool isWithin (double x) const
 
bool isWithin (Interval const &x) const
 
Relationship relate (double x) const
 
Relationship relate (Interval const &x) const
 
IntervalclipTo (double x)
 
IntervalclipTo (Interval const &x)
 
Interval1d clippedTo (double x) const
 
Interval1d clippedTo (Interval const &x) const
 
IntervalexpandTo (double x)
 
IntervalexpandTo (Interval const &x)
 
Interval1d expandedTo (double x) const
 
Interval1d expandedTo (Interval const &x) const
 

Static Public Member Functions

static Interval1d empty ()
 
static Interval1d full ()
 

Detailed Description

Interval1d represents closed intervals of ℝ.

It can represent both empty and full intervals, as well as single points.

Definition at line 47 of file Interval1d.h.

Constructor & Destructor Documentation

◆ Interval1d() [1/4]

lsst::sphgeom::Interval1d::Interval1d ( )
inline

Definition at line 61 of file Interval1d.h.

61: Base() {}

◆ Interval1d() [2/4]

lsst::sphgeom::Interval1d::Interval1d ( double x)
inlineexplicit

Definition at line 63 of file Interval1d.h.

63: Base(x) {}

◆ Interval1d() [3/4]

lsst::sphgeom::Interval1d::Interval1d ( double x,
double y )
inline

Definition at line 65 of file Interval1d.h.

65: Base(x, y) {}
int y
Definition SpanSet.cc:48

◆ Interval1d() [4/4]

lsst::sphgeom::Interval1d::Interval1d ( Base const & base)
inline

Definition at line 67 of file Interval1d.h.

67: Base(base) {}

Member Function Documentation

◆ clippedTo() [1/2]

Interval1d lsst::sphgeom::Interval< Interval1d , double >::clippedTo ( double x) const
inlineinherited

clippedTo returns the intersection of this interval and x.

Definition at line 190 of file Interval.h.

◆ clippedTo() [2/2]

Interval1d lsst::sphgeom::Interval< Interval1d , double >::clippedTo ( Interval< Interval1d, double > const & x) const
inlineinherited

clippedTo returns the intersection of this interval and x.

Definition at line 192 of file Interval.h.

◆ clipTo() [1/2]

Interval & lsst::sphgeom::Interval< Interval1d , double >::clipTo ( double x)
inlineinherited

clipTo shrinks this interval until all its points are in x.

Definition at line 166 of file Interval.h.

◆ clipTo() [2/2]

Interval & lsst::sphgeom::Interval< Interval1d , double >::clipTo ( Interval< Interval1d, double > const & x)
inlineinherited

clipTo shrinks this interval until all its points are in x.

Definition at line 177 of file Interval.h.

◆ contains() [1/2]

bool lsst::sphgeom::Interval< Interval1d , double >::contains ( double x) const
inlineinherited

contains returns true if the intersection of this interval and x is equal to x.

Definition at line 105 of file Interval.h.

◆ contains() [2/2]

bool lsst::sphgeom::Interval< Interval1d , double >::contains ( Interval< Interval1d, double > const & x) const
inlineinherited

contains returns true if the intersection of this interval and x is equal to x.

Definition at line 109 of file Interval.h.

◆ dilateBy()

Interval & lsst::sphgeom::Interval< Interval1d , double >::dilateBy ( double x)
inlineinherited

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.

◆ dilatedBy()

Interval1d lsst::sphgeom::Interval< Interval1d , double >::dilatedBy ( double x) const
inlineinherited

Definition at line 246 of file Interval.h.

◆ empty()

static Interval1d lsst::sphgeom::Interval1d::empty ( )
inlinestatic

Definition at line 51 of file Interval1d.h.

51 {
52 return Interval1d();
53 }

◆ erodeBy()

Interval & lsst::sphgeom::Interval< Interval1d , double >::erodeBy ( double x)
inlineinherited

Definition at line 245 of file Interval.h.

◆ erodedBy()

Interval1d lsst::sphgeom::Interval< Interval1d , double >::erodedBy ( double x) const
inlineinherited

Definition at line 247 of file Interval.h.

◆ expandedTo() [1/2]

Interval1d lsst::sphgeom::Interval< Interval1d , double >::expandedTo ( double x) const
inlineinherited

expandedTo returns the smallest interval containing the union of this interval and x.

Definition at line 225 of file Interval.h.

◆ expandedTo() [2/2]

Interval1d lsst::sphgeom::Interval< Interval1d , double >::expandedTo ( Interval< Interval1d, double > const & x) const
inlineinherited

expandedTo returns the smallest interval containing the union of this interval and x.

Definition at line 227 of file Interval.h.

◆ expandTo() [1/2]

Interval & lsst::sphgeom::Interval< Interval1d , double >::expandTo ( double x)
inlineinherited

expandTo minimally expands this interval to contain x.

Definition at line 199 of file Interval.h.

◆ expandTo() [2/2]

Interval & lsst::sphgeom::Interval< Interval1d , double >::expandTo ( Interval< Interval1d, double > const & x)
inlineinherited

expandTo minimally expands this interval to contain x.

Definition at line 211 of file Interval.h.

◆ full()

static Interval1d lsst::sphgeom::Interval1d::full ( )
inlinestatic

◆ getA()

double lsst::sphgeom::Interval< Interval1d , double >::getA ( ) const
inlineinherited

getA returns the lower endpoint of this interval.

The return value for empty intervals is arbitrary.

Definition at line 83 of file Interval.h.

◆ getB()

double lsst::sphgeom::Interval< Interval1d , double >::getB ( ) const
inlineinherited

getB returns the upper endpoint of this interval.

The return value for empty intervals is arbitrary.

Definition at line 87 of file Interval.h.

◆ getCenter()

double lsst::sphgeom::Interval< Interval1d , double >::getCenter ( ) const
inlineinherited

getCenter returns the center of this interval.

It is arbitrary for empty intervals.

Definition at line 96 of file Interval.h.

◆ getSize()

double lsst::sphgeom::Interval< Interval1d , double >::getSize ( ) const
inlineinherited

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.

◆ intersects() [1/2]

bool lsst::sphgeom::Interval< Interval1d , double >::intersects ( double x) const
inlineinherited

intersects returns true if the intersection of this interval and x is non-empty.

Definition at line 137 of file Interval.h.

◆ intersects() [2/2]

bool lsst::sphgeom::Interval< Interval1d , double >::intersects ( Interval< Interval1d, double > const & x) const
inlineinherited

intersects returns true if the intersection of this interval and x is non-empty.

Definition at line 139 of file Interval.h.

◆ isDisjointFrom() [1/2]

bool lsst::sphgeom::Interval< Interval1d , double >::isDisjointFrom ( double x) const
inlineinherited

isDisjointFrom returns true if the intersection of this interval and x is empty.

Definition at line 122 of file Interval.h.

◆ isDisjointFrom() [2/2]

bool lsst::sphgeom::Interval< Interval1d , double >::isDisjointFrom ( Interval< Interval1d, double > const & x) const
inlineinherited

isDisjointFrom returns true if the intersection of this interval and x is empty.

Definition at line 126 of file Interval.h.

◆ isEmpty()

bool lsst::sphgeom::Interval< Interval1d , double >::isEmpty ( ) const
inlineinherited

isEmpty returns true if this interval does not contain any points.

Definition at line 90 of file Interval.h.

◆ isFull()

bool lsst::sphgeom::Interval1d::isFull ( ) const
inline

isFull returns true if this interval = ℝ.

Definition at line 70 of file Interval1d.h.

70 {
73 }
double getA() const
getA returns the lower endpoint of this interval.
Definition Interval.h:83
double getB() const
getB returns the upper endpoint of this interval.
Definition Interval.h:87
T infinity(T... args)

◆ isWithin() [1/2]

bool lsst::sphgeom::Interval< Interval1d , double >::isWithin ( double x) const
inlineinherited

isWithin returns true if the intersection of this interval and x is this interval.

Definition at line 147 of file Interval.h.

◆ isWithin() [2/2]

bool lsst::sphgeom::Interval< Interval1d , double >::isWithin ( Interval< Interval1d, double > const & x) const
inlineinherited

isWithin returns true if the intersection of this interval and x is this interval.

Definition at line 151 of file Interval.h.

◆ operator!=() [1/2]

bool lsst::sphgeom::Interval< Interval1d , double >::operator!= ( double x) const
inlineinherited

Definition at line 79 of file Interval.h.

◆ operator!=() [2/2]

bool lsst::sphgeom::Interval< Interval1d , double >::operator!= ( Interval< Interval1d, double > const & i) const
inlineinherited

Definition at line 72 of file Interval.h.

◆ operator==() [1/2]

bool lsst::sphgeom::Interval< Interval1d , double >::operator== ( double x) const
inlineinherited

A closed interval is equal to a point x if both endpoints equal x.

Definition at line 75 of file Interval.h.

◆ operator==() [2/2]

bool lsst::sphgeom::Interval< Interval1d , double >::operator== ( Interval< Interval1d, double > const & i) const
inlineinherited

Two closed intervals are equal if their endpoints are the same, or both are empty.

Definition at line 68 of file Interval.h.

◆ relate() [1/2]

Relationship lsst::sphgeom::Interval< Interval1d , double >::relate ( double x) const
inherited

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 160 of file Interval.h.

◆ relate() [2/2]

Relationship lsst::sphgeom::Interval< Interval1d , double >::relate ( Interval< Interval1d, double > const & x) const
inherited

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 161 of file Interval.h.


The documentation for this class was generated from the following file: