Builds a ListOffsetArray which describes unequal-length lists (often called a "jagged" or "ragged" array). The underlying data for all lists are in a BUILDER content. It is subdivided into lists according to an offsets array, which specifies the starting and stopping index of each list.
More...
|
| ListOffset () |
| Creates a new ListOffset layout builder by allocating a new offset buffer, using default_options for initializing the buffer. More...
|
|
| ListOffset (const awkward::BuilderOptions &options) |
| Creates a new ListOffset layout builder by allocating a new offset buffer, taking options from BuilderOptions for initializing the buffer. More...
|
|
BUILDER & | content () noexcept |
| Returns the reference to the builder content. More...
|
|
BUILDER & | begin_list () noexcept |
| Begins a list and returns the reference to the builder content. More...
|
|
void | end_list () noexcept |
| Ends a list and appends the current length of the list contents in the offsets buffer. More...
|
|
const std::string & | parameters () const noexcept |
| Parameters for the builder form. More...
|
|
void | set_parameters (std::string parameter) noexcept |
| Sets the form parameters. More...
|
|
void | set_id (size_t &id) noexcept |
| Assigns a unique ID to each node. More...
|
|
void | clear () noexcept |
| Discards the accumulated offsets and clears the builder content. More...
|
|
size_t | length () const noexcept |
| Current length of the content. More...
|
|
bool | is_valid (std::string &error) const noexcept |
| Checks for validity and consistency. More...
|
|
void | buffer_nbytes (std::map< std::string, size_t > &names_nbytes) const noexcept |
| Retrieves the names and sizes (in bytes) of the buffers used in the builder and its contents. More...
|
|
void | to_buffers (std::map< std::string, void * > &buffers) const noexcept |
| Copies and concatenates all the accumulated data in each of the buffers of the builder and its contents to user-defined pointers. More...
|
|
void | to_char_buffers (std::map< std::string, uint8_t * > &buffers) const noexcept |
| Copies and concatenates all the accumulated data in the builder to a map of user-allocated buffers. More...
|
|
std::string | form () const noexcept |
| Generates a unique description of the builder and its contents in the form of a JSON-like string. More...
|
|
template<typename PRIMITIVE, typename BUILDER>
class awkward::LayoutBuilder::ListOffset< PRIMITIVE, BUILDER >
Builds a ListOffsetArray which describes unequal-length lists (often called a "jagged" or "ragged" array). The underlying data for all lists are in a BUILDER content. It is subdivided into lists according to an offsets array, which specifies the starting and stopping index of each list.
The offsets must have at least length 1
(corresponding to an empty array).
The offsets values can be 64-bit signed integers int64
, 32-bit signed integers int32
or 32-bit unsigned integers uint32
.
- Template Parameters
-
PRIMITIVE | The type of offsets buffer. |
BUILDER | The type of builder content. |