lsst.afw 22.0.1-48-g5c39d4753+955d02b84f
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
lsst::afw::table::ColumnViewT< RecordT > Class Template Reference

#include <BaseColumnView.h>

Inheritance diagram for lsst::afw::table::ColumnViewT< RecordT >:
lsst::afw::table::BaseColumnView lsst::afw::table::SourceColumnViewT< RecordT >

Public Types

using Record = RecordT
 
using Table = typename RecordT::Table
 

Public Member Functions

std::shared_ptr< TablegetTable () const
 Return the table that owns the records. More...
 
 ColumnViewT (ColumnViewT const &)=default
 
 ColumnViewT (ColumnViewT &&)=default
 
ColumnViewToperator= (ColumnViewT const &)=default
 
ColumnViewToperator= (ColumnViewT &&)=default
 
 ~ColumnViewT ()=default
 
Schema getSchema () const
 Return the schema that defines the fields. More...
 
template<typename T >
ndarray::ArrayRef< T, 1 > const operator[] (Key< T > const &key) const
 Return a 1-d array corresponding to a scalar field (or subfield). More...
 
template<typename T >
ndarray::ArrayRef< T, 2, 1 > const operator[] (Key< Array< T > > const &key) const
 Return a 2-d array corresponding to an array field. More...
 
ndarray::result_of::vectorize< detail::FlagExtractor, ndarray::Array< Field< Flag >::Elementconst, 1 > >::type operator[] (Key< Flag > const &key) const
 Return a 1-d array expression corresponding to a flag bit. More...
 
BitsColumn getBits (std::vector< Key< Flag > > const &keys) const
 Return an integer array with the given Flag fields repacked into individual bits. More...
 
BitsColumn getAllBits () const
 Return an integer array with all Flag fields repacked into individual bits. More...
 

Static Public Member Functions

template<typename InputIterator >
static ColumnViewT make (std::shared_ptr< Table > const &table, InputIterator first, InputIterator last)
 Construct a BaseColumnView from an iterator range. More...
 
template<typename InputIterator >
static BaseColumnView make (std::shared_ptr< BaseTable > const &table, InputIterator first, InputIterator last)
 Construct a BaseColumnView from an iterator range. More...
 
template<typename InputIterator >
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 table. More...
 

Protected Member Functions

 ColumnViewT (BaseColumnView const &base)
 

Detailed Description

template<typename RecordT>
class lsst::afw::table::ColumnViewT< RecordT >

Definition at line 170 of file BaseColumnView.h.

Member Typedef Documentation

◆ Record

template<typename RecordT >
using lsst::afw::table::ColumnViewT< RecordT >::Record = RecordT

Definition at line 172 of file BaseColumnView.h.

◆ Table

template<typename RecordT >
using lsst::afw::table::ColumnViewT< RecordT >::Table = typename RecordT::Table

Definition at line 173 of file BaseColumnView.h.

Constructor & Destructor Documentation

◆ ColumnViewT() [1/3]

template<typename RecordT >
lsst::afw::table::ColumnViewT< RecordT >::ColumnViewT ( ColumnViewT< RecordT > const &  )
default

◆ ColumnViewT() [2/3]

template<typename RecordT >
lsst::afw::table::ColumnViewT< RecordT >::ColumnViewT ( ColumnViewT< RecordT > &&  )
default

◆ ~ColumnViewT()

template<typename RecordT >
lsst::afw::table::ColumnViewT< RecordT >::~ColumnViewT ( )
default

◆ ColumnViewT() [3/3]

template<typename RecordT >
lsst::afw::table::ColumnViewT< RecordT >::ColumnViewT ( BaseColumnView const &  base)
inlineexplicitprotected

Definition at line 193 of file BaseColumnView.h.

Member Function Documentation

◆ getAllBits()

BitsColumn lsst::afw::table::BaseColumnView::getAllBits ( ) const
inherited

Return an integer array with all Flag fields repacked into individual bits.

The returned object contains both the int64 array and accessors to obtain a mask given a Key or field name.

Exceptions
pex::exceptions::LengthErrorif the schema has more than 64 Flag fields.

Definition at line 147 of file BaseColumnView.cc.

◆ getBits()

BitsColumn lsst::afw::table::BaseColumnView::getBits ( std::vector< Key< Flag > > const &  keys) const
inherited

Return an integer array with the given Flag fields repacked into individual bits.

The returned object contains both the int64 array and accessors to obtain a mask given a Key or field name.

Exceptions
pex::exceptions::LengthErrorif keys.size() > 64

Definition at line 117 of file BaseColumnView.cc.

◆ getSchema()

Schema lsst::afw::table::BaseColumnView::getSchema ( ) const
inlineinherited

Return the schema that defines the fields.

Definition at line 89 of file BaseColumnView.h.

◆ getTable()

template<typename RecordT >
std::shared_ptr< Table > lsst::afw::table::ColumnViewT< RecordT >::getTable ( ) const
inline

Return the table that owns the records.

Definition at line 176 of file BaseColumnView.h.

◆ isRangeContiguous()

template<typename InputIterator >
bool lsst::afw::table::BaseColumnView::isRangeContiguous ( std::shared_ptr< BaseTable > const &  table,
InputIterator  first,
InputIterator  last 
)
staticinherited

Return true if the given record iterator range is continuous and the records all belong to the given table.

This tests exactly the same requiremetns needed to construct a column view, so if this test succeeds, BaseColumnView::make should as well.

Definition at line 218 of file BaseColumnView.h.

◆ make() [1/2]

template<typename InputIterator >
BaseColumnView lsst::afw::table::BaseColumnView::make ( std::shared_ptr< BaseTable > const &  table,
InputIterator  first,
InputIterator  last 
)
staticinherited

Construct a BaseColumnView from an iterator range.

The iterators must dereference to a reference or const reference to a record. If the record data is not contiguous in memory, throws lsst::pex::exceptions::RuntimeError.

Definition at line 197 of file BaseColumnView.h.

◆ make() [2/2]

template<typename RecordT >
template<typename InputIterator >
static ColumnViewT lsst::afw::table::ColumnViewT< RecordT >::make ( std::shared_ptr< Table > const &  table,
InputIterator  first,
InputIterator  last 
)
inlinestatic

Construct a BaseColumnView from an iterator range.

The iterators must dereference to a reference or const reference to a record. If the record data is not contiguous in memory, throws lsst::pex::exceptions::RuntimeError.

Definition at line 182 of file BaseColumnView.h.

◆ operator=() [1/2]

template<typename RecordT >
ColumnViewT & lsst::afw::table::ColumnViewT< RecordT >::operator= ( ColumnViewT< RecordT > &&  )
default

◆ operator=() [2/2]

template<typename RecordT >
ColumnViewT & lsst::afw::table::ColumnViewT< RecordT >::operator= ( ColumnViewT< RecordT > const &  )
default

◆ operator[]() [1/3]

template<typename T >
ndarray::ArrayRef< T, 2, 1 > const lsst::afw::table::BaseColumnView::operator[] ( Key< Array< T > > const &  key) const
inherited

Return a 2-d array corresponding to an array field.

Definition at line 84 of file BaseColumnView.cc.

◆ operator[]() [2/3]

ndarray::result_of::vectorize< detail::FlagExtractor, ndarray::Array< Field< Flag >::Elementconst, 1 > >::type lsst::afw::table::BaseColumnView::operator[] ( Key< Flag > const &  key) const
inherited

Return a 1-d array expression corresponding to a flag bit.

In C++, the return value is a lazy ndarray expression template that performs the bitwise & operation on every element when that element is requested. In Python, the result will be copied into a bool NumPy array.

Definition at line 101 of file BaseColumnView.cc.

◆ operator[]() [3/3]

template<typename T >
ndarray::ArrayRef< T, 1 > const lsst::afw::table::BaseColumnView::operator[] ( Key< T > const &  key) const
inherited

Return a 1-d array corresponding to a scalar field (or subfield).

Definition at line 71 of file BaseColumnView.cc.


The documentation for this class was generated from the following file: