Awkward Array: SliceMissingOf< T > Class Template Reference

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

Represents a SliceArrayOf, SliceMissingOf, or SliceJaggedOf with missing values: `None` (no equivalent in NumPy). More...

`#include <Slice.h>`

Inheritance diagram for SliceMissingOf< T >:

## Public Member Functions
| SliceMissingOf (const IndexOf< T > &index, const Index8 &originalmask, const SliceItemPtr &content)
| Creates a SliceMissingOf with a full set of parameters.
const IndexOf< T > | index () const
| Positions in the content or negative values representing `None` in the same sense as `IndexedOptionArray`.
const Index8 | originalmask () const
| The array of booleans from which the index was derived.
const SliceItemPtr | content () const
| The non-`None` values of the array, much like an IndexedOptionArray's `content`.
int64_t | length () const
| The length of the array: `len(index)`.
const SliceItemPtr | shallow_copy () const override
| Copies this node without copying any associated arrays.
const std::string | tostring () const override
| Returns a string representation of this slice item (single-line custom format).
const std::string | tostring_part () const
bool | preserves_type (const Index64 &advanced) const override
| Returns `true` if this slice would preserve an array's slice and therefore should pass on `Content::parameters`.
virtual bool | referentially_equal (const SliceItemPtr &other) const override
| Returns `true` if this slice item has all the same buffers and parameters as `other`; `false` otherwise.
Public Member Functions inherited from SliceItem
virtual | ~SliceItem ()
| Virtual destructor acts as a first non-inline virtual function that determines a specific translation unit in which vtable shall be emitted.
virtual const SliceItemPtr | shallow_copy () const =0
| Copies this node without copying any associated arrays.
virtual const std::string | tostring () const =0
| Returns a string representation of this slice item (single-line custom format).
virtual bool | preserves_type (const Index64 &advanced) const =0
| Returns `true` if this slice would preserve an array's slice and therefore should pass on `Content::parameters`.
virtual bool | referentially_equal (const SliceItemPtr &other) const =0
| Returns `true` if this slice item has all the same buffers and parameters as `other`; `false` otherwise.

## Detailed Description

template<typename T>
class awkward::SliceMissingOf< T >

Represents a SliceArrayOf, SliceMissingOf, or SliceJaggedOf with missing values: `None` (no equivalent in NumPy).

Currently, the only type specialization is `T = int64_t`.

## Constructor & Destructor Documentation

## ◆ SliceMissingOf()

SliceMissingOf | ( | const IndexOf< T > & | index,
|  | const Index8 & | originalmask,
|  | const SliceItemPtr & | content
| ) |  |

Creates a SliceMissingOf with a full set of parameters.

Parameters

  index | Positions in the content or negative values representing `None` in the same sense as `IndexedOptionArray`.
  originalmask | The array of booleans from which the index was derived.
  content | The non-`None` values of the array, much like an IndexedOptionArray's `content`.

## Member Function Documentation

## ◆ content()

const SliceItemPtr content | ( |  | ) | const

The non-`None` values of the array, much like an IndexedOptionArray's `content`.

## ◆ index()

const IndexOf< T > index | ( |  | ) | const

Positions in the content or negative values representing `None` in the same sense as `IndexedOptionArray`.

## ◆ length()

int64_t length | ( |  | ) | const

The length of the array: `len(index)`.

## ◆ originalmask()

const Index8 originalmask | ( |  | ) | const

The array of booleans from which the index was derived.

## ◆ preserves_type()

bool preserves_type | ( | const Index64 & | advanced | ) | const
| overridevirtual

Returns `true` if this slice would preserve an array's slice and therefore should pass on `Content::parameters`.

Parameters

  advanced | The index that is passed through `Content::getitem_next`.

Always `true` for SliceMissingOf.

Note
  This might not be the right choice; it should be revisited.

Implements SliceItem.

## ◆ referentially_equal()

virtual bool referentially_equal | ( | const SliceItemPtr & | other | ) | const
| overridevirtual

Returns `true` if this slice item has all the same buffers and parameters as `other`; `false` otherwise.

Parameters

  other | The slice item to compare this with.

Implements SliceItem.

## ◆ shallow_copy()

const SliceItemPtr shallow_copy | ( |  | ) | const
| overridevirtual

Copies this node without copying any associated arrays.

Implements SliceItem.

## ◆ tostring()

const std::string tostring | ( |  | ) | const
| overridevirtual

Returns a string representation of this slice item (single-line custom format).

Implements SliceItem.

## ◆ tostring_part()

const std::string tostring_part | ( |  | ) | const

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

- include/awkward/Slice.h