LSSTApplications  19.0.0-10-g4a5fae6+3,19.0.0-10-g920eed2,19.0.0-11-g48a0200+2,19.0.0-18-gfc4e62b+16,19.0.0-2-g3b2f90d+2,19.0.0-2-gd671419+6,19.0.0-20-g5a5a17ab+14,19.0.0-21-g2644856+17,19.0.0-24-g0913cb1,19.0.0-24-g878c510+4,19.0.0-25-g6c8df7140+1,19.0.0-25-gb330496+4,19.0.0-3-g2b32d65+6,19.0.0-3-g8227491+15,19.0.0-3-g9c54d0d+15,19.0.0-3-gca68e65+11,19.0.0-3-gcfc5f51+6,19.0.0-3-ge110943+14,19.0.0-3-ge74d124,19.0.0-30-g9c3fd16+5,19.0.0-4-g06f5963+6,19.0.0-4-g10df615,19.0.0-4-g3d16501+17,19.0.0-4-g4a9c019+6,19.0.0-4-g5a8b323,19.0.0-4-g66397f0+1,19.0.0-4-g8557e14,19.0.0-4-g8964aba+16,19.0.0-4-ge404a01+15,19.0.0-5-g40f3a5a,19.0.0-5-g4db63b3,19.0.0-5-gb9eeb60,19.0.0-5-gfb03ce7+16,19.0.0-6-gbaebbfb+15,19.0.0-61-gec4c6e08+5,19.0.0-7-g039c0b5+15,19.0.0-7-gbea9075+4,19.0.0-7-gc567de5+16,19.0.0-72-g37abf38+2,19.0.0-9-g463f923+15,v20.0.0.rc1
LSSTDataManagementBasePackage
Point.h
Go to the documentation of this file.
1 /*
2  * Developed for the LSST Data Management System.
3  * This product includes software developed by the LSST Project
4  * (https://www.lsst.org).
5  * See the COPYRIGHT file at the top-level directory of this distribution
6  * for details of code ownership.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  */
21 
22 /*
23  * A coordinate class intended to represent absolute positions.
24  */
25 #ifndef LSST_GEOM_POINT_H
26 #define LSST_GEOM_POINT_H
27 
28 #include <tuple>
29 
32 #include "lsst/geom/Extent.h"
33 
34 namespace lsst {
35 namespace geom {
36 
37 template <typename T, int N>
38 class PointBase : public CoordinateBase<Point<T, N>, T, N> {
39  typedef CoordinateBase<Point<T, N>, T, N> Super;
40 
41 public:
42  PointBase(PointBase const &) = default;
43  PointBase(PointBase &&) = default;
44  PointBase &operator=(PointBase const &) = default;
45  PointBase &operator=(PointBase &&) = default;
46  ~PointBase() = default;
47 
53  bool operator==(Point<T, N> const &other) const noexcept { return all(this->eq(other)); }
54 
60  bool operator!=(Point<T, N> const &other) const noexcept { return any(this->ne(other)); }
61 
75  CoordinateExpr<N> eq(Point<T, N> const &other) const noexcept;
76  CoordinateExpr<N> ne(Point<T, N> const &other) const noexcept;
77  CoordinateExpr<N> lt(Point<T, N> const &other) const noexcept;
78  CoordinateExpr<N> le(Point<T, N> const &other) const noexcept;
79  CoordinateExpr<N> gt(Point<T, N> const &other) const noexcept;
80  CoordinateExpr<N> ge(Point<T, N> const &other) const noexcept;
82  return this->eq(Point<T, N>(scalar));
83  }
85  return this->ne(Point<T, N>(scalar));
86  }
88  return this->lt(Point<T, N>(scalar));
89  }
91  return this->le(Point<T, N>(scalar));
92  }
94  return this->gt(Point<T, N>(scalar));
95  }
97  return this->ge(Point<T, N>(scalar));
98  }
100 
108  return Extent<T, N>(this->_vector - other._vector);
109  }
111  return Point<T, N>(this->_vector + other.asEigen());
112  }
114  return Point<T, N>(this->_vector - other.asEigen());
115  }
117  this->_vector += other.asEigen();
118  return static_cast<Point<T, N> &>(*this);
119  }
121  this->_vector -= other.asEigen();
122  return static_cast<Point<T, N> &>(*this);
123  }
125 
128  return Extent<T, N>(static_cast<Point<T, N> const &>(*this));
129  }
130 
132  void shift(Extent<T, N> const &offset) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) {
133  this->_vector += offset.asEigen();
134  }
135 
136  void scale(double factor) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) { this->_vector *= factor; }
137 
139  // the cast to double is lame but Eigen seems to require they be the same type
140  return (this->asEigen() - other.asEigen()).squaredNorm();
141  }
142 
144  std::stringstream out;
145  out << "Point(";
146  for (size_t i = 0; i < N; ++i) {
147  if (i != 0) {
148  out << ",";
149  }
150  out << (*this)[i];
151  }
152  out << ")";
153  return out.str();
154  }
155 
156 protected:
157  explicit PointBase(T val = static_cast<T>(0)) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) : Super(val) {}
158 
159  template <typename Vector>
160  explicit PointBase(Eigen::MatrixBase<Vector> const &vector) : Super(vector) {}
161 };
162 
168 template <typename T, int N>
169 class Point : public PointBase<T, N> {
170  typedef PointBase<T, N> Super;
171 
172 public:
173  typedef typename Super::EigenVector EigenVector;
174 
176  explicit Point(T val = static_cast<T>(0)) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) : Super(val) {}
177 
178  Point(Point const &) = default;
179  Point(Point &&) = default;
180  ~Point() = default;
181 
182  Point &operator=(Point const &) = default;
183  Point &operator=(Point &&) = default;
184 
192  template <typename U>
193  explicit Point(Point<U, N> const &other) noexcept(IS_NOTHROW_CONVERTIBLE<T, U>);
194 
196  explicit Point(EigenVector const &vector) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) : Super(vector) {}
197 
200  : Super(other.asEigen()) {}
201 
202  void swap(Point &other) noexcept { this->_swap(other); }
203 };
204 
210 template <typename T>
211 class Point<T, 2> : public PointBase<T, 2> {
212  typedef PointBase<T, 2> Super;
213 
214 public:
215  typedef typename Super::EigenVector EigenVector;
216 
218  explicit Point(T val = static_cast<T>(0)) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) : Super(val) {}
219 
220  Point(Point const &) = default;
221  Point(Point &&) = default;
222  ~Point() = default;
223 
224  Point &operator=(Point const &) = default;
225  Point &operator=(Point &&) = default;
226 
234  template <typename U>
235  explicit Point(Point<U, 2> const &other) noexcept(IS_NOTHROW_CONVERTIBLE<T, U>);
236 
238  explicit Point(EigenVector const &vector) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) : Super(vector) {}
239 
242  : Super(other.asEigen()) {}
243 
245  explicit Point(T x, T y) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) : Super(EigenVector(x, y)) {}
246 
248  explicit Point(T const xy[2]) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
249  : Super(EigenVector(xy[0], xy[1])) {}
250 
253  : Super(EigenVector(xy.first, xy.second)) {}
254 
257  : Super(EigenVector(std::get<0>(xy), std::get<1>(xy))) {}
258 
259  void swap(Point &other) noexcept { this->_swap(other); }
260 };
261 
267 template <typename T>
268 class Point<T, 3> : public PointBase<T, 3> {
269  typedef PointBase<T, 3> Super;
270 
271 public:
272  typedef typename Super::EigenVector EigenVector;
273 
275  explicit Point(T val = static_cast<T>(0)) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) : Super(val) {}
276 
277  Point(Point const &) = default;
278  Point(Point &&) = default;
279  ~Point() = default;
280 
281  Point &operator=(Point const &) = default;
282  Point &operator=(Point &&) = default;
283 
291  template <typename U>
292  explicit Point(Point<U, 3> const &other) noexcept(IS_NOTHROW_CONVERTIBLE<T, U>);
293 
295  explicit Point(EigenVector const &vector) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE) : Super(vector) {}
296 
299  : Super(other.asEigen()) {}
300 
302  explicit Point(T x, T y, T z) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
303  : Super(EigenVector(x, y, z)) {}
304 
306  explicit Point(T const xyz[3]) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
307  : Super(EigenVector(xyz[0], xyz[1], xyz[2])) {}
308 
311  : Super(EigenVector(std::get<0>(xyz), std::get<1>(xyz), std::get<2>(xyz))) {}
312 
313  void swap(Point &other) noexcept { this->_swap(other); }
314 };
315 
316 // Hash functions
317 template <typename T, int N>
318 std::size_t hash_value(Point<T, N> const &point) noexcept;
319 
326 
327 template <int N>
328 Point<double, N> operator+(Point<double, N> const &lhs, Extent<int, N> const &rhs) noexcept {
329  return lhs + Extent<double, N>(rhs);
330 }
331 
332 template <int N>
333 Point<double, N> operator+(Extent<int, N> const &rhs, Point<double, N> const &lhs) noexcept {
334  return Point<double, N>(lhs) + rhs;
335 }
336 
337 template <int N>
339  return lhs += Extent<double, N>(rhs);
340 }
341 
342 template <int N>
343 Point<double, N> operator+(Point<int, N> const &lhs, Extent<double, N> const &rhs) noexcept {
344  return Point<double, N>(lhs) + rhs;
345 }
346 
347 template <int N>
348 Point<double, N> operator-(Point<double, N> const &lhs, Extent<int, N> const &rhs) noexcept {
349  return lhs - Extent<double, N>(rhs);
350 }
351 
352 template <int N>
354  return lhs -= Extent<double, N>(rhs);
355 }
356 
357 template <int N>
358 Point<double, N> operator-(Point<int, N> const &lhs, Extent<double, N> const &rhs) noexcept {
359  return Point<double, N>(lhs) - rhs;
360 }
361 
362 template <int N>
363 Extent<double, N> operator-(Point<double, N> const &lhs, Point<int, N> const &rhs) noexcept {
364  return lhs - Point<double, N>(rhs);
365 }
366 
367 template <int N>
368 Extent<double, N> operator-(Point<int, N> const &lhs, Point<double, N> const &rhs) noexcept {
369  return Point<double, N>(lhs) - rhs;
370 }
371 
372 } // namespace geom
373 } // namespace lsst
374 
375 namespace std {
376 template <typename T, int N>
377 struct hash<lsst::geom::Point<T, N>> {
380  result_type operator()(argument_type const &x) const noexcept { return lsst::geom::hash_value(x); }
381 };
382 } // namespace std
383 
384 #endif
lsst::geom::CoordinateExpr
A boolean coordinate.
Definition: CoordinateExpr.h:50
y
int y
Definition: SpanSet.cc:49
lsst::geom::Point< T, 3 >::Point
Point(std::tuple< T, T, T > const &xyz) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Construct from std::tuple.
Definition: Point.h:310
lsst::geom::PointBase::ge
CoordinateExpr< N > ge(Point< T, N > const &other) const noexcept
Definition: Point.cc:111
std::string
STL class.
lsst::afw::table._match.second
second
Definition: _match.py:78
lsst::geom::Point::Point
Point(T val=static_cast< T >(0)) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Construct a Point with all elements set to the same scalar value.
Definition: Point.h:176
lsst::geom::PointBase::lt
CoordinateExpr< N > lt(Point< T, N > const &other) const noexcept
Definition: Point.cc:90
lsst::geom::operator+
constexpr Angle operator+(Angle a, Angle d) noexcept
Sum of two angles.
Definition: Angle.h:308
lsst::geom::Point< T, 2 >::EigenVector
Super::EigenVector EigenVector
Definition: Point.h:215
lsst::geom::operator+=
Extent< double, N > & operator+=(Extent< double, N > &lhs, Extent< int, N > const &rhs) noexcept
Definition: Extent.h:470
lsst::geom::Point< T, 2 >::Point
Point(Point const &)=default
lsst::geom::PointBase::gt
CoordinateExpr< N > gt(T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Definition: Point.h:93
lsst::geom::PointBase::operator-
Extent< T, N > operator-(Point< T, N > const &other) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Cast this object to an Extent of the same numeric type and dimensionality.
Definition: Point.h:107
std::pair
lsst::geom::PointBase::ne
CoordinateExpr< N > ne(T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Definition: Point.h:84
lsst::geom::Point< T, 2 >::Point
Point(std::tuple< T, T > const &xy) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Construct from std::tuple.
Definition: Point.h:256
lsst::geom::PointBase::scale
void scale(double factor) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Cast this object to an Extent of the same numeric type and dimensionality.
Definition: Point.h:136
lsst::geom::Point< T, 2 >::operator=
Point & operator=(Point &&)=default
lsst::afw::table._match.first
first
Definition: _match.py:76
lsst::geom::Point< T, 3 >::swap
void swap(Point &other) noexcept
Definition: Point.h:313
lsst::geom::PointBase::ge
CoordinateExpr< N > ge(T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Definition: Point.h:96
std::stringstream
STL class.
lsst::geom::Point::operator=
Point & operator=(Point const &)=default
lsst::geom::Point3I
Point< int, 3 > Point3I
Definition: Point.h:322
lsst::geom::Point< T, 3 >::operator=
Point & operator=(Point &&)=default
lsst::geom::PointBase::distanceSquared
double distanceSquared(PointBase< T, N > const &other) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Cast this object to an Extent of the same numeric type and dimensionality.
Definition: Point.h:138
lsst::geom::PointBase::PointBase
PointBase(Eigen::MatrixBase< Vector > const &vector)
Cast this object to an Extent of the same numeric type and dimensionality.
Definition: Point.h:160
std::tuple
lsst::geom::hash_value
std::size_t hash_value(Extent< T, N > const &extent) noexcept
Definition: Extent.cc:127
lsst::geom::operator-
constexpr Angle operator-(Angle a, Angle d) noexcept
Difference of two angles.
Definition: Angle.h:314
lsst::geom::Point< T, 2 >::Point
Point(T x, T y) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Explicit constructor from a pair of doubles.
Definition: Point.h:245
val
ImageT val
Definition: CR.cc:146
lsst::geom::Point2D
Point< double, 2 > Point2D
Definition: Point.h:324
std::hash< lsst::geom::Point< T, N > >::operator()
result_type operator()(argument_type const &x) const noexcept
Definition: Point.h:380
lsst::geom::Point::swap
void swap(Point &other) noexcept
Definition: Point.h:202
lsst::geom::Point< T, 2 >::~Point
~Point()=default
CoordinateBase.h
lsst::geom::PointBase::operator+=
Point< T, N > & operator+=(Extent< T, N > const &other) noexcept(Super::IS_ELEMENT_NOTHROW_ASSIGNABLE)
Cast this object to an Extent of the same numeric type and dimensionality.
Definition: Point.h:116
lsst::geom::PointBase::asExtent
Extent< T, N > asExtent() const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Cast this object to an Extent of the same numeric type and dimensionality.
Definition: Point.h:127
lsst::geom::all
bool all(CoordinateExpr< N > const &expr) noexcept
Return true if all elements are true.
Definition: CoordinateExpr.h:81
lsst::geom::Point< T, 2 >::Point
Point(T const xy[2]) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Construct from a two-element array.
Definition: Point.h:248
lsst::geom::Point< T, 3 >::Point
Point(Extent< T, 3 > const &other) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Explicit constructor from Extent.
Definition: Point.h:298
lsst::geom::Point::Point
Point(EigenVector const &vector) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Construct a Point from an Eigen vector.
Definition: Point.h:196
lsst::geom::Point< T, 3 >::Point
Point(T x, T y, T z) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Explicit constructor from a sequence of doubles.
Definition: Point.h:302
Extent.h
lsst::geom::PointBase::operator=
PointBase & operator=(PointBase &&)=default
lsst::geom::PointBase::le
CoordinateExpr< N > le(T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Definition: Point.h:90
lsst::geom::PointBase
Definition: Point.h:38
lsst::geom::Point::Point
Point(Extent< T, N > const &other) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Explicit constructor from Extent.
Definition: Point.h:199
lsst::geom::PointBase::operator=
PointBase & operator=(PointBase const &)=default
lsst::geom::Point::~Point
~Point()=default
lsst::geom::PointBase::eq
CoordinateExpr< N > eq(Point< T, N > const &other) const noexcept
Definition: Point.cc:76
lsst::geom::PointI
Point< int, 2 > PointI
Definition: Point.h:320
z
double z
Definition: Match.cc:44
x
double x
Definition: ChebyshevBoundedField.cc:277
lsst::geom::Point< T, 2 >::operator=
Point & operator=(Point const &)=default
other
ItemVariant const * other
Definition: Schema.cc:56
lsst::geom::Point< T, 2 >::Point
Point(Extent< T, 2 > const &other) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Explicit constructor from Extent.
Definition: Point.h:241
lsst::geom::PointBase::operator!=
bool operator!=(Point< T, N > const &other) const noexcept
Standard inequality comparison.
Definition: Point.h:60
lsst::geom::any
bool any(CoordinateExpr< N > const &expr) noexcept
Return true if any elements are true.
Definition: CoordinateExpr.h:89
lsst::geom::Point< T, 3 >::Point
Point(Point &&)=default
lsst::geom::PointBase::PointBase
PointBase(PointBase &&)=default
lsst::geom::Point< T, 2 >::Point
Point(std::pair< T, T > const &xy) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Construct from a std::pair.
Definition: Point.h:252
lsst::geom::Point< T, 3 >::EigenVector
Super::EigenVector EigenVector
Definition: Point.h:272
lsst::geom::operator-=
Extent< double, N > & operator-=(Extent< double, N > &lhs, Extent< int, N > const &rhs) noexcept
Definition: Extent.h:480
lsst::geom::PointBase::PointBase
PointBase(T val=static_cast< T >(0)) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Cast this object to an Extent of the same numeric type and dimensionality.
Definition: Point.h:157
lsst::geom::Point< T, 3 >::Point
Point(T val=static_cast< T >(0)) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Construct a Point with all elements set to the same scalar value.
Definition: Point.h:275
lsst::geom::PointBase::toString
std::string toString() const
Cast this object to an Extent of the same numeric type and dimensionality.
Definition: Point.h:143
lsst::geom::Extent< T, 3 >
A coordinate class intended to represent offsets and dimensions (3-d specialization).
Definition: Extent.h:307
lsst::geom::CoordinateBase< Point< T, N >, T, N >::_vector
EigenVector _vector
Definition: CoordinateBase.h:109
lsst::geom::PointBase::operator-
Point< T, N > operator-(Extent< T, N > const &other) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Cast this object to an Extent of the same numeric type and dimensionality.
Definition: Point.h:113
lsst::geom::Point< T, 3 >::~Point
~Point()=default
lsst
A base class for image defects.
Definition: imageAlgorithm.dox:1
lsst::geom::Point::operator=
Point & operator=(Point &&)=default
lsst::geom::Point< T, 2 >::swap
void swap(Point &other) noexcept
Definition: Point.h:259
lsst::geom::PointBase::operator==
bool operator==(Point< T, N > const &other) const noexcept
Standard equality comparison.
Definition: Point.h:53
lsst::geom::CoordinateBase< Point< T, N >, T, N >::EigenVector
Eigen::Matrix< T, N, 1, Eigen::DontAlign > EigenVector
Definition: CoordinateBase.h:59
lsst::geom
Definition: AffineTransform.h:36
lsst::geom::Point::Point
Point(Point &&)=default
lsst::geom::Point< T, 3 >::Point
Point(EigenVector const &vector) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Construct a Point from an Eigen vector.
Definition: Point.h:295
lsst::geom::CoordinateBase
A CRTP base class for coordinate objects.
Definition: CoordinateBase.h:54
std
STL namespace.
CoordinateExpr.h
lsst::geom::Point
A coordinate class intended to represent absolute positions.
Definition: CoordinateBase.h:39
lsst::geom::PointBase::operator+
Point< T, N > operator+(Extent< T, N > const &other) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Cast this object to an Extent of the same numeric type and dimensionality.
Definition: Point.h:110
lsst::geom::Point3D
Point< double, 3 > Point3D
Definition: Point.h:325
lsst::geom::Point2I
Point< int, 2 > Point2I
Definition: Point.h:321
lsst::geom::PointBase::shift
void shift(Extent< T, N > const &offset) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Shift the point by the given offset.
Definition: Point.h:132
lsst::geom::PointBase::ne
CoordinateExpr< N > ne(Point< T, N > const &other) const noexcept
Definition: Point.cc:83
lsst::geom::Point< T, 3 >::operator=
Point & operator=(Point const &)=default
lsst::geom::PointBase::gt
CoordinateExpr< N > gt(Point< T, N > const &other) const noexcept
Definition: Point.cc:104
lsst::geom::asEigen
Eigen::Vector3d asEigen(sphgeom::Vector3d const &vector) noexcept
Definition: sphgeomUtils.h:36
std::stringstream::str
T str(T... args)
std::size_t
lsst::geom::Point< T, 3 >::Point
Point(Point const &)=default
lsst::geom::Point< T, 2 >::Point
Point(Point &&)=default
lsst::geom::Point< T, 3 >::Point
Point(T const xyz[3]) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Construct from a two-element array.
Definition: Point.h:306
lsst::geom::CoordinateBase< Point< T, N >, T, N >::IS_ELEMENT_NOTHROW_COPYABLE
static constexpr bool IS_ELEMENT_NOTHROW_COPYABLE
Definition: CoordinateBase.h:60
lsst::geom::CoordinateBase< Point< T, N >, T, N >::asEigen
EigenVector const & asEigen() const noexcept(IS_ELEMENT_NOTHROW_COPYABLE)
Return a fixed-size Eigen representation of the coordinate object.
Definition: CoordinateBase.h:89
lsst::geom::Point::Point
Point(Point const &)=default
lsst::geom::PointBase::operator-=
Point< T, N > & operator-=(Extent< T, N > const &other) noexcept(Super::IS_ELEMENT_NOTHROW_ASSIGNABLE)
Cast this object to an Extent of the same numeric type and dimensionality.
Definition: Point.h:120
lsst::geom::PointD
Point< double, 2 > PointD
Definition: Point.h:323
lsst::geom::Extent
A coordinate class intended to represent offsets and dimensions.
Definition: CoordinateBase.h:41
lsst::geom::Point< T, 2 >::Point
Point(EigenVector const &vector) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Construct a Point from an Eigen vector.
Definition: Point.h:238
lsst::geom::Extent< T, 2 >
A coordinate class intended to represent offsets and dimensions (2-d specialization).
Definition: Extent.h:254
lsst::geom::PointBase::PointBase
PointBase(PointBase const &)=default
lsst::geom::PointBase::lt
CoordinateExpr< N > lt(T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Definition: Point.h:87
lsst::geom::PointBase::le
CoordinateExpr< N > le(Point< T, N > const &other) const noexcept
Definition: Point.cc:97
lsst::geom::PointBase::~PointBase
~PointBase()=default
lsst::geom::Point< T, 2 >::Point
Point(T val=static_cast< T >(0)) noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Construct a Point with all elements set to the same scalar value.
Definition: Point.h:218
lsst::geom::CoordinateBase< Point< T, N >, T, N >::IS_ELEMENT_NOTHROW_ASSIGNABLE
static constexpr bool IS_ELEMENT_NOTHROW_ASSIGNABLE
Definition: CoordinateBase.h:61
std::hash
lsst::geom::Point::EigenVector
Super::EigenVector EigenVector
Definition: Point.h:173
lsst::geom::PointBase::eq
CoordinateExpr< N > eq(T scalar) const noexcept(Super::IS_ELEMENT_NOTHROW_COPYABLE)
Definition: Point.h:81