Loading [MathJax]/extensions/tex2jax.js
LSST Applications g04a91732dc+a777afbe81,g07dc498a13+7e3c5f68a2,g12483e3c20+0145ec33cd,g1409bbee79+7e3c5f68a2,g1a7e361dbc+7e3c5f68a2,g1fd858c14a+9f35e23ec3,g31cf31e263+9c59251d59,g35bb328faa+fcb1d3bbc8,g3ad4f90e5c+0145ec33cd,g3bd4b5ce2c+9e43d17133,g4e0f332c67+5d362be553,g53246c7159+fcb1d3bbc8,g5477a8d5ce+d2270fb7b7,g60b5630c4e+0145ec33cd,g623d845a50+0145ec33cd,g6f0c2978f1+a406a63c6f,g75b6c65c88+d54b601591,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g7b71ed6315+fcb1d3bbc8,g8852436030+4639f750a5,g89139ef638+7e3c5f68a2,g9125e01d80+fcb1d3bbc8,g95236ca021+f7a31438ed,g989de1cb63+7e3c5f68a2,g9f33ca652e+2d6fa11d35,gaaedd4e678+7e3c5f68a2,gabe3b4be73+1e0a283bba,gb1101e3267+4a428ef779,gb4a253aaf5+0122250889,gb58c049af0+f03b321e39,gc99c83e5f0+76d20ab76d,gcf25f946ba+4639f750a5,gd0fa69b896+890c3b4faa,gd6cbbdb0b4+c8606af20c,gde0f65d7ad+c2b4c879fb,ge278dab8ac+932305ba37,gfba249425e+fcb1d3bbc8,w.2025.07
LSST Data Management Base Package
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
aggregates.h
Go to the documentation of this file.
1// -*- lsst-c++ -*-
2/*
3 * LSST Data Management System
4 * Copyright 2008-2014 LSST Corporation.
5 *
6 * This product includes software developed by the
7 * LSST Project (http://www.lsst.org/).
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the LSST License Statement and
20 * the GNU General Public License along with this program. If not,
21 * see <http://www.lsstcorp.org/LegalNotices/>.
22 */
23#ifndef AFW_TABLE_aggregates_h_INCLUDED
24#define AFW_TABLE_aggregates_h_INCLUDED
25
27
30#include "lsst/geom.h"
31
32namespace lsst {
33namespace afw {
34namespace geom {
35
36namespace ellipses {
37
38class Quadrupole;
39
40} // namespace ellipses
41} // namespace geom
42
43namespace table {
44
45template <typename T, int N>
50template <typename T>
51class PointKey : public FunctorKey<lsst::geom::Point<T, 2> > {
52public:
62 static PointKey addFields(Schema& schema, std::string const& name, std::string const& doc,
63 std::string const& unit);
64
66 PointKey() noexcept : _x(), _y() {}
67
69 PointKey(Key<T> const& x, Key<T> const& y) noexcept : _x(x), _y(y) {}
70
71 PointKey(PointKey const&) noexcept = default;
72 PointKey(PointKey&&) noexcept = default;
73 PointKey& operator=(PointKey const&) noexcept = default;
74 PointKey& operator=(PointKey&&) noexcept = default;
75 ~PointKey() noexcept override = default;
76
85 PointKey(SubSchema const& s) : _x(s["x"]), _y(s["y"]) {}
86
88 lsst::geom::Point<T, 2> get(BaseRecord const& record) const override;
89
91 void set(BaseRecord& record, lsst::geom::Point<T, 2> const& value) const override;
92
94
95 bool operator==(PointKey<T> const& other) const noexcept { return _x == other._x && _y == other._y; }
96 bool operator!=(PointKey<T> const& other) const noexcept { return !(*this == other); }
98
100 std::size_t hash_value() const noexcept {
101 // Completely arbitrary seed
102 return cpputils::hashCombine(17, _x, _y);
103 }
104
106 bool isValid() const noexcept { return _x.isValid() && _y.isValid(); }
107
109 Key<T> getX() const noexcept { return _x; }
110
112 Key<T> getY() const noexcept { return _y; }
113
114private:
115 Key<T> _x;
116 Key<T> _y;
117};
118
121
125template <typename T>
126class Point3Key : public FunctorKey<lsst::geom::Point<T, 3> > {
127public:
137 static Point3Key addFields(Schema& schema, std::string const& name, std::string const& doc,
138 std::string const& unit);
139
141 Point3Key() noexcept : _x(), _y(), _z() {}
142
144 Point3Key(Key<T> const& x, Key<T> const& y, Key<T> const& z) noexcept : _x(x), _y(y), _z(z) {}
145
146 Point3Key(Point3Key const&) noexcept = default;
147 Point3Key(Point3Key&&) noexcept = default;
148 Point3Key& operator=(Point3Key const&) noexcept = default;
149 Point3Key& operator=(Point3Key&&) noexcept = default;
150 ~Point3Key() noexcept override = default;
151
160 Point3Key(SubSchema const& s) : _x(s["x"]), _y(s["y"]), _z(s["z"]) {}
161
163 lsst::geom::Point<T, 3> get(BaseRecord const& record) const override;
164
166 void set(BaseRecord& record, lsst::geom::Point<T, 3> const& value) const override;
167
169
170 bool operator==(Point3Key<T> const& other) const noexcept {
171 return _x == other._x && _y == other._y && _z == other._z; }
172 bool operator!=(Point3Key<T> const& other) const noexcept { return !(*this == other); }
174
176 std::size_t hash_value() const noexcept {
177 // Completely arbitrary seed
178 return cpputils::hashCombine(137, _x, _y, _z);
179 }
180
182 bool isValid() const noexcept { return _x.isValid() && _y.isValid() && _z.isValid(); }
183
185 Key<T> getX() const noexcept { return _x; }
186
188 Key<T> getY() const noexcept { return _y; }
189
191 Key<T> getZ() const noexcept { return _z; }
192
193private:
194 Key<T> _x;
195 Key<T> _y;
196 Key<T> _z;
197};
198
201
207template <typename Box>
208class BoxKey : public FunctorKey<Box> {
209public:
211 using Element = typename Box::Element;
212
226 static BoxKey addFields(Schema& schema, std::string const& name, std::string const& doc,
227 std::string const& unit);
228
230 BoxKey() noexcept = default;
231
233 BoxKey(PointKey<Element> const& min, PointKey<Element> const& max) noexcept : _min(min), _max(max) {}
234
243 BoxKey(SubSchema const& s) : _min(s["min"]), _max(s["max"]) {}
244
245 BoxKey(BoxKey const&) noexcept = default;
246 BoxKey(BoxKey&&) noexcept = default;
247 BoxKey& operator=(BoxKey const&) noexcept = default;
248 BoxKey& operator=(BoxKey&&) noexcept = default;
249 ~BoxKey() noexcept override = default;
250
252 std::size_t hash_value() const noexcept {
253 // Completely arbitrary seed
254 return cpputils::hashCombine(17, _min, _max);
255 }
256
258 Box get(BaseRecord const& record) const override;
259
261 void set(BaseRecord& record, Box const& value) const override;
262
264
265 bool operator==(BoxKey const& other) const noexcept { return _min == other._min && _max == other._max; }
266 bool operator!=(BoxKey const& other) const noexcept { return !(*this == other); }
268
270 bool isValid() const noexcept { return _min.isValid() && _max.isValid(); }
271
273 PointKey<Element> getMin() const noexcept { return _min; }
274
276 PointKey<Element> getMax() const noexcept { return _max; }
277
278private:
281};
282
285
292class CoordKey : public FunctorKey<lsst::geom::SpherePoint> {
293public:
302 static CoordKey addFields(afw::table::Schema& schema, std::string const& name, std::string const& doc);
303
305 static ErrorKey getErrorKey(Schema const & schema);
306
307 static ErrorKey addErrorFields(Schema & schema);
308
310 CoordKey() noexcept : _ra(), _dec() {}
311
314 : _ra(ra), _dec(dec) {}
315
324 CoordKey(SubSchema const& s) : _ra(s["ra"]), _dec(s["dec"]) {}
325
326 CoordKey(CoordKey const&) noexcept = default;
327 CoordKey(CoordKey&&) noexcept = default;
328 CoordKey& operator=(CoordKey const&) noexcept = default;
329 CoordKey& operator=(CoordKey&&) noexcept = default;
330 ~CoordKey() noexcept override = default;
331
333 lsst::geom::SpherePoint get(BaseRecord const& record) const override;
334
336 void set(BaseRecord& record, lsst::geom::SpherePoint const& value) const override;
337
339
340 bool operator==(CoordKey const& other) const noexcept { return _ra == other._ra && _dec == other._dec; }
341 bool operator!=(CoordKey const& other) const noexcept { return !(*this == other); }
343
345 std::size_t hash_value() const noexcept {
346 // Completely arbitrary seed
347 return cpputils::hashCombine(17, _ra, _dec);
348 }
349
350 bool isValid() const noexcept { return _ra.isValid() && _dec.isValid(); }
351
353
354 Key<lsst::geom::Angle> getRa() const noexcept { return _ra; }
355 Key<lsst::geom::Angle> getDec() const noexcept { return _dec; }
357
358private:
361};
362
365
369class QuadrupoleKey : public FunctorKey<lsst::afw::geom::ellipses::Quadrupole> {
370public:
382 static QuadrupoleKey addFields(Schema& schema, std::string const& name, std::string const& doc,
384
386 QuadrupoleKey() noexcept : _ixx(), _iyy(), _ixy() {}
387
389 QuadrupoleKey(Key<double> const& ixx, Key<double> const& iyy, Key<double> const& ixy) noexcept
390 : _ixx(ixx), _iyy(iyy), _ixy(ixy) {}
391
400 QuadrupoleKey(SubSchema const& s) : _ixx(s["xx"]), _iyy(s["yy"]), _ixy(s["xy"]) {}
401
402 QuadrupoleKey(QuadrupoleKey const&) noexcept = default;
403 QuadrupoleKey(QuadrupoleKey&&) noexcept = default;
404 QuadrupoleKey& operator=(QuadrupoleKey const&) noexcept = default;
405 QuadrupoleKey& operator=(QuadrupoleKey&&) noexcept = default;
406 ~QuadrupoleKey() noexcept override = default;
407
409 geom::ellipses::Quadrupole get(BaseRecord const& record) const override;
410
412 void set(BaseRecord& record, geom::ellipses::Quadrupole const& value) const override;
413
415
416 bool operator==(QuadrupoleKey const& other) const noexcept {
417 return _ixx == other._ixx && _iyy == other._iyy && _ixy == other._ixy;
418 }
419 bool operator!=(QuadrupoleKey const& other) const noexcept { return !(*this == other); }
421
423 std::size_t hash_value() const noexcept {
424 // Completely arbitrary seed
425 return cpputils::hashCombine(17, _ixx, _iyy, _ixy);
426 }
427
429 bool isValid() const noexcept { return _ixx.isValid() && _iyy.isValid() && _ixy.isValid(); }
430
432
433 Key<double> getIxx() const noexcept { return _ixx; }
434 Key<double> getIyy() const noexcept { return _iyy; }
435 Key<double> getIxy() const noexcept { return _ixy; }
437
438private:
439 Key<double> _ixx;
440 Key<double> _iyy;
441 Key<double> _ixy;
442};
443
447class EllipseKey : public FunctorKey<lsst::afw::geom::ellipses::Ellipse> {
448public:
459 static EllipseKey addFields(Schema& schema, std::string const& name, std::string const& doc,
460 std::string const& unit);
461
463 EllipseKey() noexcept : _qKey(), _pKey() {}
464
466 EllipseKey(QuadrupoleKey const& qKey, PointKey<double> const& pKey) noexcept : _qKey(qKey), _pKey(pKey) {}
467
476 EllipseKey(SubSchema const& s) : _qKey(s), _pKey(s) {}
477
478 EllipseKey(EllipseKey const&) noexcept = default;
479 EllipseKey(EllipseKey&&) noexcept = default;
480 EllipseKey& operator=(EllipseKey const&) noexcept = default;
481 EllipseKey& operator=(EllipseKey&&) noexcept = default;
482 ~EllipseKey() noexcept override = default;
483
485 geom::ellipses::Ellipse get(BaseRecord const& record) const override;
486
488 void set(BaseRecord& record, geom::ellipses::Ellipse const& value) const override;
489
491
492 bool operator==(EllipseKey const& other) const noexcept {
493 return _qKey == other._qKey && _pKey == other._pKey;
494 }
495 bool operator!=(EllipseKey const& other) const noexcept { return !(*this == other); }
497
499 std::size_t hash_value() const noexcept {
500 // Completely arbitrary seed
501 return cpputils::hashCombine(17, _qKey, _pKey);
502 }
503
505 bool isValid() const noexcept { return _qKey.isValid() && _pKey.isValid(); }
506
508
509 QuadrupoleKey getCore() const noexcept { return _qKey; }
510 PointKey<double> getCenter() const noexcept { return _pKey; }
512
513private:
514 QuadrupoleKey _qKey;
515 PointKey<double> _pKey;
516};
517
518template <typename T, int N>
519class CovarianceMatrixKey : public FunctorKey<Eigen::Matrix<T, N, N> > {
520public:
524
538 static CovarianceMatrixKey addFields(Schema& schema, std::string const& prefix, NameArray const& names,
539 std::string const& unit, bool diagonalOnly = false);
540
555 static CovarianceMatrixKey addFields(Schema& schema, std::string const& prefix, NameArray const& names,
556 NameArray const& units, bool diagonalOnly = false);
557
560
579 explicit CovarianceMatrixKey(ErrKeyArray const& err,
581
593 CovarianceMatrixKey(SubSchema const& s, NameArray const& names);
594
599 ~CovarianceMatrixKey() noexcept override;
600
602 Eigen::Matrix<T, N, N> get(BaseRecord const& record) const override;
603
605 void set(BaseRecord& record, Eigen::Matrix<T, N, N> const& value) const override;
606
608 T getElement(BaseRecord const& record, int i, int j) const;
609
611 void setElement(BaseRecord& record, int i, int j, T value) const;
612
619 bool isValid() const noexcept;
620
622
623 bool operator==(CovarianceMatrixKey const& other) const noexcept;
624 bool operator!=(CovarianceMatrixKey const& other) const noexcept { return !(*this == other); }
626
628 std::size_t hash_value() const noexcept;
629
630private:
631 ErrKeyArray _err;
633};
634
635class CoordErrKey : public CovarianceMatrixKey<float, 2> {
636public:
640
641 static CoordErrKey addFields(Schema& schema, std::string const& name, std::string const& unit,
642 bool diagonalOnly = false);
643 static CoordErrKey addFields(Schema& schema, std::string const& name, NameArray const& units,
644 bool diagonalOnly = false);
645
647
648 explicit CoordErrKey(ErrKeyArray const& err,
650 CoordErrKey(SubSchema const& s, std::string const& name);
651private:
652 ErrKeyArray _err;
654};
655} // namespace table
656} // namespace afw
657} // namespace lsst
658
659namespace std {
660template <typename T>
661struct hash<lsst::afw::table::PointKey<T>> {
664 size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
665};
666
667template <typename T>
668struct hash<lsst::afw::table::BoxKey<T>> {
671 size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
672};
673
674template <>
675struct hash<lsst::afw::table::CoordKey> {
678 size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
679};
680
681template <>
682struct hash<lsst::afw::table::QuadrupoleKey> {
685 size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
686};
687
688template <>
689struct hash<lsst::afw::table::EllipseKey> {
692 size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
693};
694
695template <typename T, int N>
696struct hash<lsst::afw::table::CovarianceMatrixKey<T, N>> {
699 size_t operator()(argument_type const& obj) const noexcept { return obj.hash_value(); }
700};
701} // namespace std
702
703#endif // !AFW_TABLE_aggregates_h_INCLUDED
An ellipse core with quadrupole moments as parameters.
Definition Quadrupole.h:47
Base class for all records.
Definition BaseRecord.h:31
A FunctorKey used to get or set a lsst::geom::Box2I or Box2D from a (min, max) pair of Point3Keys.
Definition aggregates.h:208
BoxKey(BoxKey const &) noexcept=default
bool operator!=(BoxKey const &other) const noexcept
Definition aggregates.h:266
bool isValid() const noexcept
Return True if both the min and max PointKeys are valid.
Definition aggregates.h:270
std::size_t hash_value() const noexcept
Definition aggregates.h:252
Box get(BaseRecord const &record) const override
Get a Box from the given record.
Definition aggregates.cc:94
static BoxKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit)
Add _min_x, _min_y, _max_x, _max_y fields to a Schema, and return a BoxKey that points to them.
Definition aggregates.cc:86
PointKey< Element > getMin() const noexcept
Return the underlying min PointKey.
Definition aggregates.h:273
PointKey< Element > getMax() const noexcept
Return the underlying max PointKey.
Definition aggregates.h:276
typename Box::Element Element
Type of coordinate elements (i.e. int or double).
Definition aggregates.h:211
BoxKey() noexcept=default
Default constructor; instance will not be usable unless subsequently assigned to.
bool operator==(BoxKey const &other) const noexcept
Compare the FunctorKey for equality with another, using the underlying x and y Keys.
Definition aggregates.h:265
void set(BaseRecord &record, Box const &value) const override
Set a Box in the given record.
Definition aggregates.cc:99
BoxKey(BoxKey &&) noexcept=default
BoxKey(SubSchema const &s)
Construct from a subschema, assuming _min_x, _max_x, _min_y, _max_y subfields.
Definition aggregates.h:243
CoordErrKey(ErrKeyArray const &err, CovarianceKeyArray const &cov=CovarianceKeyArray())
static CoordErrKey addFields(Schema &schema, std::string const &name, std::string const &unit, bool diagonalOnly=false)
std::vector< Key< float > > ErrKeyArray
Definition aggregates.h:637
std::vector< Key< float > > CovarianceKeyArray
Definition aggregates.h:638
std::vector< std::string > NameArray
Definition aggregates.h:639
CoordErrKey(SubSchema const &s, std::string const &name)
static CoordErrKey addFields(Schema &schema, std::string const &name, NameArray const &units, bool diagonalOnly=false)
A FunctorKey used to get or set celestial coordinates from a pair of lsst::geom::Angle keys.
Definition aggregates.h:292
bool operator!=(CoordKey const &other) const noexcept
Definition aggregates.h:341
CoordKey(Key< lsst::geom::Angle > const &ra, Key< lsst::geom::Angle > const &dec) noexcept
Construct from a pair of Keys.
Definition aggregates.h:313
CovarianceMatrixKey< float, 2 > ErrorKey
Definition aggregates.h:304
static CoordKey addFields(afw::table::Schema &schema, std::string const &name, std::string const &doc)
Add a pair of _ra, _dec fields to a Schema, and return a CoordKey that points to them.
CoordKey(SubSchema const &s)
Construct from a subschema, assuming ra and dec subfields.
Definition aggregates.h:324
CoordKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Definition aggregates.h:310
void set(BaseRecord &record, lsst::geom::SpherePoint const &value) const override
Set an lsst::geom::SpherePoint in the given record.
Key< lsst::geom::Angle > getDec() const noexcept
Definition aggregates.h:355
static ErrorKey addErrorFields(Schema &schema)
Key< lsst::geom::Angle > getRa() const noexcept
Return a constituent Key.
Definition aggregates.h:354
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition aggregates.h:345
static ErrorKey getErrorKey(Schema const &schema)
CoordKey(CoordKey &&) noexcept=default
bool isValid() const noexcept
Definition aggregates.h:350
CoordKey(CoordKey const &) noexcept=default
lsst::geom::SpherePoint get(BaseRecord const &record) const override
Get an lsst::geom::SpherePoint from the given record.
CovarianceMatrixKey(ErrKeyArray const &err, CovarianceKeyArray const &cov=CovarianceKeyArray())
Construct a from arrays of per-element Keys.
std::vector< Key< float > > CovarianceKeyArray
Definition aggregates.h:522
static CovarianceMatrixKey addFields(Schema &schema, std::string const &prefix, NameArray const &names, NameArray const &units, bool diagonalOnly=false)
Add covariance matrix fields to a Schema, and return a CovarianceMatrixKey to manage them.
CovarianceMatrixKey()
Construct an invalid instance; must assign before subsequent use.
CovarianceMatrixKey(CovarianceMatrixKey const &)
Eigen::Matrix< float, N, N > get(BaseRecord const &record) const override
void setElement(BaseRecord &record, int i, int j, float value) const
CovarianceMatrixKey & operator=(CovarianceMatrixKey &&)
float getElement(BaseRecord const &record, int i, int j) const
void set(BaseRecord &record, Eigen::Matrix< float, N, N > const &value) const override
CovarianceMatrixKey(SubSchema const &s, NameArray const &names)
Construct from a subschema and an array of names for each parameter of the matrix.
~CovarianceMatrixKey() noexcept override
CovarianceMatrixKey(CovarianceMatrixKey &&)
static CovarianceMatrixKey addFields(Schema &schema, std::string const &prefix, NameArray const &names, std::string const &unit, bool diagonalOnly=false)
Add covariance matrix fields to a Schema, and return a CovarianceMatrixKey to manage them.
std::size_t hash_value() const noexcept
Return a hash of this object.
CovarianceMatrixKey & operator=(CovarianceMatrixKey const &)
A FunctorKey used to get or set a geom::ellipses::Ellipse from an (xx,yy,xy,x,y) tuple of Keys.
Definition aggregates.h:447
void set(BaseRecord &record, geom::ellipses::Ellipse const &value) const override
Set an Ellipse in the given record.
EllipseKey(EllipseKey &&) noexcept=default
static EllipseKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit)
Add a set of _xx, _yy, _xy, _x, _y fields to a Schema, and return an EllipseKey that points to them.
PointKey< double > getCenter() const noexcept
Definition aggregates.h:510
geom::ellipses::Ellipse get(BaseRecord const &record) const override
Get an Ellipse from the given record.
EllipseKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Definition aggregates.h:463
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition aggregates.h:499
bool operator!=(EllipseKey const &other) const noexcept
Definition aggregates.h:495
EllipseKey(EllipseKey const &) noexcept=default
EllipseKey(SubSchema const &s)
Construct from a subschema, assuming (xx, yy, xy, x, y) subfields.
Definition aggregates.h:476
QuadrupoleKey getCore() const noexcept
Return constituent FunctorKeys.
Definition aggregates.h:509
bool isValid() const noexcept
Return True if all the constituent Keys are valid.
Definition aggregates.h:505
EllipseKey(QuadrupoleKey const &qKey, PointKey< double > const &pKey) noexcept
Construct from individual Keys.
Definition aggregates.h:466
Convenience base class that combines the OutputFunctorKey and InputFunctorKey.
Definition FunctorKey.h:74
A class used as a handle to a particular field in a table.
Definition Key.h:53
A FunctorKey used to get or set a lsst::geom::Point3 from an (x,y,z) tuple of int or double Keys.
Definition aggregates.h:126
Key< T > getX() const noexcept
Return the underlying x Key.
Definition aggregates.h:185
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition aggregates.h:176
bool operator!=(Point3Key< T > const &other) const noexcept
Definition aggregates.h:172
Point3Key(Point3Key const &) noexcept=default
void set(BaseRecord &record, lsst::geom::Point< T, 3 > const &value) const override
Set a Point in the given record.
Definition aggregates.cc:74
Point3Key(Point3Key &&) noexcept=default
bool operator==(Point3Key< T > const &other) const noexcept
Compare the FunctorKey for equality with another, using the underlying x, y, and z Keys.
Definition aggregates.h:170
static Point3Key addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit)
Add a pair of _x, _y, _z fields to a Schema, and return a Point3Key that points to them.
Definition aggregates.cc:60
Key< T > getY() const noexcept
Return the underlying y Key.
Definition aggregates.h:188
Point3Key() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Definition aggregates.h:141
Key< T > getZ() const noexcept
Return the underlying y Key.
Definition aggregates.h:191
lsst::geom::Point< T, 3 > get(BaseRecord const &record) const override
Get a Point from the given record.
Definition aggregates.cc:69
Point3Key(Key< T > const &x, Key< T > const &y, Key< T > const &z) noexcept
Construct from a pair of Keys.
Definition aggregates.h:144
bool isValid() const noexcept
Return True if all of the x, y, and z Keys are valid.
Definition aggregates.h:182
A FunctorKey used to get or set a lsst::geom::Point from an (x,y) pair of int or double Keys.
Definition aggregates.h:51
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition aggregates.h:100
PointKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Definition aggregates.h:66
Key< T > getY() const noexcept
Return the underlying y Key.
Definition aggregates.h:112
PointKey(PointKey const &) noexcept=default
void set(BaseRecord &record, lsst::geom::Point< T, 2 > const &value) const override
Set a Point in the given record.
Definition aggregates.cc:49
PointKey(PointKey &&) noexcept=default
bool operator!=(PointKey< T > const &other) const noexcept
Definition aggregates.h:96
static PointKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit)
Add a pair of _x, _y fields to a Schema, and return a PointKey that points to them.
Definition aggregates.cc:36
PointKey(Key< T > const &x, Key< T > const &y) noexcept
Construct from a pair of Keys.
Definition aggregates.h:69
bool operator==(PointKey< T > const &other) const noexcept
Compare the FunctorKey for equality with another, using the underlying x and y Keys.
Definition aggregates.h:95
Key< T > getX() const noexcept
Return the underlying x Key.
Definition aggregates.h:109
bool isValid() const noexcept
Return True if both the x and y Keys are valid.
Definition aggregates.h:106
lsst::geom::Point< T, 2 > get(BaseRecord const &record) const override
Get a Point from the given record.
Definition aggregates.cc:44
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys.
Definition aggregates.h:369
std::size_t hash_value() const noexcept
Return a hash of this object.
Definition aggregates.h:423
Key< double > getIxx() const noexcept
Return a constituent Key.
Definition aggregates.h:433
geom::ellipses::Quadrupole get(BaseRecord const &record) const override
Get a Quadrupole from the given record.
QuadrupoleKey() noexcept
Default constructor; instance will not be usable unless subsequently assigned to.
Definition aggregates.h:386
QuadrupoleKey(SubSchema const &s)
Construct from a subschema with appropriate subfields.
Definition aggregates.h:400
QuadrupoleKey(QuadrupoleKey const &) noexcept=default
Key< double > getIxy() const noexcept
Definition aggregates.h:435
Key< double > getIyy() const noexcept
Definition aggregates.h:434
void set(BaseRecord &record, geom::ellipses::Quadrupole const &value) const override
Set a Quadrupole in the given record.
static QuadrupoleKey addFields(Schema &schema, std::string const &name, std::string const &doc, CoordinateType coordType=CoordinateType::PIXEL)
Add a set of quadrupole subfields to a schema and return a QuadrupoleKey that points to them.
QuadrupoleKey(Key< double > const &ixx, Key< double > const &iyy, Key< double > const &ixy) noexcept
Construct from individual Keys.
Definition aggregates.h:389
QuadrupoleKey(QuadrupoleKey &&) noexcept=default
bool operator!=(QuadrupoleKey const &other) const noexcept
Definition aggregates.h:419
bool isValid() const noexcept
Return True if all the constituent Keys are valid.
Definition aggregates.h:429
Defines the fields and offsets for a table.
Definition Schema.h:51
A proxy type for name lookups in a Schema.
Definition Schema.h:367
A coordinate class intended to represent absolute positions.
Definition Point.h:169
Point3Key< double > Point3DKey
Definition aggregates.h:200
Point3Key< int > Point3IKey
Definition aggregates.h:199
BoxKey< lsst::geom::Box2I > Box2IKey
Definition aggregates.h:283
PointKey< int > Point2IKey
Definition aggregates.h:119
CoordinateType
Enum used to set units for geometric FunctorKeys.
Definition aggregates.h:364
lsst::geom::SpherePoint SpherePoint
Definition misc.h:34
BoxKey< lsst::geom::Box2D > Box2DKey
Definition aggregates.h:284
PointKey< double > Point2DKey
Definition aggregates.h:120
std::size_t hashCombine(std::size_t seed) noexcept
Combine hashes.
Definition hashCombine.h:35
STL namespace.
lsst::afw::table::BoxKey< T > argument_type
Definition aggregates.h:669
size_t operator()(argument_type const &obj) const noexcept
Definition aggregates.h:671
size_t operator()(argument_type const &obj) const noexcept
Definition aggregates.h:678
lsst::afw::table::CoordKey argument_type
Definition aggregates.h:676
lsst::afw::table::CovarianceMatrixKey< T, N > argument_type
Definition aggregates.h:697
size_t operator()(argument_type const &obj) const noexcept
Definition aggregates.h:699
lsst::afw::table::EllipseKey argument_type
Definition aggregates.h:690
size_t operator()(argument_type const &obj) const noexcept
Definition aggregates.h:692
size_t operator()(argument_type const &obj) const noexcept
Definition aggregates.h:664
lsst::afw::table::PointKey< T > argument_type
Definition aggregates.h:662
lsst::afw::table::QuadrupoleKey argument_type
Definition aggregates.h:683
size_t operator()(argument_type const &obj) const noexcept
Definition aggregates.h:685