Awkward Array: SliceItem Class Reference

Loading...
Searching...
No Matches
Public Member Functions | List of all members
SliceItem Class Referenceabstract

Abstract class for slice items, which are elements of a tuple passed to an array's `__getitem__` in Python. More...

`#include <Slice.h>`

Inheritance diagram for SliceItem:

## Public Member Functions
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

Abstract class for slice items, which are elements of a tuple passed to an array's `__getitem__` in Python.

## Constructor & Destructor Documentation

## ◆ ~SliceItem()

virtual ~SliceItem | ( |  | ) |
| virtual

Virtual destructor acts as a first non-inline virtual function that determines a specific translation unit in which vtable shall be emitted.

## Member Function Documentation

## ◆ preserves_type()

virtual bool preserves_type | ( | const Index64 & | advanced | ) | const
| pure virtual

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`.

Implemented in SliceAt, SliceRange, SliceEllipsis, SliceNewAxis, SliceArrayOf< T >, SliceField, SliceFields, SliceMissingOf< T >, and SliceJaggedOf< T >.

## ◆ referentially_equal()

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

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.

Implemented in SliceAt, SliceRange, SliceEllipsis, SliceNewAxis, SliceArrayOf< T >, SliceField, SliceFields, SliceMissingOf< T >, and SliceJaggedOf< T >.

## ◆ shallow_copy()

virtual const SliceItemPtr shallow_copy | ( |  | ) | const
| pure virtual

Copies this node without copying any associated arrays.

Implemented in SliceAt, SliceRange, SliceEllipsis, SliceNewAxis, SliceArrayOf< T >, SliceField, SliceFields, SliceMissingOf< T >, and SliceJaggedOf< T >.

## ◆ tostring()

virtual const std::string tostring | ( |  | ) | const
| pure virtual

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

Implemented in SliceAt, SliceRange, SliceEllipsis, SliceNewAxis, SliceArrayOf< T >, SliceField, SliceFields, SliceMissingOf< T >, and SliceJaggedOf< T >.

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

- include/awkward/Slice.h