Awkward Array: Index Class Reference

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Index Class Referenceabstract

A contiguous, one-dimensional array of integers used to represent data structures, rather than numerical data in the arrays themselves. More...

`#include <Index.h>`

Inheritance diagram for Index:

## Public Types
enum class | Form { i8 , u8 , i32 , u32 , i64 , kNumIndexForm }
| Integer type of an Index, used by ListForm, IndexedForm, etc. More...

## Public Member Functions
virtual | ~Index ()
| Virtual destructor acts as a first non-inline virtual function that determines a specific translation unit in which vtable shall be emitted.
virtual const std::shared_ptr< Index > | shallow_copy () const =0
| Copies this Index node without copying its buffer.
virtual IndexOf< int64_t > | to64 () const =0
| Converts this Index to an `Index64`.
virtual bool | iscontiguous () const =0
| Returns true if this index is contiguous false otherwise.

## Static Public Member Functions
static Form | str2form (const std::string &str)
| Converts a string into a Form enumeration.
static const std::string | form2str (Form form)
| Converts a Form enumeration into a string.

## Detailed Description

A contiguous, one-dimensional array of integers used to represent data structures, rather than numerical data in the arrays themselves.

The Index superclass abstracts over templated specializations:

- `Index8`, which is `IndexOf<int8_t>`
- `IndexU8`, which is `IndexOf<uint8_t>`
- `Index32`, which is `IndexOf<int32_t>`
- `IndexU32`, which is `IndexOf<uint32_t>`
- `Index64`, which is `IndexOf<int64_t>`

## Member Enumeration Documentation

## ◆ Form

enum class Form
| strong

Integer type of an Index, used by ListForm, IndexedForm, etc.

Enumerator
i8 |
u8 |
i32 |
u32 |
i64 |
kNumIndexForm |

## Constructor & Destructor Documentation

## ◆ ~Index()

virtual ~Index | ( |  | ) |
| 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

## ◆ form2str()

static const std::string form2str | ( | Form | form | ) |
| static

Converts a Form enumeration into a string.

## ◆ iscontiguous()

virtual bool iscontiguous | ( |  | ) | const
| pure virtual

Returns true if this index is contiguous false otherwise.

Implemented in IndexOf< T >, and IndexOf< I >.

## ◆ shallow_copy()

virtual const std::shared_ptr< Index > shallow_copy | ( |  | ) | const
| pure virtual

Copies this Index node without copying its buffer.

See also #deep_copy.

Implemented in IndexOf< T >, and IndexOf< I >.

## ◆ str2form()

static Form str2form | ( | const std::string & | str | ) |
| static

Converts a string into a Form enumeration.

## ◆ to64()

virtual IndexOf< int64_t > to64 | ( |  | ) | const
| pure virtual

Converts this Index to an `Index64`.

Implemented in IndexOf< T >, and IndexOf< I >.

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

- include/awkward/Index.h