Arrow-encoded data of a column of components.
More...
#include <rerun/component_column.hpp>
|
Error | to_c_ffi_struct (rr_component_column &out_component_batch) const |
| To rerun C API component batch.
|
|
|
std::shared_ptr< arrow::Array > | array |
| Arrow-encoded list array of component batches.
|
|
ComponentTypeHandle | component_type |
| The type of the component instances in array.
|
|
Arrow-encoded data of a column of components.
This is essentially an array of rerun::ComponentBatch
with all batches continuously in a single array.
- See also
rerun::RecordingStream::send_columns
◆ from_loggable_with_lengths()
Creates a new component column from a collection of component instances.
Automatically registers the component type the first time this type is encountered.
- Parameters
-
components | Continuous collection of components which is about to be partitioned. |
lengths | The number of components in each run. for rerun::RecordingStream::send_columns , this specifies the number of components at each time point. The sum of the lengths must be equal to the number of components in the batch. |
◆ from_loggable()
Creates a new component column from a collection of component instances where each run has a length of one.
When used with rerun::RecordingStream::send_columns
, this is equivalent to from_loggable(components, std::vector{1, 1, ...})
. I.e. there's a single component for each time point.
Automatically registers the component type the first time this type is encountered.
- Parameters
-
components | Continuous collection of components which is about to be partitioned into runs of length one. |
◆ from_batch_with_lengths()
Creates a new component batch partition from a batch and a collection of run lengths.
- Parameters
-
batch | A batch of components which is about to be partitioned. |
lengths | The number of components in each run. for rerun::RecordingStream::send_columns , this specifies the number of components at each time point. The sum of the lengths must be equal to the number of components in the batch. |
list_array_type | The type of the list array to use for the component column. Can be retrieved using list_array_type_for<T>() . |
◆ from_batch_with_offsets()
Creates a new component batch partition from a batch and a collection of component offsets.
- Parameters
-
batch | A batch of components which is about to be partitioned. |
offsets | An offset within batch for each array of components. The last offset is the total number of components in the batch. Meaning that this array has to be one element longer than the number of component runs. E.g. a ParitionedComponentBatch with a single component would have an offset array of [0, 1] . A ComponentColumn with 5 components divided into runs of length 2 and 3 |
list_array_type | The type of the list array to use for the component column. Can be retrieved using list_array_type_for<T>() . |
◆ list_array_type_for() [1/2]
template<typename T >
static const std::shared_ptr< arrow::DataType > & rerun::ComponentColumn::list_array_type_for |
( |
| ) |
|
|
inlinestatic |
Returns the list array type for the given loggable type.
Lazily creates the type on first call and then returns a reference to it.
◆ list_array_type_for() [2/2]
static std::shared_ptr< arrow::DataType > rerun::ComponentColumn::list_array_type_for |
( |
std::shared_ptr< arrow::DataType > |
inner_type | ) |
|
|
static |
Creates a new arrow::Datatype for an underlying type.
To avoid repeated allocation, use the templated version of this method.
◆ to_c_ffi_struct()
Error rerun::ComponentColumn::to_c_ffi_struct |
( |
rr_component_column & |
out_component_batch | ) |
const |
To rerun C API component batch.
The resulting rr_component_column
keeps the arrow::Array
alive until it is released.
The documentation for this struct was generated from the following file: