Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1TableVector.html
Дата изменения: Unknown Дата индексирования: Mon Feb 14 21:52:47 2011 Кодировка: Поисковые слова: cygnus |
Templated read/write table column vectors. More...
#include <TableVector.h>
Public Member Functions | |
TableVector () | |
The default constructor creates a null table vector. | |
TableVector (const Table &, const String &) | |
Create a table vector from the given table column name. | |
TableVector (const TableColumn &) | |
Create a table vector from the given table column. | |
TableVector (const TableVector< T > &) | |
Create a table vector from another one (reference semantics). | |
TableVector (const Vector< T > &) | |
Create table vector containing given Vector (reference semantics). | |
TableVector (uInt leng) | |
Create table vector containing a Vector with given length. | |
~TableVector () | |
Destruct the object. | |
void | reference (const TableVector< T > &) |
Make a reference to another TableVector. | |
TableVector< T > & | operator= (const TableVector< T > &) |
Assign a table vector to another one (copy semantics). | |
TableVector< T > & | operator= (const ROTableVector< T > &) |
Assigning to a ROTableVector is impossible, because the vector is readonly. | |
TableVector< T > & | operator= (const T &) |
Set all elements to a value. | |
void | set (const T &value) |
void | set (uInt index, const T &value) |
Put a value into a single pixel. | |
TabVecRep< T > & | tabVec () |
Return the TabVecRep reference. | |
TableVector (TabVecRep< T > &) | |
Create a TableVector from a TabVecRep as result of an operation. |
Templated read/write table column vectors.
Public interface
TableVector allows to operate on a column in a table as a vector.
TableVector is similar to class ROTableVector . The only difference is that it references a column in a Table object, so it can be written.
// Create a table vector for column COL1. Table tab ("Table.data"); TableVector<Int> tabvec(tab, "COL1"); // Multiply it by a constant. // The result is stored back in the vector, thus in the // underlying column. tabvec *= 2;
It is very useful to be able to handle a column as a vector. It allows to manipulate the data in a very convenient way.
Definition at line 270 of file TableVector.h.
casa::TableVector< T >::TableVector | ( | ) |
The default constructor creates a null table vector.
This does not contain an actual vector and cannot be used until it references an actual vector (using function reference). Its purpose is to be able to construct an array of TableVectors. Note that operator(), 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.
casa::TableVector< T >::TableVector | ( | const Table & | , | |
const String & | ||||
) |
Create a table vector from the given table column name.
Only scalar columns are supported.
casa::TableVector< T >::TableVector | ( | const TableColumn & | ) |
Create a table vector from the given table column.
Only scalar columns are supported.
casa::TableVector< T >::TableVector | ( | const TableVector< T > & | ) |
Create a table vector from another one (reference semantics).
casa::TableVector< T >::TableVector | ( | const Vector< T > & | ) |
Create table vector containing given Vector (reference semantics).
casa::TableVector< T >::TableVector | ( | uInt | leng | ) |
Create table vector containing a Vector with given length.
casa::TableVector< T >::~TableVector | ( | ) |
Destruct the object.
casa::TableVector< T >::TableVector | ( | TabVecRep< T > & | vec | ) | [inline] |
Create a TableVector from a TabVecRep as result of an operation.
Definition at line 371 of file TableVector.h.
References casa::TabVecRep< T >::link(), and casa::ROTableVector< T >::tabVecPtr_p.
TableVector< T > & casa::TableVector< T >::operator= | ( | const TableVector< T > & | that | ) | [inline] |
Assign a table vector to another one (copy semantics).
Definition at line 382 of file TableVector.h.
TableVector< T > & casa::TableVector< T >::operator= | ( | const T & | value | ) | [inline] |
Set all elements to a value.
Definition at line 398 of file TableVector.h.
References casa::ROTableVector< T >::tabVecPtr_p.
TableVector< T > & casa::TableVector< T >::operator= | ( | const ROTableVector< T > & | ) | [inline] |
Assigning to a ROTableVector is impossible, because the vector is readonly.
Reimplemented from casa::ROTableVector< T >.
Definition at line 376 of file TableVector.h.
References casa::ROTableVector< T >::tabVec(), and casa::ROTableVector< T >::tabVecPtr_p.
void casa::TableVector< T >::reference | ( | const TableVector< T > & | ) |
Make a reference to another TableVector.
void casa::TableVector< T >::set | ( | const T & | value | ) | [inline] |
Definition at line 393 of file TableVector.h.
References casa::ROTableVector< T >::tabVecPtr_p.
void casa::TableVector< T >::set | ( | uInt | index, | |
const T & | value | |||
) | [inline] |
Put a value into a single pixel.
tabvec(i) = value;
Definition at line 388 of file TableVector.h.
References casa::ROTableVector< T >::tabVecPtr_p.
TabVecRep< T > & casa::TableVector< T >::tabVec | ( | ) | [inline] |
Return the TabVecRep reference.
Definition at line 406 of file TableVector.h.
References casa::ROTableVector< T >::tabVecPtr_p.
Referenced by casa::indgen().