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
|
#include <Point.h>
Public Types | |
typedef T | Element |
typedef Eigen::Matrix< T, N, 1, Eigen::DontAlign > | EigenVector |
Public Member Functions | |
PointBase (PointBase const &)=default | |
PointBase (PointBase &&)=default | |
PointBase & | operator= (PointBase const &)=default |
PointBase & | operator= (PointBase &&)=default |
~PointBase ()=default | |
bool | operator== (Point< T, N > const &other) const noexcept |
Standard equality comparison. More... | |
bool | operator!= (Point< T, N > const &other) const noexcept |
Standard inequality comparison. More... | |
Extent< T, N > | asExtent () const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
Cast this object to an Extent of the same numeric type and dimensionality. More... | |
void | shift (Extent< T, N > const &offset) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
Shift the point by the given offset. More... | |
void | scale (double factor) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
double | distanceSquared (PointBase< T, N > const &other) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
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 vectorized 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(point.gt(0))) ... are both ubiquitous and easy to interpret. | |
CoordinateExpr< N > | eq (Point< T, N > const &other) const noexcept |
CoordinateExpr< N > | ne (Point< T, N > const &other) const noexcept |
CoordinateExpr< N > | lt (Point< T, N > const &other) const noexcept |
CoordinateExpr< N > | le (Point< T, N > const &other) const noexcept |
CoordinateExpr< N > | gt (Point< T, N > const &other) const noexcept |
CoordinateExpr< N > | ge (Point< T, N > const &other) const noexcept |
CoordinateExpr< N > | eq (T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
CoordinateExpr< N > | ne (T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
CoordinateExpr< N > | lt (T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
CoordinateExpr< N > | le (T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
CoordinateExpr< N > | gt (T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
CoordinateExpr< N > | ge (T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
Arithmetic operators | |
No scalar interoperability is provided for Point arithmetic operations. | |
Extent< T, N > | operator- (Point< T, N > const &other) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
Point< T, N > | operator+ (Extent< T, N > const &other) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
Point< T, N > | operator- (Extent< T, N > const &other) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) |
Point< T, N > & | operator+= (Extent< T, N > const &other) noexcept(Super::IS_ELEMENT_NOTHROW_ASSIGNABLE) |
Point< T, N > & | operator-= (Extent< T, N > const &other) 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 | |
PointBase (T val=static_cast< T >(0)) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) | |
template<typename Vector > | |
PointBase (Eigen::MatrixBase< Vector > const &vector) | |
void | _swap (CoordinateBase &other) noexcept |
Protected Attributes | |
EigenVector | _vector |
Related Functions | |
(Note that these are not member functions.) | |
bool | allclose (CoordinateBase< Point< T, N >, T, N > const &a, CoordinateBase< Point< 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... | |
|
inherited |
Definition at line 59 of file CoordinateBase.h.
|
inherited |
Definition at line 56 of file CoordinateBase.h.
|
default |
|
default |
|
default |
|
inlineexplicitprotectednoexcept |
|
inlineexplicitprotected |
|
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.
|
inlinenoexcept |
|
inlineinherited |
Definition at line 80 of file CoordinateBase.h.
|
inlineinherited |
Definition at line 81 of file CoordinateBase.h.
|
inlinenoexcept |
Definition at line 138 of file Point.h.
|
noexcept |
Definition at line 76 of file Point.cc.
|
inlinenoexcept |
Definition at line 81 of file Point.h.
|
noexcept |
Definition at line 111 of file Point.cc.
|
inlinenoexcept |
Definition at line 96 of file Point.h.
|
noexcept |
Definition at line 104 of file Point.cc.
|
inlinenoexcept |
Definition at line 93 of file Point.h.
|
noexcept |
Definition at line 97 of file Point.cc.
|
inlinenoexcept |
Definition at line 90 of file Point.h.
|
noexcept |
Definition at line 90 of file Point.cc.
|
inlinenoexcept |
Definition at line 87 of file Point.h.
|
noexcept |
Definition at line 83 of file Point.cc.
|
inlinenoexcept |
Definition at line 84 of file Point.h.
|
inlinenoexcept |
Standard inequality comparison.
Returns true iff any(this->ne(other));
Definition at line 60 of file Point.h.
|
inlinenoexcept |
Definition at line 110 of file Point.h.
|
inlinenoexcept |
Definition at line 116 of file Point.h.
|
inlinenoexcept |
Definition at line 107 of file Point.h.
|
inlinenoexcept |
Definition at line 113 of file Point.h.
|
inlinenoexcept |
Definition at line 120 of file Point.h.
|
default |
|
default |
|
inlinenoexcept |
Standard equality comparison.
Returns true iff all(this->eq(other));
Definition at line 53 of file Point.h.
|
inlineinherited |
Definition at line 78 of file CoordinateBase.h.
|
inlineinherited |
Definition at line 79 of file CoordinateBase.h.
|
inlinenoexcept |
Definition at line 136 of file Point.h.
|
inlinenoexcept |
Shift the point by the given offset.
Definition at line 132 of file Point.h.
|
inline |
|
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.