|
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
|
A FunctorKey used to get or set a ndarray::Array from a sequence of scalar Keys. More...
#include <arrays.h>
Public Member Functions | |
| ArrayKey () | |
| Default constructor; instance will not be usuable unless subsequently assigned to. More... | |
| ArrayKey (std::vector< Key< T > > const &keys) | |
| Construct from a vector of scalar Keys. More... | |
| ArrayKey (Key< Array< T > > const &other) | |
| ArrayKey (SubSchema const &s) | |
| Construct from a subschema, assuming *_0, *_1, *_2, etc. subfields. More... | |
| int | getSize () const |
| Return the number of elements in the array. More... | |
| virtual ndarray::Array< T const, 1, 1 > | get (BaseRecord const &record) const |
| Get an array from the given record. More... | |
| virtual void | set (BaseRecord &record, ndarray::Array< T const, 1, 1 > const &value) const |
| Set an array in the given record. More... | |
| virtual ndarray::ArrayRef< T, 1, 1 > | getReference (BaseRecord &record) const |
| Get non-const reference array from the given record. More... | |
| virtual ndarray::ArrayRef< T const, 1, 1 > | getConstReference (BaseRecord const &record) const |
| Get const reference array from the given record. More... | |
| bool | isValid () const |
| Return True if the FunctorKey contains valid scalar keys. More... | |
| Key< T > | operator[] (int i) const |
| Return a scalar Key for an element of the array. More... | |
| ArrayKey | slice (int begin, int end) const |
| Return a FunctorKey corresponding to a range of elements. More... | |
| bool | operator== (ArrayKey< T > const &other) const |
| Compare the FunctorKey for equality with another, using the underlying scalar Keys. More... | |
| bool | operator!= (ArrayKey< T > const &other) const |
| Compare the FunctorKey for equality with another, using the underlying scalar Keys. More... | |
Public Member Functions inherited from lsst.afw.table::OutputFunctorKey< ndarray::Array< T const, 1, 1 > > | |
| virtual | ~OutputFunctorKey () |
Public Member Functions inherited from lsst.afw.table::InputFunctorKey< ndarray::Array< T const, 1, 1 > > | |
| virtual | ~InputFunctorKey () |
Public Member Functions inherited from lsst.afw.table::ReferenceFunctorKey< ndarray::ArrayRef< T, 1, 1 > > | |
| virtual | ~ReferenceFunctorKey () |
Public Member Functions inherited from lsst.afw.table::ConstReferenceFunctorKey< ndarray::ArrayRef< T const, 1, 1 > > | |
| virtual | ~ConstReferenceFunctorKey () |
Static Public Member Functions | |
| static ArrayKey | addFields (Schema &schema, std::string const &name, std::string const &doc, std::string const &unit, std::vector< T > const &docData) |
| static ArrayKey | addFields (Schema &schema, std::string const &name, std::string const &doc, std::string const &unit, int size) |
Private Member Functions | |
| ArrayKey (Key< T > const &begin, int size) | |
Private Attributes | |
| Key< T > | _begin |
| int | _size |
A FunctorKey used to get or set a ndarray::Array from a sequence of scalar Keys.
ArrayKey operates on the convention that arrays are defined by a set of contiguous scalar fields (i.e. added to the Schema in order, with no interruption) of the same type, with a common field name prefix and "_0", "_1" etc. suffixes.
|
inline |
|
explicit |
Construct from a vector of scalar Keys.
|
explicit |
Construct from a compound Key< Array<T> >
Key< Array<T> > is now deprecated in favor of ArrayKey; this factory function is intended to aid in the transition.
| lsst.afw.table::ArrayKey< T >::ArrayKey | ( | SubSchema const & | s | ) |
|
inlineprivate |
|
static |
Add an array of fields to a Schema, and return an ArrayKey that points to them.
| [in,out] | schema | Schema to add fields to. |
| [in] | name | Name prefix for all fields; "_0", "_1", etc. will be appended to this to form the full field names. |
| [in] | doc | String used as the documentation for the fields. Should include a single boost::format template string, which will be substituted with the appropriate element from the docData array to form the full documentation string. |
| [in] | unit | String used as the unit for all fields. |
| [in] | docData | Vector of values substituted into the doc fields. The length of the vector determines the number of fields added. |
|
static |
Add an array of fields to a Schema, and return an ArrayKey that points to them.
| [in,out] | schema | Schema to add fields to. |
| [in] | name | Name prefix for all fields; "_0", "_1", etc. will be appended to this to form the full field names. |
| [in] | doc | String used as the documentation for the fields. |
| [in] | unit | String used as the unit for all fields. |
| [in] | size | Number of fields to add. |
|
virtual |
Get an array from the given record.
Implements lsst.afw.table::OutputFunctorKey< ndarray::Array< T const, 1, 1 > >.
|
virtual |
Get const reference array from the given record.
Implements lsst.afw.table::ConstReferenceFunctorKey< ndarray::ArrayRef< T const, 1, 1 > >.
|
virtual |
Get non-const reference array from the given record.
Implements lsst.afw.table::ReferenceFunctorKey< ndarray::ArrayRef< T, 1, 1 > >.
|
inline |
|
inline |
|
inline |
Compare the FunctorKey for equality with another, using the underlying scalar Keys.
Definition at line 132 of file arrays.h.
|
inline |
| Key<T> lsst.afw.table::ArrayKey< T >::operator[] | ( | int | i | ) | const |
Return a scalar Key for an element of the array.
|
virtual |
Set an array in the given record.
Implements lsst.afw.table::InputFunctorKey< ndarray::Array< T const, 1, 1 > >.
| ArrayKey lsst.afw.table::ArrayKey< T >::slice | ( | int | begin, |
| int | end | ||
| ) | const |
Return a FunctorKey corresponding to a range of elements.
|
private |
|
private |
1.8.5