LSST Applications 29.0.1,g0fba68d861+b943c38344,g1ec0fe41b4+f536777771,g1fd858c14a+a9301854fb,g35bb328faa+fcb1d3bbc8,g4af146b050+7e9a2de16a,g4d2262a081+bc578d85c1,g53246c7159+fcb1d3bbc8,g56a49b3a55+9c12191793,g5a012ec0e7+3632fc3ff3,g60b5630c4e+9fd1a614b8,g67b6fd64d1+ed4b5058f4,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g8352419a5c+fcb1d3bbc8,g87b7deb4dc+4c2feab6d7,g8852436030+e5453db6e6,g89139ef638+ed4b5058f4,g8e3bb8577d+ea375a93e1,g9125e01d80+fcb1d3bbc8,g94187f82dc+9fd1a614b8,g95f8561545+9fd1a614b8,g989de1cb63+ed4b5058f4,g9d31334357+9fd1a614b8,g9f33ca652e+aa92e8646f,gabe3b4be73+1e0a283bba,gabf8522325+fa80ff7197,gb1101e3267+9288031c14,gb58c049af0+f03b321e39,gb89ab40317+ed4b5058f4,gcf25f946ba+e5453db6e6,gcf6002c91b+87cebee2a2,gd6cbbdb0b4+bb83cc51f8,gde0f65d7ad+5b57b4d45c,ge278dab8ac+d65b3c2b70,ge410e46f29+ed4b5058f4,gf23fb2af72+b7cae620c0,gf5e32f922b+fcb1d3bbc8,gf67bdafdda+ed4b5058f4
LSST Data Management Base Package
|
A boolean coordinate. More...
#include <CoordinateExpr.h>
Public Types | |
typedef bool | Element |
typedef Eigen::Matrix< bool, N, 1, Eigen::DontAlign > | EigenVector |
Public Member Functions | |
CoordinateExpr (bool val=false) noexcept | |
Construct a CoordinateExpr with all elements set to the same scalar value. | |
template<typename Vector> | |
CoordinateExpr (Eigen::MatrixBase< Vector > const &vector) | |
Construct a CoordinateExpr from an Eigen vector. | |
CoordinateExpr (CoordinateExpr const &) noexcept=default | |
CoordinateExpr (CoordinateExpr &&) noexcept=default | |
CoordinateExpr & | operator= (CoordinateExpr const &) noexcept=default |
CoordinateExpr & | operator= (CoordinateExpr &&) noexcept=default |
~CoordinateExpr () noexcept=default | |
bool & | operator[] (int n) |
bool const & | operator[] (int n) const |
bool & | operator[] (int n) |
bool const & | operator[] (int n) const |
bool & | coeffRef (int n) |
bool const & | coeffRef (int n) const |
bool & | coeffRef (int n) |
bool const & | coeffRef (int n) const |
EigenVector const & | asEigen () const noexcept(IS_ELEMENT_NOTHROW_COPYABLE) |
Return a fixed-size Eigen representation of the coordinate object. | |
EigenVector const & | asEigen () const noexcept(IS_ELEMENT_NOTHROW_COPYABLE) |
Return a fixed-size Eigen representation of the coordinate object. | |
Logical operators | |
These operators do not provide interoperability with scalars. | |
CoordinateExpr | and_ (CoordinateExpr const &rhs) const noexcept |
CoordinateExpr | or_ (CoordinateExpr const &rhs) const noexcept |
CoordinateExpr | not_ () const noexcept |
Static Public Attributes | |
static int const | dimensions |
static int const | dimensions |
static bool constexpr | IS_ELEMENT_NOTHROW_COPYABLE |
static bool constexpr | IS_ELEMENT_NOTHROW_COPYABLE |
static bool constexpr | IS_ELEMENT_NOTHROW_ASSIGNABLE |
static bool constexpr | IS_ELEMENT_NOTHROW_ASSIGNABLE |
Protected Member Functions | |
void | _swap (CoordinateBase &other) noexcept |
void | _swap (CoordinateBase &other) noexcept |
Protected Attributes | |
EigenVector | _vector |
EigenVector | _vector |
Related Symbols | |
(Note that these are not member symbols.) | |
bool | allclose (CoordinateBase< CoordinateExpr< N >, bool, N > const &a, CoordinateBase< CoordinateExpr< N >, bool, N > const &b, bool rtol=static_cast< bool >(1E-5), bool atol=static_cast< bool >(1E-8)) noexcept(std::is_nothrow_copy_constructible< bool >::value &&std::is_nothrow_copy_assignable< bool >::value) |
Floating-point comparison with tolerance. | |
bool | allclose (CoordinateBase< CoordinateExpr< N >, bool, N > const &a, CoordinateBase< CoordinateExpr< N >, bool, N > const &b, bool rtol=static_cast< bool >(1E-5), bool atol=static_cast< bool >(1E-8)) noexcept(std::is_nothrow_copy_constructible< bool >::value &&std::is_nothrow_copy_assignable< bool >::value) |
Floating-point comparison with tolerance. | |
A boolean coordinate.
CoordinateExpr is intended to be used as a temporary in coordinate comparisons:
Point2D a(3.5,1.2); Point2D b(-1.5,4.3); std::cout << all(a.lt(b)) << std::endl; // false std::cout << any(a.lt(b)) << std::endl; // true
CoordinateExpr is not a true lazy-evaluation expression template, as that seems unnecessary when the object is typically only two bools large (smaller than the raw pointers necessary to implement a lazy solution). The consequence is that there's no short-circuiting of logical operators, but I don't think that will even remotely matter for most use cases. The any() and all() functions do support short-circuiting.
Definition at line 50 of file CoordinateExpr.h.
|
inherited |
Definition at line 59 of file CoordinateBase.h.
|
inherited |
Definition at line 57 of file CoordinateBase.h.
|
inlineexplicitnoexcept |
Construct a CoordinateExpr with all elements set to the same scalar value.
Definition at line 55 of file CoordinateExpr.h.
|
inlineexplicit |
Construct a CoordinateExpr from an Eigen vector.
Definition at line 59 of file CoordinateExpr.h.
|
defaultnoexcept |
|
defaultnoexcept |
|
defaultnoexcept |
|
inlineprotectednoexceptinherited |
Definition at line 108 of file CoordinateBase.h.
|
inlineprotectednoexceptinherited |
Definition at line 108 of file CoordinateBase.h.
|
noexcept |
Definition at line 30 of file CoordinateExpr.cc.
|
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.
|
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.
|
inlineinherited |
Definition at line 80 of file CoordinateBase.h.
|
inlineinherited |
Definition at line 80 of file CoordinateBase.h.
|
inlineinherited |
Definition at line 81 of file CoordinateBase.h.
|
inlineinherited |
Definition at line 81 of file CoordinateBase.h.
|
noexcept |
|
defaultnoexcept |
|
defaultnoexcept |
|
inlineinherited |
Definition at line 78 of file CoordinateBase.h.
|
inlineinherited |
Definition at line 78 of file CoordinateBase.h.
|
inlineinherited |
Definition at line 79 of file CoordinateBase.h.
|
inlineinherited |
Definition at line 79 of file CoordinateBase.h.
|
noexcept |
|
Floating-point comparison with tolerance.
Interface, naming, and default tolerances matches Numpy.
Definition at line 120 of file CoordinateBase.cc.
|
Floating-point comparison with tolerance.
Interface, naming, and default tolerances matches Numpy.
Definition at line 120 of file CoordinateBase.cc.
|
protectedinherited |
Definition at line 109 of file CoordinateBase.h.
|
protectedinherited |
Definition at line 109 of file CoordinateBase.h.
|
staticinherited |
Definition at line 58 of file CoordinateBase.h.
|
staticinherited |
Definition at line 58 of file CoordinateBase.h.
|
staticconstexprinherited |
Definition at line 61 of file CoordinateBase.h.
|
staticconstexprinherited |
Definition at line 61 of file CoordinateBase.h.
|
staticconstexprinherited |
Definition at line 60 of file CoordinateBase.h.
|
staticconstexprinherited |
Definition at line 60 of file CoordinateBase.h.