A default constructor is defined to allow construction of an array of ROArrayColumn 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.
Construct for the given column in the given table.
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.
Copy constructor (reference semantics).
Clone the object.
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.
Attach a column to the object.
This is in fact only a shorthand for
reference (ROArrayColumn<T> (table, columnName));
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.
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.
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.
Get the array value in a particular cell (i.e. table row). The row numbers count from 0 until #rows-1.
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.
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.
Get 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.
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.
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.
The get() function like above which does not check shapes, etc.. It is faster and can be used for performance reasons if one knows for sure that the arguments are correct. E.g. it is used internally in virtual column engines.
Referencing any other typed column cannot be done. If we do not put this function here, the conversion constructor ROArrayColumn (const ROTableColumn&) will be used and no compile error is given.
Check if the data type matches the column data type.
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 ROTableColumn ::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 can be done with a putColumn function.
Construct the array column object for the table column.
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.
A const ArrayColumn can only be copied as a ROArrayColumn.
Clone the object.
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.
Attach a column to the object.
This is in fact only a shorthand for
reference (ArrayColumn<T> (table, columnName));
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.
Try to store the array in a tiled way using the given tile 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.
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.
Copy the value of a cell of that column to a cell of this column. The data types of both columns must be the same, otherwise an exception is thrown.
Use the same row numbers for both cells.
Copy the value of a cell of that column to a cell of this column. The data types of both columns must be the same, otherwise an exception is thrown.
Use possibly different row numbers for that (i.e. input) and and this (i.e. output) cell.
Copy the value of a cell of that column to a cell of this column. This function uses a generic ROTableColumn object as input. The data types of both columns must be the same, otherwise an exception is thrown.
Use possibly different row numbers for that (i.e. input) and and this (i.e. output) cell.
Copy the value of a cell of that column to a cell of this column. This function uses a generic ROTableColumn object as input. The data types of both columns must be the same, otherwise an exception is thrown.
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.
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.
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.
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.
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.
Put the same value in all cells of the column.
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.
The put() function like above which does not check shapes, etc.. It is faster and can be used for performance reasons if one knows for sure that the arguments are correct. E.g. it is used internally in virtual column engines.
Referencing any other typed column cannot be done. If we do not put this function here, the conversion constructor ROArrayColumn (const ROTableColumn&) will be used and no compile error is given.