Loading...
Searching...
No Matches
casacore::ArrayColumn< T > Class Template Reference
tables package (libcasa_tables) » Tables_module

More...

`#include <ArrayColumn.h>`

## Public Member Functions

| ArrayColumn ()
| The default constructor creates a null object, i.e.
| ArrayColumn (const Table &, const String &columnName)
| Construct for the given column in the given table.
| ArrayColumn (const TableColumn &)
| Construct from the given table column.
| ArrayColumn (const ArrayColumn< T > &)
| Copy constructor (reference semantics).
| ~ArrayColumn ()
virtual TableColumn * | clone () const
| Clone the object.
ArrayColumn< T > & | operator= (const ArrayColumn< T > &)
| Assignment uses reference semantics, thus works the same as function reference.
void | reference (const ArrayColumn< T > &)
| Change the reference to another column.
void | attach (const Table &table, const String &columnName)
| Attach a column to the object.
uInt | ndim (rownr_t rownr) const
| Get the #dimensions of an array in a particular cell.
IPosition | shape (rownr_t rownr) const
| Get the shape of an array in a particular cell.
void | get (rownr_t rownr, Array< T > &array, Bool resize=False) const
| Get the array value in a particular cell (i.e.
Array< T > | get (rownr_t rownr) const
Array< T > | operator() (rownr_t rownr) const
void | getSlice (rownr_t rownr, const Slicer &arraySection, Array< T > &array, Bool resize=False) const
| Get a slice of an N-dimensional array in a particular cell (i.e.
Array< T > | getSlice (rownr_t rownr, const Slicer &arraySection) const
void | getSlice (rownr_t rownr, const Vector< Vector< Slice > > &arraySlices, Array< T > &arr, Bool resize=False) const
| Get an irregular slice of an N-dimensional array in a particular cell (i.e.
Array< T > | getSlice (rownr_t rownr, const Vector< Vector< Slice > > &arraySlices) const
void | getColumn (Array< T > &array, Bool resize=False) const
| Get the array of all values in a column.
Array< T > | getColumn () const
void | getColumn (const Slicer &arraySection, Array< T > &array, Bool resize=False) const
| Get regular slices from all arrays in the column.
Array< T > | getColumn (const Slicer &arraySection) const
void | getColumn (const Vector< Vector< Slice > > &arraySection, Array< T > &array, Bool resize=False) const
| Get irregular slices from all arrays in the column as given by the vectors of Slice objects.
Array< T > | getColumn (const Vector< Vector< Slice > > &arraySection) const
void | getColumnRange (const Slicer &rowRange, Array< T > &arr, Bool resize=False) const
| Get the array of some values in a column.
Array< T > | getColumnRange (const Slicer &rowRange) const
void | getColumnCells (const RefRows &rownrs, Array< T > &arr, Bool resize=False) const
Array< T > | getColumnCells (const RefRows &rownrs) const
void | getColumnRange (const Slicer &rowRange, const Slicer &arraySection, Array< T > &arr, Bool resize=False) const
| Get slices from some arrays in a column.
Array< T > | getColumnRange (const Slicer &rowRange, const Slicer &arraySection) const
void | getColumnCells (const RefRows &rownrs, const Slicer &arraySection, Array< T > &arr, Bool resize=False) const
Array< T > | getColumnCells (const RefRows &rownrs, const Slicer &arraySection) const
void | getColumnCells (const RefRows &rows, const ColumnSlicer &slicerSet, Array< T > &destination, Bool resize=False) const
| Similar to getColumn (arraySlices, arr, resize) except it gets the slices for the given rows instead of all rows.
void | setShape (rownr_t rownr, const IPosition &shape)
| Set the shape of the array in the given row.
void | setShape (rownr_t rownr, const IPosition &shape, const IPosition &tileShape)
| Try to store the array in a tiled way using the given tile shape.
void | put (rownr_t rownr, const Array< T > &array)
| Put the array in a particular cell (i.e.
void | put (rownr_t rownr, const TableColumn &that, Bool preserveTileShape=False)
| Copy the value of a cell of that column to a cell of this column.
void | put (rownr_t thisRownr, const TableColumn &that, rownr_t thatRownr, Bool preserveTileShape=False)
| Use possibly different row numbers for that (i.e.
void | put (uInt thisRownr, const TableColumn &that, uInt thatRownr, Bool preserveTileShape=False)
| For backward compatibility (otherwise ambigious with put taking Bool).
void | putSlice (rownr_t rownr, const Slicer &arraySection, const Array< T > &array)
| Put into a slice of an N-dimensional array in a particular cell.
void | putSlice (rownr_t rownr, const Vector< Vector< Slice > > &arraySlices, const Array< T > &arr)
void | putColumn (const Array< T > &array)
| Put the array of all values in the column.
void | putColumn (const Slicer &arraySection, const Array< T > &array)
| Put into subsections of the table arrays in the entire column.
void | putColumn (const Vector< Vector< Slice > > &arraySlices, const Array< T > &arr)
void | putColumnRange (const Slicer &rowRange, const Array< T > &arr)
| Put the array of some values in the column.
void | putColumnCells (const RefRows &rownrs, const Array< T > &arr)
void | putColumnRange (const Slicer &rowRange, const Slicer &arraySection, const Array< T > &arr)
| Put into subsection of the table arrays in some rows of the column.
void | putColumnCells (const RefRows &rownrs, const Slicer &arraySection, const Array< T > &arr)
void | putColumnCells (const RefRows &rows, const Vector< Vector< Slice > > &arraySlices, const Array< T > &arr)
| Same as putColumn(arraySlices, arr) except that it puts for the given rows instead of all rows.
void | putSliceFromRows (const RefRows &rows, const Vector< Vector< Slice > > &arraySlices, const Array< T > &source)
void | putColumnCells (const RefRows &rows, const ColumnSlicer &columnSlicer, const Array< T > &source)
void | fillColumn (const Array< T > &value)
| Put the same value in all cells of the column.
void | putColumn (const ArrayColumn< T > &that)
| Put the contents of a column with the same data type into this column.
Public Member Functions inherited from casacore::ArrayColumnBase
| ArrayColumnBase ()
| The default constructor creates a null object, i.e.
| ArrayColumnBase (const Table &, const String &columnName)
| Construct for the given column in the given table.
| ArrayColumnBase (const TableColumn &column)
| Construct from the given table column.
| ArrayColumnBase (const ArrayColumnBase &)
| Copy constructor (reference semantics).
| ~ArrayColumnBase ()
ArrayColumnBase & | operator= (const ArrayColumnBase &)
| Assignment uses reference semantics, thus works the same as function reference.
void | reference (const ArrayColumnBase &)
| Change the reference to another column.
uInt | ndim (rownr_t rownr) const
| Get the #dimensions of an array in a particular cell.
IPosition | shape (rownr_t rownr) const
| Get the shape of an array in a particular cell.
void | baseGet (rownr_t rownr, ArrayBase &array) const
| Counterparts of the acbGet() functions below not checking shapes, etc.
void | baseGetSlice (rownr_t rownr, const Slicer &arraySection, ArrayBase &array) const
void | acbGet (rownr_t rownr, ArrayBase &array, Bool resize) const
| Get the array value in a particular cell (i.e.
void | acbGetSlice (rownr_t rownr, const Slicer &arraySection, ArrayBase &array, Bool resize) const
| Get a slice of an N-dimensional array in a particular cell (i.e.
void | acbGetSlice (rownr_t rownr, const Vector< Vector< Slice > > &arraySlices, ArrayBase &arr, Bool resize) const
| Get an irregular slice of an N-dimensional array in a particular cell (i.e.
void | acbGetColumn (ArrayBase &array, Bool resize) const
| Get the array of all values in a column.
void | acbGetColumn (const Slicer &arraySection, ArrayBase &array, Bool resize) const
| Get regular slices from all arrays in the column.
void | acbGetColumn (const Vector< Vector< Slice > > &arraySection, ArrayBase &array, Bool resize) const
| Get irregular slices from all arrays in the column as given by the vectors of Slice objects.
void | acbGetColumnRange (const Slicer &rowRange, ArrayBase &arr, Bool resize) const
| Get the array of some values in a column.
void | acbGetColumnCells (const RefRows &rownrs, ArrayBase &arr, Bool resize) const
void | acbGetColumnRange (const Slicer &rowRange, const Slicer &arraySection, ArrayBase &arr, Bool resize) const
| Get slices from some arrays in a column.
void | acbGetColumnCells (const RefRows &rownrs, const Slicer &arraySection, ArrayBase &arr, Bool resize) const
void | acbGetColumnCells (const RefRows &rows, const ColumnSlicer &columnSlicer, ArrayBase &destination, Bool resize) const
| Get various slices from the given rows.
void | setShape (rownr_t rownr, const IPosition &shape)
| Set the shape of the array in the given row.
void | setShape (rownr_t rownr, const IPosition &shape, const IPosition &tileShape)
| Try to store the array in a tiled way using the given tile shape.
void | basePut (rownr_t rownr, const ArrayBase &array)
| Counterparts of the acbPut() functions below not checking shapes, etc.
void | basePutSlice (rownr_t rownr, const Slicer &arraySection, const ArrayBase &array)
void | acbPut (rownr_t rownr, const ArrayBase &array)
| Put the array in a particular cell (i.e.
void | acbPutSlice (rownr_t rownr, const Slicer &arraySection, const ArrayBase &array)
| Put into a slice of an N-dimensional array in a particular cell.
void | acbPutSlice (rownr_t rownr, const Vector< Vector< Slice > > &arraySlices, const ArrayBase &arr)
void | acbPutColumn (const ArrayBase &array)
| Put the array of all values in the column.
void | acbPutColumn (const Slicer &arraySection, const ArrayBase &array)
| Put into subsections of the table arrays in the entire column.
void | acbPutColumn (const Vector< Vector< Slice > > &arraySlices, const ArrayBase &arr)
void | acbPutColumnRange (const Slicer &rowRange, const ArrayBase &arr)
| Put the array of some values in the column.
void | acbPutColumnCells (const RefRows &rownrs, const ArrayBase &arr)
void | acbPutColumnRange (const Slicer &rowRange, const Slicer &arraySection, const ArrayBase &arr)
| Put into subsection of the table arrays in some rows of the column.
void | acbPutColumnCells (const RefRows &rownrs, const Slicer &arraySection, const ArrayBase &arr)
void | acbPutColumnCells (const RefRows &rows, const Vector< Vector< Slice > > &arraySlices, const ArrayBase &source)
| Put various slices in the given rows.
void | acbPutColumnCells (const RefRows &rows, const ColumnSlicer &columnSlicer, const ArrayBase &source)
void | acbFillColumn (const ArrayBase &value)
| Put the same value in all cells of the column.
void | acbPutColumn (const ArrayColumnBase &that)
| Put the contents of that column into this one.
void | adaptShape (const IPosition &shp, ArrayBase &arr, Bool resize, Int64 rownr, const String &where) const
| Adapt the shape of the array if possible.
Bool | checkShape (const IPosition &expShape, const IPosition &arrShape, Bool noSlicing, Int64 rownr, const String &where) const
| Throw an exception if the array does not have the expected shape.
void | handleSlices (const Vector< Vector< Slice > > &slices, BaseSlicesFunctor &functor, const Slicer &slicer, const ArrayBase &array) const
| A common function used by all functions that can get or put irregular array slices.
Public Member Functions inherited from casacore::TableColumn
| TableColumn ()
| The default constructor creates a null object, i.e.
| TableColumn (const Table &, const String &columnName)
| Construct the object for a column in the table using its name.
| TableColumn (const Table &, uInt columnIndex)
| Construct the object for a column in the table using its index.
| TableColumn (const TableColumn &)
| Copy constructor (reference semantics).
virtual | ~TableColumn ()
TableColumn & | operator= (const TableColumn &)
| Assignment has reference semantics.
void | reference (const TableColumn &)
| Change the reference to another column.
void | attach (const Table &table, const String &columnName)
| Attach a column to the object.
void | attach (const Table &table, uInt columnIndex)
Bool | isNull () const
| Test if the object is null, i.e.
void | throwIfNull () const
| Throw an exception if the object is null, i.e.
Bool | isWritable () const
| Test if the column can be written to, thus if the column and the underlying table can be written to.
Bool | isWritableAtAll () const
| Test if the column is writable at all (virtual columns might not be).
void | checkWritable () const
| Check if the column is writable and throw an exception if not.
const TableRecord & | keywordSet () const
| Get readonly access to the column keyword set.
TableRecord & | rwKeywordSet ()
| Get read/write access to the column keyword set.
const ColumnDesc & | columnDesc () const
| Get const access to the column description.
Table | table () const
| Get the Table object this column belongs to.
rownr_t | nrow () const
| Get the number of rows in the column.
Bool | canChangeShape () const
| Can the shape of an already existing non-FixedShape array be changed?
uInt | ndimColumn () const
| Get the global #dimensions of an array (ie.
IPosition | shapeColumn () const
| Get the global shape of an array (ie.
Bool | isDefined (rownr_t rownr) const
| Test if the given cell contains a defined value.
Bool | hasContent (rownr_t rownr=0) const
| Does the column has content in the given row (default is the first row)?
uInt | ndim (rownr_t rownr) const
| Get the #dimensions of an array in a particular cell.
IPosition | shape (rownr_t rownr) const
| Get the shape of an array in a particular cell.
IPosition | tileShape (rownr_t rownr) const
| Get the tile shape of an array in a particular cell.
void | getScalar (rownr_t rownr, Bool &value) const
| Get the value of a scalar in the given row.
void | getScalar (rownr_t rownr, uChar &value) const
void | getScalar (rownr_t rownr, Short &value) const
void | getScalar (rownr_t rownr, uShort &value) const
void | getScalar (rownr_t rownr, Int &value) const
void | getScalar (rownr_t rownr, uInt &value) const
void | getScalar (rownr_t rownr, Int64 &value) const
void | getScalar (rownr_t rownr, float &value) const
void | getScalar (rownr_t rownr, double &value) const
void | getScalar (rownr_t rownr, Complex &value) const
void | getScalar (rownr_t rownr, DComplex &value) const
void | getScalar (rownr_t rownr, String &value) const
Bool | asBool (rownr_t rownr) const
| Get the value from the row and convert it to the required type.
uChar | asuChar (rownr_t rownr) const
Short | asShort (rownr_t rownr) const
uShort | asuShort (rownr_t rownr) const
Int | asInt (rownr_t rownr) const
uInt | asuInt (rownr_t rownr) const
Int64 | asInt64 (rownr_t rownr) const
float | asfloat (rownr_t rownr) const
double | asdouble (rownr_t rownr) const
Complex | asComplex (rownr_t rownr) const
DComplex | asDComplex (rownr_t rownr) const
String | asString (rownr_t rownr) const
void | getScalarValue (rownr_t rownr, Bool *value, const String &) const
| Get the value of a scalar in the given row.
void | getScalarValue (rownr_t rownr, uChar *value, const String &) const
void | getScalarValue (rownr_t rownr, Short *value, const String &) const
void | getScalarValue (rownr_t rownr, uShort *value, const String &) const
void | getScalarValue (rownr_t rownr, Int *value, const String &) const
void | getScalarValue (rownr_t rownr, uInt *value, const String &) const
void | getScalarValue (rownr_t rownr, Int64 *value, const String &) const
void | getScalarValue (rownr_t rownr, float *value, const String &) const
void | getScalarValue (rownr_t rownr, double *value, const String &) const
void | getScalarValue (rownr_t rownr, Complex *value, const String &) const
void | getScalarValue (rownr_t rownr, DComplex *value, const String &) const
void | getScalarValue (rownr_t rownr, String *value, const String &) const
void | getScalarValue (rownr_t rownr, void *value, const String &dataTypeId) const
void | put (rownr_t rownr, const TableColumn &that, Bool preserveTileShape=False)
| Copy the value of a cell of that column to a cell of this column.
void | putColumn (const TableColumn &that)
| Copy the values of that column to this column.
void | putScalar (rownr_t rownr, const Bool &value)
| Put the value of a scalar in the given row.
void | putScalar (rownr_t rownr, const uChar &value)
void | putScalar (rownr_t rownr, const Short &value)
void | putScalar (rownr_t rownr, const uShort &value)
void | putScalar (rownr_t rownr, const Int &value)
void | putScalar (rownr_t rownr, const uInt &value)
void | putScalar (rownr_t rownr, const Int64 &value)
void | putScalar (rownr_t rownr, const float &value)
void | putScalar (rownr_t rownr, const double &value)
void | putScalar (rownr_t rownr, const Complex &value)
void | putScalar (rownr_t rownr, const DComplex &value)
void | putScalar (rownr_t rownr, const String &value)
void | putScalar (rownr_t rownr, const Char *value)
void | checkRowNumber (rownr_t rownr) const
| Check if the row number is valid.
void | setMaximumCacheSize (uInt nbytes) const
| Set the maximum cache size (in bytes) to be used by a storage manager.

## Private Member Functions

void | checkDataType () const
| Check if the data type matches the column data type.

## Additional Inherited Members

Protected Member Functions inherited from casacore::TableColumn
BaseColumn * | baseColPtr () const
| Get the baseColPtr_p of this TableColumn object.
BaseColumn * | baseColPtr (const TableColumn &that) const
| Get the baseColPtr_p of another TableColumn object.
Protected Attributes inherited from casacore::TableColumn
BaseTable * | baseTabPtr_p
BaseColumn * | baseColPtr_p
const ColumnCache * | colCachePtr_p
Bool | canChangeShape_p
Bool | isColWritable_p

## Detailed Description

template<class T>
class casacore::ArrayColumn< T >

Read and write access to an array table column with arbitrary data type

### Intended use:

Public interface

### Review Status

Reviewed By:
  dschieb
Date Reviewed:
  1994/08/10
Test programs:
  none

### Prerequisite

- Table
- ArrayColumnBase

### Etymology

ArrayColumn<T> gives read and write access to an column in a table containing an array with data type T.

### Synopsis

The class ArrayColumn allows readonly access to a column containing arrays with an arbitrary data type. It can handle direct as well as indirect arrays. It is possible to get the data in an individual cell (i.e. table row); either the whole array or a slice of the array can be accessed. It is also possible to get the column as a whole if the arrays in all cells of the column have the same shape (which is always true for direct arrays). As in the case of individual cells it is possible to get the entire arrays or a slice of the arrays.

A default constructor is defined to allow construction of an array of ArrayColumn objects. However, this constructs an object not referencing a column. Functions like get, etc. will fail (i.e. result in a segmentation fault) when used on such objects. The functions isNull and throwIfNull can be used to test on this. The functions attach and reference can fill in the object.

The assignment operator is not defined for this class, because it was felt it would be too confusing. Instead the function reference can be used to do assignment with reference semantics. An assignment with copy semantics makes no sense for a readonly column.

### Template Type Argument Requirements (T)

- Default constructor
- Copy constructor
- Assignment operator

### Example

See module Tables.

Definition at line 97 of file ArrayColumn.h.

## Constructor & Destructor Documentation

## ArrayColumn() [1/4]

template<class T>

casacore::ArrayColumn< T >::ArrayColumn | ( |  | ) |

The default constructor creates a null object, i.e.

it does not reference a table column. The sole purpose of this constructor is to allow construction of an array of ArrayColumn objects. The functions reference and attach can be used to make a null object reference a column. Note that get functions, etc. will cause a segmentation fault when operating on a null object. It was felt it was too expensive to test on null over and over again. The user should use the isNull or throwIfNull function in case of doubt.

Referenced by ArrayColumn(), attach(), operator=(), putColumn(), and reference().

## ArrayColumn() [2/4]

template<class T>

casacore::ArrayColumn< T >::ArrayColumn | ( | const Table & | ,
|  | const String & | columnName )

Construct for the given column in the given table.

## ArrayColumn() [3/4]

template<class T>

casacore::ArrayColumn< T >::ArrayColumn | ( | const TableColumn & |  | ) |

explicit

Construct from the given table column.

This constructor is useful if first a table column was constructed, its type is determined and thereafter used to construct the correct column object.

## ArrayColumn() [4/4]

template<class T>

casacore::ArrayColumn< T >::ArrayColumn | ( | const ArrayColumn< T > & |  | ) |

Copy constructor (reference semantics).

References ArrayColumn().

## ~ArrayColumn()

template<class T>

casacore::ArrayColumn< T >::~ArrayColumn | ( |  | ) |

## Member Function Documentation

## attach()

template<class T>

void casacore::ArrayColumn< T >::attach | ( | const Table & | table,
|  | const String & | columnName )

inline

Attach a column to the object.

This is in fact only a shorthand for
reference (ArrayColumn<T> (table, columnName));

Definition at line 144 of file ArrayColumn.h.

References ArrayColumn(), and casacore::TableColumn::table().

## checkDataType()

template<class T>

void casacore::ArrayColumn< T >::checkDataType | ( |  | ) | const

private

Check if the data type matches the column data type.

## clone()

template<class T>

virtual TableColumn * casacore::ArrayColumn< T >::clone | ( |  | ) | const

virtual

Clone the object.

Reimplemented from casacore::TableColumn.

## fillColumn()

template<class T>

void casacore::ArrayColumn< T >::fillColumn | ( | const Array< T > & | value | ) |

Put the same value in all cells of the column.

References casacore::NewDelAllocator< T >::value.

## get() [1/2]

template<class T>

Array< T > casacore::ArrayColumn< T >::get | ( | rownr_t | rownr | ) | const

## get() [2/2]

template<class T>

void casacore::ArrayColumn< T >::get | ( | rownr_t | rownr,
|  | Array< T > & | array,
|  | Bool | resize = False ) const

Get the array value in a particular cell (i.e.

table row). The row numbers count from 0 until #rows-1.

According to the assignment rules of class Array, the destination array must be empty or its shape must conform the table array shape. However, if the resize flag is set the destination array will be resized if not conforming.

References casacore::array, and casacore::False.

Referenced by casacore::areEQ().

## getColumn() [1/6]

template<class T>

Array< T > casacore::ArrayColumn< T >::getColumn | ( |  | ) | const

## getColumn() [2/6]

template<class T>

void casacore::ArrayColumn< T >::getColumn | ( | Array< T > & | array,
|  | Bool | resize = False ) const

Get the array of all values in a column.

If the column contains n-dim arrays, the resulting array is (n+1)-dim with the last dimension representing the number of rows. The arrays in the column must have the same shape in all cells.

According to the assignment rules of class Array, the destination array must be empty or its shape must conform the resulting (n+1)-dim array. However, if the resize flag is set the destination array will be resized if not conforming.

References casacore::array, and casacore::False.

## getColumn() [3/6]

template<class T>

Array< T > casacore::ArrayColumn< T >::getColumn | ( | const Slicer & | arraySection | ) | const

## getColumn() [4/6]

template<class T>

void casacore::ArrayColumn< T >::getColumn | ( | const Slicer & | arraySection,
|  | Array< T > & | array,
|  | Bool | resize = False ) const

Get regular slices from all arrays in the column.

If the column contains n-dim arrays, the resulting array is (n+1)-dim. with the last dimension representing the number of rows and the other dimensions representing the shape of the slice. The arrays in the column must have the same shape in all cells.

According to the assignment rules of class Array, the destination array must be empty or its shape must conform the resulting (n+1)-dim array. However, if the resize flag is set the destination array will be resized if not conforming.

References casacore::array, and casacore::False.

## getColumn() [5/6]

template<class T>

Array< T > casacore::ArrayColumn< T >::getColumn | ( | const Vector< Vector< Slice > > & | arraySection | ) | const

## getColumn() [6/6]

template<class T>

void casacore::ArrayColumn< T >::getColumn | ( | const Vector< Vector< Slice > > & | arraySection,
|  | Array< T > & | array,
|  | Bool | resize = False ) const

Get irregular slices from all arrays in the column as given by the vectors of Slice objects.

The outer vector represents the array axes. A missing or empty axis means the entire axis. The inner vector represents the slices to take for each axis. For example, to get slices from 2-dim arrays:

Vector<Vector<Slice> > slices(2); // 2-dim
slices[1].resize (3); // 3 slices in 2nd dim
slices[1][0] = Slice(100,20);
slices[1][1] = Slice(200,18);
slices[1][2] = Slice(538,30,2);
// Get data. Vector of first axis is empty, thus entire axis is read.
Array<Complex> data = dataCol.getColumn (slices);
casacore::Array
Definition Array.h:155
casacore::Slice
Definition Slice.h:89
casacore::Vector
Definition Vector.h:82

If the column contains n-dim arrays, the resulting array is (n+1)-dim. with the last dimension representing the number of rows and the other dimensions representing the shape of the slice. The arrays in the column must have the same shape in all cells.

According to the assignment rules of class Array, the destination array must be empty or its shape must conform the resulting (n+1)-dim array. However, if the resize flag is set the destination array will be resized if not conforming.

References casacore::array, and casacore::False.

## getColumnCells() [1/5]

template<class T>

Array< T > casacore::ArrayColumn< T >::getColumnCells | ( | const RefRows & | rownrs | ) | const

## getColumnCells() [2/5]

template<class T>

void casacore::ArrayColumn< T >::getColumnCells | ( | const RefRows & | rownrs,
|  | Array< T > & | arr,
|  | Bool | resize = False ) const

References casacore::False.

## getColumnCells() [3/5]

template<class T>

Array< T > casacore::ArrayColumn< T >::getColumnCells | ( | const RefRows & | rownrs,
|  | const Slicer & | arraySection ) const

## getColumnCells() [4/5]

template<class T>

void casacore::ArrayColumn< T >::getColumnCells | ( | const RefRows & | rownrs,
|  | const Slicer & | arraySection,
|  | Array< T > & | arr,
|  | Bool | resize = False ) const

References casacore::False.

## getColumnCells() [5/5]

template<class T>

void casacore::ArrayColumn< T >::getColumnCells | ( | const RefRows & | rows,
|  | const ColumnSlicer & | slicerSet,
|  | Array< T > & | destination,
|  | Bool | resize = False ) const

Similar to getColumn (arraySlices, arr, resize) except it gets the slices for the given rows instead of all rows.

References casacore::False.

## getColumnRange() [1/4]

template<class T>

Array< T > casacore::ArrayColumn< T >::getColumnRange | ( | const Slicer & | rowRange | ) | const

## getColumnRange() [2/4]

template<class T>

void casacore::ArrayColumn< T >::getColumnRange | ( | const Slicer & | rowRange,
|  | Array< T > & | arr,
|  | Bool | resize = False ) const

Get the array of some values in a column.

The Slicer object can be used to specify start, end (or length), and stride of the rows to get. If the column contains n-dim arrays, the resulting array is (n+1)-dim with the last dimension representing the number of rows in the slicer. The arrays in the column must have the same shape in all those cells. According to the assignment rules of class Array, the destination array must be empty or its shape must conform the resulting (n+1)-dim array. However, if the resize flag is set the destination array will be resized if not conforming.

References casacore::False.

## getColumnRange() [3/4]

template<class T>

Array< T > casacore::ArrayColumn< T >::getColumnRange | ( | const Slicer & | rowRange,
|  | const Slicer & | arraySection ) const

## getColumnRange() [4/4]

template<class T>

void casacore::ArrayColumn< T >::getColumnRange | ( | const Slicer & | rowRange,
|  | const Slicer & | arraySection,
|  | Array< T > & | arr,
|  | Bool | resize = False ) const

Get slices from some arrays in a column.

The first Slicer object can be used to specify start, end (or length), and stride of the rows to get. The second Slicer object can be used to specify the slice to take from each array. If the column contains n-dim arrays, the resulting array is (n+1)-dim with the last dimension representing the number of rows in the slicer. The arrays in the column must have the same shape in all those cells. According to the assignment rules of class Array, the destination array must be empty or its shape must conform the resulting (n+1)-dim array. However, if the resize flag is set the destination array will be resized if not conforming.

References casacore::False.

## getSlice() [1/4]

template<class T>

Array< T > casacore::ArrayColumn< T >::getSlice | ( | rownr_t | rownr,
|  | const Slicer & | arraySection ) const

## getSlice() [2/4]

template<class T>

void casacore::ArrayColumn< T >::getSlice | ( | rownr_t | rownr,
|  | const Slicer & | arraySection,
|  | Array< T > & | array,
|  | Bool | resize = False ) const

Get a slice of an N-dimensional array in a particular cell (i.e.

table row). The row numbers count from 0 until #rows-1. The dimensionality of the slice must match the dimensionality of the table array and the slice definition should not exceed the shape of the table array.

According to the assignment rules of class Array, the destination array must be empty or its shape must conform the shape of the table array slice. However, if the resize flag is set the destination array will be resized if not conforming.

References casacore::array, and casacore::False.

## getSlice() [3/4]

template<class T>

Array< T > casacore::ArrayColumn< T >::getSlice | ( | rownr_t | rownr,
|  | const Vector< Vector< Slice > > & | arraySlices ) const

## getSlice() [4/4]

template<class T>

void casacore::ArrayColumn< T >::getSlice | ( | rownr_t | rownr,
|  | const Vector< Vector< Slice > > & | arraySlices,
|  | Array< T > & | arr,
|  | Bool | resize = False ) const

Get an irregular slice of an N-dimensional array in a particular cell (i.e.

table row) as given by the vectors of Slice objects. The outer vector represents the array axes. A missing or empty axis means the entire axis. The inner vector represents the slices to take for each axis. For example, to get slices from 2-dim arrays:

Vector<Vector<Slice> > slices(2); // 2-dim
slices[1].resize (3); // 3 slices in 2nd dim
slices[1][0] = Slice(100,20);
slices[1][1] = Slice(200,18);
slices[1][2] = Slice(538,30,2);
// Get data. Vector of first axis is empty, thus entire axis is read.
Array<Complex> data = dataCol.getColumn (slices);

If the column contains n-dim arrays, the resulting array is (n+1)-dim. with the last dimension representing the number of rows and the other dimensions representing the shape of the slice. The arrays in the column must have the same shape in all cells.

According to the assignment rules of class Array, the destination array must be empty or its shape must conform the resulting (n+1)-dim array. However, if the resize flag is set the destination array will be resized if not conforming.

References casacore::False.

## ndim()

template<class T>

uInt casacore::ArrayColumn< T >::ndim | ( | rownr_t | rownr | ) | const

inline

Get the #dimensions of an array in a particular cell.

If the cell does not contain an array, 0 is returned. Use the function isDefined to test if the cell contains an array.

Definition at line 150 of file ArrayColumn.h.

References casacore::TableColumn::baseColPtr_p, and TABLECOLUMNCHECKROW.

## operator()()

template<class T>

Array< T > casacore::ArrayColumn< T >::operator() | ( | rownr_t | rownr | ) | const

## operator=()

template<class T>

ArrayColumn< T > & casacore::ArrayColumn< T >::operator= | ( | const ArrayColumn< T > & |  | ) |

Assignment uses reference semantics, thus works the same as function reference.

References ArrayColumn().

## put() [1/4]

template<class T>

void casacore::ArrayColumn< T >::put | ( | rownr_t | rownr,
|  | const Array< T > & | array )

Put the array in a particular cell (i.e.

table row). The row numbers count from 0 until #rows-1. If the shape of the table array in that cell has not already been defined, it will be defined implicitly.

References casacore::array.

Referenced by put(), and put().

## put() [2/4]

template<class T>

void casacore::ArrayColumn< T >::put | ( | rownr_t | rownr,
|  | const TableColumn & | that,
|  | Bool | preserveTileShape = False )

inline

Copy the value of a cell of that column to a cell of this column.

This function uses a generic TableColumn object as input. The data types of both columns must be the same, otherwise an exception is thrown.

Use the same row numbers for both cells.

Definition at line 354 of file ArrayColumn.h.

References casacore::False, and put().

## put() [3/4]

template<class T>

void casacore::ArrayColumn< T >::put | ( | rownr_t | thisRownr,
|  | const TableColumn & | that,
|  | rownr_t | thatRownr,
|  | Bool | preserveTileShape = False )

virtual

Use possibly different row numbers for that (i.e.

input) and and this (i.e. output) cell.

Reimplemented from casacore::TableColumn.

References casacore::False.

## put() [4/4]

template<class T>

void casacore::ArrayColumn< T >::put | ( | uInt | thisRownr,
|  | const TableColumn & | that,
|  | uInt | thatRownr,
|  | Bool | preserveTileShape = False )

inline

For backward compatibility (otherwise ambigious with put taking Bool).

Definition at line 362 of file ArrayColumn.h.

References casacore::False, and put().

## putColumn() [1/4]

template<class T>

void casacore::ArrayColumn< T >::putColumn | ( | const Array< T > & | array | ) |

Put the array of all values in the column.

If the column contains n-dim arrays, the source array must be (n+1)-dim with the last dimension representing the number of rows.

References casacore::array.

## putColumn() [2/4]

template<class T>

void casacore::ArrayColumn< T >::putColumn | ( | const ArrayColumn< T > & | that | ) |

Put the contents of a column with the same data type into this column.

To put the contents of a column with a different data type into this column, the function TableColumn::putColumn can be used (provided the data type promotion is possible). In fact, this function is an assignment operator with copy semantics.

References ArrayColumn().

## putColumn() [3/4]

template<class T>

void casacore::ArrayColumn< T >::putColumn | ( | const Slicer & | arraySection,
|  | const Array< T > & | array )

Put into subsections of the table arrays in the entire column.

If the column contains n-dim arrays, the source array is (n+1)-dim with the last dimension representing the number of rows and other dimensions representing the shape of the slice. The dimensionality of the slice must match the dimensionality of the table array, thus must be n-dim. Also the slice definition should not exceed the shape of the table arrays.

References casacore::array.

## putColumn() [4/4]

template<class T>

void casacore::ArrayColumn< T >::putColumn | ( | const Vector< Vector< Slice > > & | arraySlices,
|  | const Array< T > & | arr )

## putColumnCells() [1/4]

template<class T>

void casacore::ArrayColumn< T >::putColumnCells | ( | const RefRows & | rownrs,
|  | const Array< T > & | arr )

Referenced by putSliceFromRows().

## putColumnCells() [2/4]

template<class T>

void casacore::ArrayColumn< T >::putColumnCells | ( | const RefRows & | rownrs,
|  | const Slicer & | arraySection,
|  | const Array< T > & | arr )

## putColumnCells() [3/4]

template<class T>

void casacore::ArrayColumn< T >::putColumnCells | ( | const RefRows & | rows,
|  | const ColumnSlicer & | columnSlicer,
|  | const Array< T > & | source )

## putColumnCells() [4/4]

template<class T>

void casacore::ArrayColumn< T >::putColumnCells | ( | const RefRows & | rows,
|  | const Vector< Vector< Slice > > & | arraySlices,
|  | const Array< T > & | arr )

Same as putColumn(arraySlices, arr) except that it puts for the given rows instead of all rows.

## putColumnRange() [1/2]

template<class T>

void casacore::ArrayColumn< T >::putColumnRange | ( | const Slicer & | rowRange,
|  | const Array< T > & | arr )

Put the array of some values in the column.

The Slicer object can be used to specify start, end (or length), and stride of the rows to put. If the column contains n-dim arrays, the source array must be (n+1)-dim with the last dimension representing the number of rows in the slicer.

## putColumnRange() [2/2]

template<class T>

void casacore::ArrayColumn< T >::putColumnRange | ( | const Slicer & | rowRange,
|  | const Slicer & | arraySection,
|  | const Array< T > & | arr )

Put into subsection of the table arrays in some rows of the column.

The first Slicer object can be used to specify start, end (or length), and stride of the rows to put. The second Slicer object can be used to specify the slice to take from each array. If the column contains n-dim arrays, the source array must be (n+1)-dim with the last dimension representing the number of rows in the slicer.

## putSlice() [1/2]

template<class T>

void casacore::ArrayColumn< T >::putSlice | ( | rownr_t | rownr,
|  | const Slicer & | arraySection,
|  | const Array< T > & | array )

Put into a slice of an N-dimensional array in a particular cell.

The row numbers count from 0 until #rows-1. The shape of the table array must have been defined. The dimensionality of the slice must match the dimensionality of the table array and the slice definition should not exceed the shape of the table array.

References casacore::array.

## putSlice() [2/2]

template<class T>

void casacore::ArrayColumn< T >::putSlice | ( | rownr_t | rownr,
|  | const Vector< Vector< Slice > > & | arraySlices,
|  | const Array< T > & | arr )

## putSliceFromRows()

template<class T>

void casacore::ArrayColumn< T >::putSliceFromRows | ( | const RefRows & | rows,
|  | const Vector< Vector< Slice > > & | arraySlices,
|  | const Array< T > & | source )

inline

Definition at line 425 of file ArrayColumn.h.

References putColumnCells().

## reference()

template<class T>

void casacore::ArrayColumn< T >::reference | ( | const ArrayColumn< T > & |  | ) |

Change the reference to another column.

This is in fact an assignment operator with reference semantics. It removes the reference to the current column and creates a reference to the column referenced in the other object. It will handle null objects correctly.

References ArrayColumn().

## setShape() [1/2]

template<class T>

void casacore::ArrayColumn< T >::setShape | ( | rownr_t | rownr,
|  | const IPosition & | shape )

Set the shape of the array in the given row.

Setting the shape is needed if the array is put in slices, otherwise the table system would not know the shape.

References shape().

## setShape() [2/2]

template<class T>

void casacore::ArrayColumn< T >::setShape | ( | rownr_t | rownr,
|  | const IPosition & | shape,
|  | const IPosition & | tileShape )

Try to store the array in a tiled way using the given tile shape.

References shape(), and casacore::TableColumn::tileShape().

## shape()

template<class T>

IPosition casacore::ArrayColumn< T >::shape | ( | rownr_t | rownr | ) | const

inline

Get the shape of an array in a particular cell.

If the cell does not contain an array, a 0-dim shape is returned. Use the function isDefined to test if the cell contains an array.

Definition at line 156 of file ArrayColumn.h.

References casacore::TableColumn::baseColPtr_p, and TABLECOLUMNCHECKROW.

Referenced by setShape(), and setShape().

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

- fits/FITS/CopyRecord.h
- tables/Tables/ArrayColumn.h