LSSTApplications  1.1.2+25,10.0+13,10.0+132,10.0+133,10.0+224,10.0+41,10.0+8,10.0-1-g0f53050+14,10.0-1-g4b7b172+19,10.0-1-g61a5bae+98,10.0-1-g7408a83+3,10.0-1-gc1e0f5a+19,10.0-1-gdb4482e+14,10.0-11-g3947115+2,10.0-12-g8719d8b+2,10.0-15-ga3f480f+1,10.0-2-g4f67435,10.0-2-gcb4bc6c+26,10.0-28-gf7f57a9+1,10.0-3-g1bbe32c+14,10.0-3-g5b46d21,10.0-4-g027f45f+5,10.0-4-g86f66b5+2,10.0-4-gc4fccf3+24,10.0-40-g4349866+2,10.0-5-g766159b,10.0-5-gca2295e+25,10.0-6-g462a451+1
LSSTDataManagementBasePackage
FieldBase.h
Go to the documentation of this file.
1 // -*- lsst-c++ -*-
2 #ifndef AFW_TABLE_FieldBase_h_INCLUDED
3 #define AFW_TABLE_FieldBase_h_INCLUDED
4 
5 #include <cstring>
6 #include <iostream>
7 
8 #include "boost/mpl/vector.hpp"
9 #include "boost/preprocessor/punctuation/paren.hpp"
10 #include "Eigen/Core"
11 
12 #include "lsst/base.h"
13 #include "lsst/pex/exceptions.h"
14 #include "ndarray.h"
15 #include "lsst/afw/geom.h"
16 #include "lsst/afw/geom/ellipses.h"
17 #include "lsst/afw/coord.h"
18 #include "lsst/afw/table/misc.h"
19 #include "lsst/afw/table/KeyBase.h"
20 #include "lsst/afw/table/types.h"
21 
22 namespace lsst { namespace afw { namespace table {
23 
24 namespace detail {
25 
26 class TableImpl;
27 
33 inline int indexCovariance(int i, int j) {
34  return (i < j) ? (i + j*(j+1)/2) : (j + i*(i+1)/2);
35 }
36 
38 inline int computeCovariancePackedSize(int size) {
39  return size * (size + 1) / 2;
40 }
41 
42 } // namespace detail
43 
49 template <typename T>
50 struct FieldBase {
51 
52  typedef T Value;
53  typedef T & Reference;
54  typedef T const & ConstReference;
55  typedef T Element;
56 
58  int getElementCount() const { return 1; }
59 
61  static std::string getTypeString();
62 
63 #ifndef SWIG_BUG_3465431_FIXED
64  // SWIG uses this template to define the interface for the other specializations.
65  // We can add other methods to full specializations using %extend, but we can't add
66  // constructors that way.
67  FieldBase() {}
68  FieldBase(int) {
69  throw LSST_EXCEPT(
70  lsst::pex::exceptions::LogicError,
71  "Constructor disabled (it only appears to exist as a workaround for a SWIG bug)."
72  );
73  }
74 #endif
75 
76 protected:
77 
79  static FieldBase makeDefault() { return FieldBase(); }
80 
82  void stream(std::ostream & os) const {}
83 
85  Reference getReference(Element * p, ndarray::Manager::Ptr const &) const { return *p; }
86 
88  ConstReference getConstReference(Element const * p, ndarray::Manager::Ptr const &) const { return *p; }
89 
91  Value getValue(Element const * p, ndarray::Manager::Ptr const &) const { return *p; }
92 
94  void setValue(Element * p, ndarray::Manager::Ptr const &, Value v) const { *p = v; }
95 
96 };
97 
107 template <>
108 struct FieldBase< Coord > {
109 
111  typedef IcrsCoord Value;
112 
114  typedef Angle Element;
115 
117  int getElementCount() const { return 2; }
118 
120  static std::string getTypeString();
121 
122 #ifndef SWIG_BUG_3465431_FIXED
123  // SWIG uses this template to define the interface for the other specializations.
124  // We can add other methods to full specializations using %extend, but we can't add
125  // constructors that way.
127  FieldBase(int) {
128  throw LSST_EXCEPT(
129  lsst::pex::exceptions::LogicError,
130  "Constructor disabled (it only appears to exist as a workaround for a SWIG bug)."
131  );
132  }
133 #endif
134 
135 protected:
136 
138  static FieldBase makeDefault() { return FieldBase(); }
139 
141  void stream(std::ostream & os) const {}
142 
144  Value getValue(Element const * p, ndarray::Manager::Ptr const &) const {
145  return Value(p[0], p[1]);
146  }
147 
149  void setValue(Element * p, ndarray::Manager::Ptr const &, Value const & v) const {
150  p[0] = v.getRa();
151  p[1] = v.getDec();
152  }
153 
155  void setValue(Element * p, ndarray::Manager::Ptr const & m, Coord const & v) const {
156  setValue(p, m, v.toIcrs());
157  }
158 };
159 
165 template <typename U>
166 struct FieldBase< Point<U> > {
167 
173  typedef typename boost::mpl::if_<boost::is_same<U,int>,geom::Point2I,geom::Point2D>::type Value;
174 
176  typedef U Element;
177 
179  int getElementCount() const { return 2; }
180 
182  static std::string getTypeString();
183 
184 #ifndef SWIG_BUG_3465431_FIXED
185  // SWIG uses this template to define the interface for the other specializations.
186  // We can add other methods to full specializations using %extend, but we can't add
187  // constructors that way.
189  FieldBase(int) {
190  throw LSST_EXCEPT(
191  lsst::pex::exceptions::LogicError,
192  "Constructor disabled (it only appears to exist as a workaround for a SWIG bug)."
193  );
194  }
195 #endif
196 
197 protected:
198 
200  static FieldBase makeDefault() { return FieldBase(); }
201 
203  void stream(std::ostream & os) const {}
204 
206  Value getValue(Element const * p, ndarray::Manager::Ptr const &) const { return Value(p[0], p[1]); }
207 
209  void setValue(Element * p, ndarray::Manager::Ptr const &, Value const & v) const {
210  p[0] = v.getX();
211  p[1] = v.getY();
212  }
213 };
214 
222 template <typename U>
223 struct FieldBase< Moments<U> > {
224 
226  typedef U Element;
227 
229  int getElementCount() const { return 3; }
230 
232  static std::string getTypeString();
233 
234 #ifndef SWIG_BUG_3465431_FIXED
235  // SWIG uses this template to define the interface for the other specializations.
236  // We can add other methods to full specializations using %extend, but we can't add
237  // constructors that way.
239  FieldBase(int) {
240  throw LSST_EXCEPT(
241  lsst::pex::exceptions::LogicError,
242  "Constructor disabled (it only appears to exist as a workaround for a SWIG bug)."
243  );
244  }
245 #endif
246 
247 protected:
248 
250  static FieldBase makeDefault() { return FieldBase(); }
251 
253  void stream(std::ostream & os) const {}
254 
256  Value getValue(Element const * p, ndarray::Manager::Ptr const &) const {
257  return Value(p[0], p[1], p[2]);
258  }
259 
261  void setValue(Element * p, ndarray::Manager::Ptr const &, Value const & v) const {
262  p[0] = v.getIxx();
263  p[1] = v.getIyy();
264  p[2] = v.getIxy();
265  }
266 };
267 
271 template <typename U>
272 struct FieldBase< Array<U> > {
273 
275 
278 
281 
282  typedef U Element;
283 
295  FieldBase(int size=-1) : _size(size) {
296  if (size < 0) throw LSST_EXCEPT(
297  lsst::pex::exceptions::LengthError,
298  "Size must be provided when constructing an array field."
299  );
300  }
301 
303  static std::string getTypeString();
304 
306  int getElementCount() const { return _size; }
307 
309  int getSize() const { return _size; }
310 
311 protected:
312 
314  static FieldBase makeDefault() { return FieldBase(0); }
315 
317  void stream(std::ostream & os) const { os << ", size=" << _size; }
318 
322  }
323 
327  }
328 
330  Value getValue(Element const * p, ndarray::Manager::Ptr const & m) const {
332  }
333 
335  template <typename Derived>
336  void setValue(
338  ) const {
339  if (value.template getSize<0>() != _size) {
340  throw LSST_EXCEPT(
341  lsst::pex::exceptions::LengthError,
342  "Incorrect size in array field assignment."
343  );
344  }
345  for (int i = 0; i < _size; ++i) p[i] = value[i];
346  }
347 
348 private:
349  int _size;
350 };
351 
364 template <typename U>
365 struct FieldBase< Covariance<U> > {
366 
368  typedef Eigen::Matrix<U,Eigen::Dynamic,Eigen::Dynamic> Value;
369 
370  typedef U Element;
371 
383  FieldBase(int size=-1) : _size(size) {
384  if (size < 0) throw LSST_EXCEPT(
385  lsst::pex::exceptions::LengthError,
386  "Size must be provided when constructing a covariance field."
387  );
388  }
389 
391  static std::string getTypeString();
392 
394  int getElementCount() const { return getPackedSize(); }
395 
397  int getSize() const { return _size; }
398 
400  int getPackedSize() const { return detail::computeCovariancePackedSize(_size); }
401 
402 protected:
403 
405  static FieldBase makeDefault() { return FieldBase(0); }
406 
408  void stream(std::ostream & os) const { os << ", size=" << _size; }
409 
411  Value getValue(Element const * p, ndarray::Manager::Ptr const &) const {
412  Value m(_size, _size);
413  for (int i = 0; i < _size; ++i) {
414  for (int j = 0; j < _size; ++j) {
415  m(i, j) = p[detail::indexCovariance(i, j)];
416  }
417  }
418  return m;
419  }
420 
422  template <typename Derived>
423  void setValue(
424  Element * p, ndarray::Manager::Ptr const &, Eigen::MatrixBase<Derived> const & value
425  ) const {
426  if (value.rows() != _size || value.cols() != _size) {
427  throw LSST_EXCEPT(
428  lsst::pex::exceptions::LengthError,
429  "Incorrect size in covariance field assignment."
430  );
431  }
432  for (int i = 0; i < _size; ++i) {
433  for (int j = 0; j < _size; ++j) {
434  p[detail::indexCovariance(i, j)] = value(i, j);
435  }
436  }
437  }
438 
439  int _size;
440 };
441 
451 template <typename U>
452 struct FieldBase< Covariance< Point<U> > > {
453 
454  static int const SIZE = 2;
455  static int const PACKED_SIZE = 3;
456 
457  typedef Eigen::Matrix<U,SIZE,SIZE> Value;
458  typedef U Element;
459 
461  static std::string getTypeString();
462 
464  int getElementCount() const { return getPackedSize(); }
465 
467  int getSize() const { return SIZE; }
468 
470  int getPackedSize() const { return PACKED_SIZE; }
471 
472 #ifndef SWIG_BUG_3465431_FIXED
473  // SWIG uses this template to define the interface for the other specializations.
474  // We can add other methods to full specializations using %extend, but we can't add
475  // constructors that way.
477  FieldBase(int) {
478  throw LSST_EXCEPT(
479  lsst::pex::exceptions::LogicError,
480  "Constructor disabled (it only appears to exist as a workaround for a SWIG bug)."
481  );
482  }
483 #endif
484 
485 protected:
486 
488  static FieldBase makeDefault() { return FieldBase(); }
489 
491  void stream(std::ostream & os) const {}
492 
494  Value getValue(Element const * p, ndarray::Manager::Ptr const &) const {
495  Value m;
496  for (int i = 0; i < SIZE; ++i) {
497  for (int j = 0; j < SIZE; ++j) {
498  m(i, j) = p[detail::indexCovariance(i, j)];
499  }
500  }
501  return m;
502  }
503 
505  template <typename Derived>
506  static void setValue(
507  Element * p, ndarray::Manager::Ptr const &, Eigen::MatrixBase<Derived> const & value
508  ) {
509  BOOST_STATIC_ASSERT( Derived::RowsAtCompileTime == SIZE);
510  BOOST_STATIC_ASSERT( Derived::ColsAtCompileTime == SIZE);
511  for (int i = 0; i < SIZE; ++i) {
512  for (int j = 0; j < SIZE; ++j) {
513  p[detail::indexCovariance(i, j)] = value(i, j);
514  }
515  }
516  }
517 
518 };
519 
529 template <typename U>
530 struct FieldBase< Covariance< Moments<U> > > {
531 
532  static int const SIZE = 3;
533  static int const PACKED_SIZE = 6;
534 
535  typedef Eigen::Matrix<U,SIZE,SIZE> Value;
536  typedef U Element;
537 
539  static std::string getTypeString();
540 
542  int getElementCount() const { return getPackedSize(); }
543 
545  int getSize() const { return SIZE; }
546 
548  int getPackedSize() const { return PACKED_SIZE; }
549 
550 #ifndef SWIG_BUG_3465431_FIXED
551  // SWIG uses this template to define the interface for the other specializations.
552  // We can add other methods to full specializations using %extend, but we can't add
553  // constructors that way.
555  FieldBase(int) {
556  throw LSST_EXCEPT(
557  lsst::pex::exceptions::LogicError,
558  "Constructor disabled (it only appears to exist as a workaround for a SWIG bug)."
559  );
560  }
561 #endif
562 
563 protected:
564 
566  static FieldBase makeDefault() { return FieldBase(); }
567 
569  void stream(std::ostream & os) const {}
570 
572  Value getValue(Element const * p, ndarray::Manager::Ptr const &) const {
573  Value m;
574  for (int i = 0; i < SIZE; ++i) {
575  for (int j = 0; j < SIZE; ++j) {
576  m(i, j) = p[detail::indexCovariance(i, j)];
577  }
578  }
579  return m;
580  }
581 
583  template <typename Derived>
584  static void setValue(
585  Element * p, ndarray::Manager::Ptr const &, Eigen::MatrixBase<Derived> const & value
586  ) {
587  BOOST_STATIC_ASSERT( Derived::RowsAtCompileTime == SIZE);
588  BOOST_STATIC_ASSERT( Derived::ColsAtCompileTime == SIZE);
589  for (int i = 0; i < SIZE; ++i) {
590  for (int j = 0; j < SIZE; ++j) {
591  p[detail::indexCovariance(i, j)] = value(i, j);
592  }
593  }
594  }
595 
596 };
597 
601 template <>
602 struct FieldBase< std::string > {
603 
604  typedef std::string Value;
605 
607  typedef char * Reference;
608 
610  typedef char const * ConstReference;
611 
612  typedef char Element;
613 
625  FieldBase(int size=-1);
626 
628  static std::string getTypeString();
629 
632  int getElementCount() const { return _size; }
633 
636  int getSize() const { return _size; }
637 
638 protected:
639 
641  static FieldBase makeDefault() { return FieldBase(0); }
642 
644  void stream(std::ostream & os) const { os << ", size=" << _size; }
645 
648  return p;
649  }
650 
653  return p;
654  }
655 
657  Value getValue(Element const * p, ndarray::Manager::Ptr const & m) const;
658 
660  void setValue(Element * p, ndarray::Manager::Ptr const &, std::string const & value) const;
661 
662 private:
663  int _size;
664 };
665 
666 }}} // namespace lsst::afw::table
667 
668 #endif // !AFW_TABLE_FieldBase_h_INCLUDED
A proxy class for Array with deep assignment operators.
Definition: ArrayRef.h:46
An ellipse core with quadrupole moments as parameters.
Definition: Quadrupole.h:45
int getSize() const
Return the maximum length of the string, including a null terminator (equal to the number of subfield...
Definition: FieldBase.h:636
static FieldBase makeDefault()
Needed to allow Keys to be default-constructed.
Definition: FieldBase.h:138
Field base class default implementation (used for numeric scalars and Angle).
Definition: FieldBase.h:50
An include file to include the header files for lsst::afw::geom.
void stream(std::ostream &os) const
Defines how Fields are printed.
Definition: FieldBase.h:569
char const * ConstReference
the type returned by BaseRecord::operator[] (const)
Definition: FieldBase.h:610
static FieldBase makeDefault()
Needed to allow Keys to be default-constructed.
Definition: FieldBase.h:79
Angle Element
the type of subfields
Definition: FieldBase.h:114
Eigen::Matrix< U, SIZE, SIZE > Value
the type returned by BaseRecord::get
Definition: FieldBase.h:457
lsst::afw::geom::Angle getDec() const
Definition: Coord.h:171
Public header class for ellipse library.
int getElementCount() const
Return the number of subfield elements (equal to the size of the array).
Definition: FieldBase.h:306
Value getValue(Element const *p, ndarray::Manager::Ptr const &) const
Used to implement RecordBase::get.
Definition: FieldBase.h:494
Value getValue(Element const *p, ndarray::Manager::Ptr const &) const
Used to implement RecordBase::get.
Definition: FieldBase.h:256
int getPackedSize() const
Return the packed size of the covariance matrix.
Definition: FieldBase.h:548
void setValue(Element *p, ndarray::Manager::Ptr const &, Value const &v) const
Used to implement RecordBase::set.
Definition: FieldBase.h:209
void stream(std::ostream &os) const
Defines how Fields are printed.
Definition: FieldBase.h:644
An include file to include the header files for lsst::afw::coord.
static FieldBase makeDefault()
Needed to allow Keys to be default-constructed.
Definition: FieldBase.h:641
FieldBase(int size=-1)
Construct a FieldBase with the given size.
Definition: FieldBase.h:295
Reference getReference(Element *p, ndarray::Manager::Ptr const &m) const
Used to implement RecordBase::operator[] (non-const).
Definition: FieldBase.h:647
static void setValue(Element *p, ndarray::Manager::Ptr const &, Eigen::MatrixBase< Derived > const &value)
Used to implement RecordBase::set.
Definition: FieldBase.h:584
U Element
the type of subfields and array elements
Definition: FieldBase.h:282
detail::ExternalInitializer< T, N, Owner > external(T *data, Vector< int, N > const &shape, Vector< int, N > const &strides, Owner const &owner)
Create an expression that initializes an Array with externally allocated memory.
void setValue(Element *p, ndarray::Manager::Ptr const &, Value v) const
Used to implement RecordBase::set.
Definition: FieldBase.h:94
Eigen::Matrix< U, SIZE, SIZE > Value
the type returned by BaseRecord::get
Definition: FieldBase.h:535
double const getIyy() const
Definition: Quadrupole.h:59
Value getValue(Element const *p, ndarray::Manager::Ptr const &) const
Used to implement RecordBase::get.
Definition: FieldBase.h:572
static FieldBase makeDefault()
Needed to allow Keys to be default-constructed.
Definition: FieldBase.h:566
void setValue(Element *p, ndarray::Manager::Ptr const &m, Coord const &v) const
Used to implement RecordBase::set.
Definition: FieldBase.h:155
int getElementCount() const
Return the number of subfield elements (the packed size of the covariance matrix).
Definition: FieldBase.h:394
Point< int, 2 > Point2I
Definition: PSF.h:39
U Element
the type of subfields
Definition: FieldBase.h:176
ConstReference getConstReference(Element const *p, ndarray::Manager::Ptr const &m) const
Used to implement RecordBase::operator[] (const).
Definition: FieldBase.h:652
int computeCovariancePackedSize(int size)
Defines the packed size of a covariance matrices.
Definition: FieldBase.h:38
void stream(std::ostream &os) const
Defines how Fields are printed.
Definition: FieldBase.h:491
static FieldBase makeDefault()
Needed to allow Keys to be default-constructed.
Definition: FieldBase.h:200
static FieldBase makeDefault()
Needed to allow Keys to be default-constructed.
Definition: FieldBase.h:488
T const & ConstReference
the type returned by BaseRecord::operator[] (const)
Definition: FieldBase.h:54
void setValue(Element *p, ndarray::Manager::Ptr const &, Value const &v) const
Used to implement RecordBase::set.
Definition: FieldBase.h:261
Value getValue(Element const *p, ndarray::Manager::Ptr const &) const
Used to implement RecordBase::get.
Definition: FieldBase.h:206
static std::string getTypeString()
Return a string description of the field type.
Value getValue(Element const *p, ndarray::Manager::Ptr const &) const
Used to implement RecordBase::get.
Definition: FieldBase.h:91
int getElementCount() const
Return the number of subfield elements (always one for scalars).
Definition: FieldBase.h:58
int getSize() const
Return the number of rows/columns of the covariance matrix.
Definition: FieldBase.h:467
boost::intrusive_ptr< Manager > Ptr
Definition: Manager.h:42
FieldBase(int size=-1)
Construct a FieldBase with the given size.
Definition: FieldBase.h:383
std::string Value
the type returned by BaseRecord::get
Definition: FieldBase.h:604
T Element
the type of subfields (the same as the type itself for scalars)
Definition: FieldBase.h:55
int getElementCount() const
Return the number of subfield elements (equal to the size of the string, including a null terminator)...
Definition: FieldBase.h:632
ConstReference getConstReference(Element const *p, ndarray::Manager::Ptr const &) const
Used to implement RecordBase::operator[] (const).
Definition: FieldBase.h:88
int getElementCount() const
Return the number of subfield elements (always two for points).
Definition: FieldBase.h:117
U Element
the type of subfields and matrix elements
Definition: FieldBase.h:370
int getPackedSize() const
Return the packed size of the covariance matrix.
Definition: FieldBase.h:470
U Element
the type of subfields and matrix elements
Definition: FieldBase.h:458
static FieldBase makeDefault()
Needed to allow Keys to be default-constructed.
Definition: FieldBase.h:405
int indexCovariance(int i, int j)
Defines the ordering of packed covariance matrices.
Definition: FieldBase.h:33
Vector< T, N > makeVector(T v1, T v2,..., T vN)
Variadic constructor for Vector.
int getSize() const
Return the size of the array (equal to the number of subfield elements).
Definition: FieldBase.h:309
boost::mpl::if_< boost::is_same< U, int >, geom::Point2I, geom::Point2D >::type Value
the type returned by BaseRecord::get
Definition: FieldBase.h:173
Reference getReference(Element *p, ndarray::Manager::Ptr const &m) const
Used to implement RecordBase::operator[] (non-const).
Definition: FieldBase.h:320
T Value
the type returned by BaseRecord::get
Definition: FieldBase.h:52
double const getIxx() const
Definition: Quadrupole.h:56
void setValue(Element *p, ndarray::Manager::Ptr const &, ndarray::ExpressionBase< Derived > const &value) const
Used to implement RecordBase::set; accepts any ndarray expression.
Definition: FieldBase.h:336
static void setValue(Element *p, ndarray::Manager::Ptr const &, Eigen::MatrixBase< Derived > const &value)
Used to implement RecordBase::set.
Definition: FieldBase.h:506
void setValue(Element *p, ndarray::Manager::Ptr const &, Eigen::MatrixBase< Derived > const &value) const
Used to implement RecordBase::set.
Definition: FieldBase.h:423
static FieldBase makeDefault()
Needed to allow Keys to be default-constructed.
Definition: FieldBase.h:250
Value getValue(Element const *p, ndarray::Manager::Ptr const &) const
Used to implement RecordBase::get.
Definition: FieldBase.h:411
int getSize() const
Return the number of rows/columns of the covariance matrix.
Definition: FieldBase.h:545
#define LSST_EXCEPT(type,...)
Definition: Exception.h:46
A multidimensional strided array.
Definition: Array.h:47
int getElementCount() const
Return the number of subfield elements (always two for points).
Definition: FieldBase.h:179
ndarray::ArrayRef< U const, 1, 1 > ConstReference
the type returned by BaseRecord::operator[] (const)
Definition: FieldBase.h:280
void stream(std::ostream &os) const
Defines how Fields are printed.
Definition: FieldBase.h:203
T & Reference
the type returned by BaseRecord::operator[] (non-const)
Definition: FieldBase.h:53
int getElementCount() const
the type of subfields
Definition: FieldBase.h:229
virtual IcrsCoord toIcrs() const
Convert ourself to ICRS: RA, Dec (basically J2000)
Definition: Coord.cc:791
void stream(std::ostream &os) const
Defines how Fields are printed.
Definition: FieldBase.h:82
char * Reference
the type returned by BaseRecord::operator[]
Definition: FieldBase.h:607
int getSize() const
Return the number of rows/columns of the covariance matrix.
Definition: FieldBase.h:397
ndarray::ArrayRef< U, 1, 1 > Reference
the type returned by BaseRecord::operator[]
Definition: FieldBase.h:277
U Element
the type of subfields and matrix elements
Definition: FieldBase.h:536
void stream(std::ostream &os) const
Defines how Fields are printed.
Definition: FieldBase.h:317
IcrsCoord Value
the type returned by BaseRecord::get (coord::IcrsCoord, in this case).
Definition: FieldBase.h:111
ConstReference getConstReference(Element const *p, ndarray::Manager::Ptr const &m) const
Used to implement RecordBase::operator[] (const).
Definition: FieldBase.h:325
double const getIxy() const
Definition: Quadrupole.h:62
int getElementCount() const
Return the number of subfield elements (the packed size of the covariance matrix).
Definition: FieldBase.h:542
ndarray::Array< U const, 1, 1 > Value
the type returned by BaseRecord::get
Definition: FieldBase.h:274
void stream(std::ostream &os) const
Defines how Fields are printed.
Definition: FieldBase.h:253
void stream(std::ostream &os) const
Defines how Fields are printed.
Definition: FieldBase.h:408
Reference getReference(Element *p, ndarray::Manager::Ptr const &) const
Used to implement RecordBase::operator[] (non-const).
Definition: FieldBase.h:85
Value getValue(Element const *p, ndarray::Manager::Ptr const &m) const
Used to implement RecordBase::get.
Definition: FieldBase.h:330
Eigen::Matrix< U, Eigen::Dynamic, Eigen::Dynamic > Value
the type returned by BaseRecord::get
Definition: FieldBase.h:368
Tag types used to declare specialized field types.
Definition: misc.h:35
void stream(std::ostream &os) const
Defines how Fields are printed.
Definition: FieldBase.h:141
lsst::afw::geom::Angle getRa() const
Definition: Coord.h:170
A class to handle Icrs coordinates (inherits from Coord)
Definition: Coord.h:155
Include files required for standard LSST Exception handling.
static FieldBase makeDefault()
Needed to allow Keys to be default-constructed.
Definition: FieldBase.h:314
afw::geom::ellipses::Quadrupole Value
the type returned by BaseRecord::get
Definition: FieldBase.h:225
char Element
the type of subfields and array elements
Definition: FieldBase.h:612
int getElementCount() const
Return the number of subfield elements (the packed size of the covariance matrix).
Definition: FieldBase.h:464
int getPackedSize() const
Return the packed size of the covariance matrix.
Definition: FieldBase.h:400
void setValue(Element *p, ndarray::Manager::Ptr const &, Value const &v) const
Used to implement RecordBase::set.
Definition: FieldBase.h:149
Value getValue(Element const *p, ndarray::Manager::Ptr const &) const
Used to implement RecordBase::get.
Definition: FieldBase.h:144
CRTP base class for all multidimensional expressions.