LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
2 #ifndef AFW_TABLE_BaseColumnView_h_INCLUDED
3 #define AFW_TABLE_BaseColumnView_h_INCLUDED
46 ndarray::Array<IntT, 1, 1>
getArray()
const {
return _array; }
61 ndarray::Array<IntT, 1, 1> _array;
106 ndarray::result_of::vectorize<detail::FlagExtractor, ndarray::Array<Field<Flag>::Element
const, 1> >
::type
135 template <
typename InputIterator>
146 template <
typename InputIterator>
159 ndarray::Manager::Ptr
const& manager);
169 template <
typename RecordT>
173 typedef typename RecordT::Table
Table;
181 template <
typename InputIterator>
196 template <
typename InputIterator>
198 InputIterator last) {
205 void* buf =
first->_data;
206 ndarray::Manager::Ptr manager =
first->_manager;
207 char* expected =
reinterpret_cast<char*
>(buf) + recordSize;
208 for (++
first;
first != last; ++
first, ++recordCount, expected += recordSize) {
209 if (
first->_data != expected ||
first->_manager != manager) {
211 "Record data is not contiguous in memory.");
217 template <
typename InputIterator>
219 InputIterator last) {
220 if (
first == last)
return true;
224 void* buf =
first->_data;
225 ndarray::Manager::Ptr manager =
first->_manager;
226 char* expected =
reinterpret_cast<char*
>(buf) + recordSize;
227 for (++
first;
first != last; ++
first, ++recordCount, expected += recordSize) {
228 if (
first->_data != expected ||
first->_manager != manager) {
238 #endif // !AFW_TABLE_BaseColumnView_h_INCLUDED
ColumnViewT(ColumnViewT const &)=default
IntT getMask(std::string const &name) const
ndarray::ArrayRef< T, 1 > const operator[](Key< T > const &key) const
Return a 1-d array corresponding to a scalar field (or subfield).
Defines the fields and offsets for a table.
static bool isRangeContiguous(std::shared_ptr< BaseTable > const &table, InputIterator first, InputIterator last)
Return true if the given record iterator range is continuous and the records all belong to the given ...
Column-wise view into a sequence of records that have been allocated contiguously.
ndarray::Array< IntT, 1, 1 > getArray() const
Base class for all tables.
A packed representation of a collection of Flag field columns.
std::vector< SchemaItem< Flag > > const & getSchemaItems() const
IntT getBit(Key< Flag > const &key) const
ColumnViewT & operator=(ColumnViewT &&)=default
ColumnViewT(ColumnViewT &&)=default
BitsColumn getBits(std::vector< Key< Flag > > const &keys) const
Return an integer array with the given Flag fields repacked into individual bits.
IntT getMask(Key< Flag > const &key) const
std::shared_ptr< Table > getTable() const
Return the table that owns the records.
std::shared_ptr< BaseTable > getTable() const
Return the table that owns the records.
ColumnViewT(BaseColumnView const &base)
A class used as a handle to a particular field in a table.
BaseColumnView & operator=(BaseColumnView const &)
Tag types used to declare specialized field types.
static BaseColumnView make(std::shared_ptr< BaseTable > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
A base class for image defects.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
ColumnViewT & operator=(ColumnViewT const &)=default
A description of a field in a table.
Schema getSchema() const
Return the schema that defines the fields.
BaseColumnView & operator=(BaseColumnView &&)
BaseColumnView(BaseColumnView const &)
static ColumnViewT make(std::shared_ptr< Table > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
BaseColumnView(BaseColumnView &&)
BitsColumn getAllBits() const
Return an integer array with all Flag fields repacked into individual bits.
Key specialization for Flag.
Reports errors that are due to events beyond the control of the program.