LSSTApplications
18.0.0+106,18.0.0+50,19.0.0,19.0.0+1,19.0.0+10,19.0.0+11,19.0.0+13,19.0.0+17,19.0.0+2,19.0.0-1-g20d9b18+6,19.0.0-1-g425ff20,19.0.0-1-g5549ca4,19.0.0-1-g580fafe+6,19.0.0-1-g6fe20d0+1,19.0.0-1-g7011481+9,19.0.0-1-g8c57eb9+6,19.0.0-1-gb5175dc+11,19.0.0-1-gdc0e4a7+9,19.0.0-1-ge272bc4+6,19.0.0-1-ge3aa853,19.0.0-10-g448f008b,19.0.0-12-g6990b2c,19.0.0-2-g0d9f9cd+11,19.0.0-2-g3d9e4fb2+11,19.0.0-2-g5037de4,19.0.0-2-gb96a1c4+3,19.0.0-2-gd955cfd+15,19.0.0-3-g2d13df8,19.0.0-3-g6f3c7dc,19.0.0-4-g725f80e+11,19.0.0-4-ga671dab3b+1,19.0.0-4-gad373c5+3,19.0.0-5-ga2acb9c+2,19.0.0-5-gfe96e6c+2,w.2020.01
LSSTDataManagementBasePackage
|
A coordinate class intended to represent offsets and dimensions (2-d specialization). More...
#include <Extent.h>
Public Types | |
typedef Super::EigenVector | EigenVector |
typedef T | Element |
Public Member Functions | |
Extent (T val=static_cast< T >(0)) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) | |
Construct an Extent with all elements set to the same scalar value. More... | |
Extent (EigenVector const &vector) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) | |
Construct an Extent from an Eigen vector. More... | |
Extent (Point< T, 2 > const &other) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) | |
Explicit constructor from Point. More... | |
template<typename U > | |
Extent (Extent< U, 2 > const &other) noexcept(IS_NOTHROW_CONVERTIBLE< T, U >) | |
Explicit constructor from Extent of different type (if allowed) More... | |
template<typename U > | |
Extent (Point< U, 2 > const &other) noexcept(IS_NOTHROW_CONVERTIBLE< T, U >) | |
Extent (T x, T y) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) | |
Construct from two scalars. More... | |
Extent (T const xy[2]) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) | |
Construct from a two-element array. More... | |
Extent (std::pair< T, T > const &xy) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) | |
Construct from a std::pair. More... | |
Extent (std::tuple< T, T > const &xy) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) | |
Construct from std::tuple. More... | |
Extent (Extent const &other)=default | |
Extent (Extent &&other)=default | |
~Extent ()=default | |
Extent & | operator= (Extent const &other)=default |
Extent & | operator= (Extent &&other)=default |
void | swap (Extent &other) noexcept |
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... | |
bool | operator== (Extent< T, N > const &other) const noexcept |
Standard equality comparison. More... | |
bool | operator!= (Extent< T, N > const &other) const noexcept |
Standard inequality comparison. More... | |
Point< T, N > | asPoint () const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
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 noexcept(IS_ELEMENT_NOTHROW_COPYABLE) |
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 noexcept |
CoordinateExpr< N > | eq (T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
CoordinateExpr< N > | ne (Extent< T, N > const &other) const noexcept |
CoordinateExpr< N > | ne (T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
CoordinateExpr< N > | lt (Extent< T, N > const &other) const noexcept |
CoordinateExpr< N > | lt (T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
CoordinateExpr< N > | le (Extent< T, N > const &other) const noexcept |
CoordinateExpr< N > | le (T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
CoordinateExpr< N > | gt (Extent< T, N > const &other) const noexcept |
CoordinateExpr< N > | gt (T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
CoordinateExpr< N > | ge (Extent< T, N > const &other) const noexcept |
CoordinateExpr< N > | ge (T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
Additive arithmetic operators | |
No scalar interoperability is provided for Extent additive arithmetic operations. | |
Point< T, N > | operator+ (Point< T, N > const &other) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
Extent< T, N > | operator+ (Extent< T, N > const &other) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
Extent< T, N > | operator+ () const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
Extent< T, N > | operator- (Extent< T, N > const &other) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
Extent< T, N > | operator- () const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
Extent< T, N > & | operator+= (Extent< T, N > const &other) noexcept(Super::IS_ELEMENT_NOTHROW_ASSIGNABLE) |
Extent< T, N > & | operator-= (Extent< T, N > const &other) noexcept(Super::IS_ELEMENT_NOTHROW_ASSIGNABLE) |
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 noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
Extent< T, N > & | operator*= (T scalar) noexcept(Super::IS_ELEMENT_NOTHROW_ASSIGNABLE) |
Extent< T, N > | operator/ (T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
Extent< T, N > & | operator/= (T scalar) noexcept(Super::IS_ELEMENT_NOTHROW_ASSIGNABLE) |
Static Public Attributes | |
static int const | dimensions |
static bool constexpr | IS_ELEMENT_NOTHROW_COPYABLE |
static bool constexpr | IS_ELEMENT_NOTHROW_ASSIGNABLE |
Protected Member Functions | |
void | _swap (CoordinateBase &other) noexcept |
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)) noexcept(std::is_nothrow_copy_constructible< T >::value &&std::is_nothrow_copy_assignable< T >::value) |
Floating-point comparison with tolerance. More... | |
A coordinate class intended to represent offsets and dimensions (2-d specialization).
See Operators on Point and Extent for mathematical operators on Extent.
typedef Super::EigenVector lsst::geom::Extent< T, 2 >::EigenVector |
|
inherited |
Definition at line 56 of file CoordinateBase.h.
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
explicitnoexcept |
Explicit constructor from Point.
|
explicitnoexcept |
|
explicitnoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicitnoexcept |
|
default |
|
default |
|
default |
|
inlineprotectednoexceptinherited |
Definition at line 108 of file CoordinateBase.h.
|
inlinenoexceptinherited |
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 89 of file CoordinateBase.h.
|
noexceptinherited |
|
inlineinherited |
Definition at line 80 of file CoordinateBase.h.
|
inlineinherited |
Definition at line 81 of file CoordinateBase.h.
|
inlineinherited |
Return the L2 norm of the Extent (sqrt(x^2 + y^2 + ...)).
Definition at line 70 of file Extent.h.
|
inlineinherited |
Return the squared L2 norm of the Extent (x^2 + y^2 + ...).
Definition at line 67 of file Extent.h.
|
noexceptinherited |
Definition at line 47 of file Extent.cc.
|
inlinenoexceptinherited |
Definition at line 105 of file Extent.h.
|
noexceptinherited |
Definition at line 82 of file Extent.cc.
|
inlinenoexceptinherited |
Definition at line 120 of file Extent.h.
|
noexceptinherited |
Definition at line 75 of file Extent.cc.
|
inlinenoexceptinherited |
Definition at line 117 of file Extent.h.
|
noexceptinherited |
Definition at line 68 of file Extent.cc.
|
inlinenoexceptinherited |
Definition at line 114 of file Extent.h.
|
noexceptinherited |
Definition at line 61 of file Extent.cc.
|
inlinenoexceptinherited |
Definition at line 111 of file Extent.h.
|
noexceptinherited |
Definition at line 54 of file Extent.cc.
|
inlinenoexceptinherited |
Definition at line 108 of file Extent.h.
|
inlinenoexceptinherited |
Standard inequality comparison.
Returns true iff any(this->ne(other));
Definition at line 84 of file Extent.h.
|
inlinenoexceptinherited |
Definition at line 160 of file Extent.h.
|
inlinenoexceptinherited |
Definition at line 163 of file Extent.h.
|
noexceptinherited |
Definition at line 94 of file Extent.cc.
|
inlinenoexceptinherited |
Definition at line 132 of file Extent.h.
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
Definition at line 138 of file Extent.h.
|
inlinenoexceptinherited |
Definition at line 135 of file Extent.h.
|
inlinenoexceptinherited |
Definition at line 149 of file Extent.h.
|
inlinenoexceptinherited |
Definition at line 142 of file Extent.h.
|
inlinenoexceptinherited |
Definition at line 167 of file Extent.h.
|
inlinenoexceptinherited |
Definition at line 170 of file Extent.h.
|
default |
|
default |
|
inlinenoexceptinherited |
Standard equality comparison.
Returns true iff all(this->eq(other));
Definition at line 77 of file Extent.h.
|
inlineinherited |
Definition at line 78 of file CoordinateBase.h.
|
inlineinherited |
Definition at line 79 of file CoordinateBase.h.
|
inlinenoexcept |
Definition at line 298 of file Extent.h.
|
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 109 of file CoordinateBase.h.
|
staticinherited |
Definition at line 58 of file CoordinateBase.h.
|
staticinherited |
Definition at line 61 of file CoordinateBase.h.
|
staticinherited |
Definition at line 60 of file CoordinateBase.h.