23 #ifndef AFW_TABLE_aggregates_h_INCLUDED 24 #define AFW_TABLE_aggregates_h_INCLUDED 34 template <
typename T,
int N>
102 bool isValid()
const {
return _x.isValid() && _y.isValid(); }
124 template <
typename Box>
167 virtual ~
BoxKey() =
default;
170 virtual Box
get(
BaseRecord const& record)
const;
173 virtual void set(
BaseRecord& record, Box
const& value)
const;
176 bool operator==(
BoxKey const& other)
const {
return _min == other._min && _max == other._max; }
182 bool isValid()
const {
return _min.isValid() && _max.isValid(); }
246 bool operator==(
CoordKey const& other)
const {
return _ra == other._ra && _dec == other._dec; }
251 bool isValid()
const {
return _ra.isValid() && _dec.isValid(); }
297 : _ixx(ixx), _iyy(iyy), _ixy(ixy) {}
324 return _ixx == other._ixx && _iyy == other._iyy && _ixy == other._ixy;
330 bool isValid()
const {
return _ixx.isValid() && _iyy.isValid() && _ixy.isValid(); }
392 bool operator==(
EllipseKey const& other)
const {
return _qKey == other._qKey && _pKey == other._pKey; }
398 bool isValid()
const {
return _qKey.isValid() && _pKey.isValid(); }
411 template <
typename T,
int N>
432 std::string const& unit,
bool diagonalOnly =
false);
449 NameArray
const& units,
bool diagonalOnly =
false);
473 CovarianceKeyArray
const& cov = CovarianceKeyArray());
495 virtual Eigen::Matrix<T, N, N>
get(
BaseRecord const& record)
const;
498 virtual void set(
BaseRecord& record, Eigen::Matrix<T, N, N>
const& value)
const;
501 T getElement(
BaseRecord const& record,
int i,
int j)
const;
504 void setElement(
BaseRecord& record,
int i,
int j, T value)
const;
521 SigmaKeyArray _sigma;
522 CovarianceKeyArray _cov;
528 #endif // !AFW_TABLE_aggregates_h_INCLUDED CoordKey()
Default constructor; instance will not be usable unless subsequently assigned to. ...
An ellipse core with quadrupole moments as parameters.
Defines the fields and offsets for a table.
A coordinate class intended to represent absolute positions (2-d specialization). ...
Point in an unspecified spherical coordinate system.
EllipseKey(QuadrupoleKey const &qKey, PointKey< double > const &pKey)
Construct from individual Keys.
A proxy type for name lookups in a Schema.
QuadrupoleKey(SubSchema const &s)
Construct from a subschema with appropriate subfields.
std::vector< std::string > NameArray
EllipseKey()
Default constructor; instance will not be usable unless subsequently assigned to. ...
QuadrupoleKey()
Default constructor; instance will not be usable unless subsequently assigned to. ...
std::vector< Key< T > > CovarianceKeyArray
EllipseKey(SubSchema const &s)
Construct from a subschema, assuming (xx, yy, xy, x, y) subfields.
PointKey< int > Point2IKey
bool operator!=(CoordKey const &lhs, CoordKey const &rhs)
Compare CoordKeys for equality using the constituent Keys.
bool operator==(CoordKey const &lhs, CoordKey const &rhs)
Compare CoordKeys for equality using the constituent Keys.
PointKey< double > Point2DKey
Key< T > getX() const
Return the underlying x Key.
bool operator!=(QuadrupoleKey const &other) const
Compare the FunctorKey for equality with another, using the underlying Ixx, Iyy, Ixy Keys...
Key< double > getIyy() const
Return a constituent Key.
A FunctorKey used to get or set a geom::Box2I or Box2D from a (min, max) pair of PointKeys.
BoxKey(PointKey< Element > const &min, PointKey< Element > const &max)
Construct from a pair of PointKeys.
PointKey< Element > getMin() const
Return the underlying min PointKey.
typename geom::Box2I ::Element Element
Type of coordinate elements (i.e. int or double).
A base class for image defects.
A FunctorKey used to get or set a geom::Point from an (x,y) pair of int or double Keys...
An ellipse defined by an arbitrary BaseCore and a center point.
CoordKey(Key< geom::Angle > const &ra, Key< geom::Angle > const &dec)
Construct from a pair of Keys.
bool isValid() const
Return True if both the x and y Keys are valid.
BoxKey(SubSchema const &s)
Construct from a subschema, assuming _min_x, _max_x, _min_y, _max_y subfields.
bool isValid() const
Return True if both the min and max PointKeys are valid.
bool operator!=(BoxKey const &other) const
Compare the FunctorKey for equality with another, using the underlying x and y Keys.
Key< geom::Angle > getDec() const
Return a constituent Key.
PointKey< double > getCenter() const
Return constituent FunctorKeys.
CoordinateType
Enum used to set units for geometric FunctorKeys.
bool operator!=(CovarianceMatrixKey const &other) const
Compare the FunctorKey for equality with another, using its constituent Keys.
Key< double > getIxy() const
Return a constituent Key.
Base class for all records.
std::vector< Key< T > > SigmaKeyArray
A class used as a handle to a particular field in a table.
PointKey()
Default constructor; instance will not be usable unless subsequently assigned to. ...
PointKey(SubSchema const &s)
Construct from a subschema, assuming x and y subfields.
bool operator!=(EllipseKey const &other) const
Compare the FunctorKey for equality with another, using the underlying Ixx, Iyy, Ixy Keys...
PointKey(Key< T > const &x, Key< T > const &y)
Construct from a pair of Keys.
CoordKey(SubSchema const &s)
Construct from a subschema, assuming ra and dec subfields.
A FunctorKey used to get or set a geom::ellipses::Ellipse from an (xx,yy,xy,x,y) tuple of Keys...
PointKey< Element > getMax() const
Return the underlying max PointKey.
Convenience base class that combines the OutputFunctorKey and InputFunctorKey.
bool operator!=(CoordKey const &other) const
Compare CoordKeys for equality using the constituent ra and dec Keys.
QuadrupoleKey(Key< double > const &ixx, Key< double > const &iyy, Key< double > const &ixy)
Construct from individual Keys.
Key< T > getY() const
Return the underlying y Key.
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys...
bool operator!=(PointKey< T > const &other) const
Compare the FunctorKey for equality with another, using the underlying x and y Keys.
A FunctorKey used to get or set celestial coordinates from a pair of Angle keys.
bool isValid() const
Return True if all the constituent Keys are valid.
bool isValid() const
Return True if all the constituent Keys are valid.