lsst.geom
15.0-1-g417ea41+5
|
A coordinate class intended to represent offsets and dimensions. More...
#include <CoordinateBase.h>
Public Types | |
typedef Super::EigenVector | EigenVector |
typedef T | Element |
Public Member Functions | |
Extent (T val=static_cast< T >(0)) | |
Construct an Extent with all elements set to the same scalar value. More... | |
Extent (EigenVector const &vector) | |
Construct an Extent from an Eigen vector. More... | |
Extent (Point< T, N > const &other) | |
Explicit constructor from Point. More... | |
template<typename U > | |
Extent (Extent< U, N > const &other) | |
Explicit constructor from Extent of different type (if allowed) More... | |
template<typename U > | |
Extent (Point< U, N > const &other) | |
Extent (Extent const &other) | |
Extent (Extent &&other) | |
~Extent ()=default | |
Extent & | operator= (Extent const &other)=default |
Extent & | operator= (Extent &&other)=default |
T | computeSquaredNorm () const |
Return the squared L2 norm of the Extent (x^2 + y^2 + ...). More... | |
T | computeNorm () const |
Return the L2 norm of the Extent (sqrt(x^2 + y^2 + ...)). More... | |
void | swap (Extent &other) |
bool | operator== (Extent< T, N > const &other) const |
Standard equality comparison. More... | |
bool | operator!= (Extent< T, N > const &other) const |
Standard inequality comparison. More... | |
Point< T, N > | asPoint () const |
Cast this object to an Extent of the same numeric type and dimensionality. More... | |
std::string | toString () const |
T & | operator[] (int n) |
T const & | operator[] (int n) const |
T & | coeffRef (int n) |
T const & | coeffRef (int n) const |
EigenVector const & | asEigen () const |
Return a fixed-size Eigen representation of the coordinate object. More... | |
Named comparison functions | |
Note that these return CoordinateExpr, not bool. Unlike most arithmetic and assignment operators, scalar interoperability is provided for comparisons; expressions like if (all(extent.gt(0))) ... are both ubiquitous and easy to interpret. | |
CoordinateExpr< N > | eq (Extent< T, N > const &other) const |
CoordinateExpr< N > | eq (T scalar) const |
CoordinateExpr< N > | ne (Extent< T, N > const &other) const |
CoordinateExpr< N > | ne (T scalar) const |
CoordinateExpr< N > | lt (Extent< T, N > const &other) const |
CoordinateExpr< N > | lt (T scalar) const |
CoordinateExpr< N > | le (Extent< T, N > const &other) const |
CoordinateExpr< N > | le (T scalar) const |
CoordinateExpr< N > | gt (Extent< T, N > const &other) const |
CoordinateExpr< N > | gt (T scalar) const |
CoordinateExpr< N > | ge (Extent< T, N > const &other) const |
CoordinateExpr< N > | ge (T scalar) const |
Additive arithmetic operators | |
No scalar interoperability is provided for Extent additive arithmetic operations. | |
Point< T, N > | operator+ (Point< T, N > const &other) const |
Extent< T, N > | operator+ (Extent< T, N > const &other) const |
Extent< T, N > | operator+ () const |
Extent< T, N > | operator- (Extent< T, N > const &other) const |
Extent< T, N > | operator- () const |
Extent< T, N > & | operator+= (Extent< T, N > const &other) |
Extent< T, N > & | operator-= (Extent< T, N > const &other) |
Multiplicative arithmetic operators | |
As usual with matrices and vectors, Extent can be multiplied or divided by a scalar. | |
Extent< T, N > | operator* (T scalar) const |
Extent< T, N > & | operator*= (T scalar) |
Extent< T, N > | operator/ (T scalar) const |
Extent< T, N > & | operator/= (T scalar) |
Static Public Attributes | |
static int const | dimensions |
Protected Member Functions | |
void | _swap (CoordinateBase &other) |
Protected Attributes | |
EigenVector | _vector |
Related Functions | |
(Note that these are not member functions.) | |
bool | allclose (CoordinateBase< Extent< T, N >, T, N > const &a, CoordinateBase< Extent< T, N >, T, N > const &b, T rtol=static_cast< T >(1E-5), T atol=static_cast< T >(1E-8)) |
Floating-point comparison with tolerance. More... | |
A coordinate class intended to represent offsets and dimensions.
Much of the functionality of Extent is provided by its CRTP base class, ExtentBase.
See Operators on Point and Extent for mathematical operators on Extent.
Definition at line 40 of file CoordinateBase.h.
typedef Super::EigenVector lsst::geom::Extent< T, N >::EigenVector |
|
inherited |
Definition at line 50 of file CoordinateBase.h.
|
inlineexplicit |
|
inlineexplicit |
|
explicit |
|
explicit |
Explicit constructor from Extent of different type (if allowed)
|
explicit |
lsst::geom::Extent< T, N >::Extent | ( | Extent< T, N > const & | other | ) |
lsst::geom::Extent< T, N >::Extent | ( | Extent< T, N > && | other | ) |
|
default |
|
inlineprotectedinherited |
Definition at line 89 of file CoordinateBase.h.
|
inlineinherited |
Return a fixed-size Eigen representation of the coordinate object.
The fact that this returns by const reference rather than by value should not be considered part of the API; this is merely an optimization enabled by the implementation.
Definition at line 71 of file CoordinateBase.h.
|
inherited |
|
inlineinherited |
Definition at line 62 of file CoordinateBase.h.
|
inlineinherited |
Definition at line 63 of file CoordinateBase.h.
|
inline |
|
inline |
|
inherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
default |
|
default |
|
inlineinherited |
|
inlineinherited |
Definition at line 60 of file CoordinateBase.h.
|
inlineinherited |
Definition at line 61 of file CoordinateBase.h.
|
inline |
|
inlineinherited |
|
related |
Floating-point comparison with tolerance.
Interface, naming, and default tolerances matches Numpy.
Definition at line 30 of file CoordinateBase.cc.
|
protectedinherited |
Definition at line 90 of file CoordinateBase.h.
|
staticinherited |
Definition at line 51 of file CoordinateBase.h.