Awkward Array: Unmasked< BUILDER > Class Template Reference

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Unmasked< BUILDER > Class Template Reference

Builds an UnmaskedArray which the values are never, in fact, missing. It exists to satisfy systems that formally require this high-level type without the overhead of generating an array of all True or all False values. More...

`#include <LayoutBuilder.h>`

## Public Member Functions
| Unmasked ()
| Creates a new Unmasked layout builder. More...
BUILDER & | content () noexcept
| Returns the reference to the builder content. More...
BUILDER & | append_valid () noexcept
| Returns the reference to the builder content. More...
BUILDER & | extend_valid (size_t size) noexcept
| Returns the reference to the builder content. 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
| 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...

## Detailed Description

template<typename BUILDER>
class awkward::LayoutBuilder::Unmasked< BUILDER >

Builds an UnmaskedArray which the values are never, in fact, missing. It exists to satisfy systems that formally require this high-level type without the overhead of generating an array of all True or all False values.

This is similar to NumPy's masked arrays with mask=None.

Template Parameters

  BUILDER | The type of builder content.

## Constructor & Destructor Documentation

## ◆ Unmasked()

Unmasked | ( |  | ) |
| inline

Creates a new Unmasked layout builder.

## Member Function Documentation

## ◆ append_valid()

BUILDER & append_valid | ( |  | ) |
| inlinenoexcept

Returns the reference to the builder content.

After this, avalid element is inserted in the builder content.

## ◆ buffer_nbytes()

void buffer_nbytes | ( | std::map< std::string, size_t > & | names_nbytes | ) | const
| inlinenoexcept

Retrieves the names and sizes (in bytes) of the buffers used in the builder and its contents.

## ◆ clear()

void clear | ( |  | ) |
| inlinenoexcept

Clears the builder content.

## ◆ content()

BUILDER & content | ( |  | ) |
| inlinenoexcept

Returns the reference to the builder content.

## ◆ extend_valid()

BUILDER & extend_valid | ( | size_t | size | ) |
| inlinenoexcept

Returns the reference to the builder content.

After this, `size` number of valid elements are inserted in the builder content.

Just an interface; not actually faster than calling append many times.

## ◆ form()

std::string form | ( |  | ) | const
| inlinenoexcept

Generates a unique description of the builder and its contents in the form of a JSON-like string.

## ◆ is_valid()

bool is_valid | ( | std::string & | error | ) | const
| inlinenoexcept

Checks for validity and consistency.

## ◆ length()

size_t length | ( |  | ) | const
| inlinenoexcept

Current length of the content.

## ◆ parameters()

const std::string & parameters | ( |  | ) | const
| inlinenoexcept

Parameters for the builder form.

## ◆ set_id()

void set_id | ( | size_t & | id | ) |
| inlinenoexcept

Assigns a unique ID to each node.

## ◆ set_parameters()

void set_parameters | ( | std::string | parameter | ) |
| inlinenoexcept

Sets the form parameters.

## ◆ to_buffers()

void to_buffers | ( | std::map< std::string, void * > & | buffers | ) | const
| inlinenoexcept

Copies and concatenates all the accumulated data in each of the buffers of the builder and its contents to user-defined pointers.

Used to fill the buffers map by allocating it with user-defined pointers using the same names and sizes (in bytes) obtained from buffer_nbytes.

## ◆ to_char_buffers()

void to_char_buffers | ( | std::map< std::string, uint8_t * > & | buffers | ) | const
| inlinenoexcept

Copies and concatenates all the accumulated data in the builder to a map of user-allocated buffers.

The map keys and the buffer sizes are obtained from buffer_nbytes

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

- src/awkward/_v2/cpp-headers/awkward/LayoutBuilder.h