Awkward Array: PyArrayGenerator Class Reference

Loading...
Searching...
No Matches
Public Member Functions | List of all members
PyArrayGenerator Class Reference

`#include <virtual.h>`

Inheritance diagram for PyArrayGenerator:

## Public Member Functions
| PyArrayGenerator (const ak::FormPtr &form, int64_t length, const py::object &callable, const py::tuple &args, const py::dict &kwargs)
const py::object | callable () const
const py::tuple | args () const
const py::dict | kwargs () const
const ak::ContentPtr | generate () const override
| Creates an array but does not check it against the form. More...
void | caches (std::vector< ak::ArrayCachePtr > &out) const override
| Accumulates all the unique #ArrayCache objects from nested #VirtualArray nodes. (Uniqueness is determined by pointer value.) More...
const std::string | tostring_part (const std::string &indent, const std::string &pre, const std::string &post) const override
| Returns a string representation of this ArrayGenerator. More...
const std::shared_ptr< ak::ArrayGenerator > | shallow_copy () const override
| Copies this ArrayGenerator, referencing any contents. More...
const std::shared_ptr< ak::ArrayGenerator > | with_form (const ak::FormPtr &form) const override
| Return a copy of this ArrayGenerator with a different form (or a now-known form, whereas it might have been unknown before). More...
const std::shared_ptr< ak::ArrayGenerator > | with_length (int64_t length) const override
| Return a copy of this ArrayGenerator with a different length (or a now-known length, whereas it might have been unknown before). More...
const std::shared_ptr< ak::ArrayGenerator > | with_callable (const py::object &callable) const
const std::shared_ptr< ak::ArrayGenerator > | with_args (const py::tuple &args) const
const std::shared_ptr< ak::ArrayGenerator > | with_kwargs (const py::dict &kwargs) const
virtual bool | referentially_equal (const ak::ArrayGeneratorPtr &other) const override
| Returns `true` if this generator has all the same buffers and parameters as `other`; `false` otherwise. More...
Public Member Functions inherited from ArrayGenerator
| ArrayGenerator (const FormPtr &form, int64_t length)
| Called by subclasses to set the form of an ArrayGenerator. More...
virtual | ~ArrayGenerator ()
| Virtual destructor acts as a first non-inline virtual function that determines a specific translation unit in which vtable shall be emitted. More...
const FormPtr | form () const
| The Form the generated array is expected to take; may be `nullptr`. More...
int64_t | length () const
| The length the generated array is expected to have; may be negative to indicate that the length is unknown. More...
virtual const ContentPtr | generate () const =0
| Creates an array but does not check it against the form. More...
const ContentPtr | generate_and_check ()
| Creates an array and checks it against the form. If form was not available initially, no check is made and the form inferred from the result is saved in case it is useful later. More...
virtual void | caches (std::vector< ArrayCachePtr > &out) const =0
| Accumulates all the unique #ArrayCache objects from nested #VirtualArray nodes. (Uniqueness is determined by pointer value.) More...
virtual const std::string | tostring_part (const std::string &indent, const std::string &pre, const std::string &post) const =0
| Returns a string representation of this ArrayGenerator. More...
virtual const std::shared_ptr< ArrayGenerator > | shallow_copy () const =0
| Copies this ArrayGenerator, referencing any contents. More...
virtual const std::shared_ptr< ArrayGenerator > | with_form (const FormPtr &form) const =0
| Return a copy of this ArrayGenerator with a different form (or a now-known form, whereas it might have been unknown before). More...
virtual const std::shared_ptr< ArrayGenerator > | with_length (int64_t length) const =0
| Return a copy of this ArrayGenerator with a different length (or a now-known length, whereas it might have been unknown before). More...
virtual bool | referentially_equal (const ArrayGeneratorPtr &other) const =0
| Returns `true` if this generator has all the same buffers and parameters as `other`; `false` otherwise. More...

## Additional Inherited Members
Protected Attributes inherited from ArrayGenerator
const FormPtr | form_
FormPtr | inferred_form_ {nullptr}
int64_t | length_

## Constructor & Destructor Documentation

## ◆ PyArrayGenerator()

PyArrayGenerator | ( | const ak::FormPtr & | form,
|  | int64_t | length,
|  | const py::object & | callable,
|  | const py::tuple & | args,
|  | const py::dict & | kwargs
| ) |  |

## Member Function Documentation

## ◆ args()

const py::tuple args | ( |  | ) | const

## ◆ caches()

void caches | ( | std::vector< ak::ArrayCachePtr > & | out | ) | const
| overridevirtual

Accumulates all the unique #ArrayCache objects from nested #VirtualArray nodes. (Uniqueness is determined by pointer value.)

Implements ArrayGenerator.

## ◆ callable()

const py::object callable | ( |  | ) | const

## ◆ generate()

const ak::ContentPtr generate | ( |  | ) | const
| overridevirtual

Creates an array but does not check it against the form.

Implements ArrayGenerator.

## ◆ kwargs()

const py::dict kwargs | ( |  | ) | const

## ◆ referentially_equal()

virtual bool referentially_equal | ( | const ak::ArrayGeneratorPtr & | other | ) | const
| overridevirtual

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

Parameters

  other | The generator to compare this with.

Implements ArrayGenerator.

## ◆ shallow_copy()

const std::shared_ptr< ak::ArrayGenerator > shallow_copy | ( |  | ) | const
| overridevirtual

Copies this ArrayGenerator, referencing any contents.

Implements ArrayGenerator.

## ◆ tostring_part()

const std::string tostring_part | ( | const std::string & | indent,
|  | const std::string & | pre,
|  | const std::string & | post
| ) |  | const
| overridevirtual

Returns a string representation of this ArrayGenerator.

Implements ArrayGenerator.

## ◆ with_args()

const std::shared_ptr< ak::ArrayGenerator > with_args | ( | const py::tuple & | args | ) | const

## ◆ with_callable()

const std::shared_ptr< ak::ArrayGenerator > with_callable | ( | const py::object & | callable | ) | const

## ◆ with_form()

const std::shared_ptr< ak::ArrayGenerator > with_form | ( | const ak::FormPtr & | form | ) | const
| overridevirtual

Return a copy of this ArrayGenerator with a different form (or a now-known form, whereas it might have been unknown before).

Implements ArrayGenerator.

## ◆ with_kwargs()

const std::shared_ptr< ak::ArrayGenerator > with_kwargs | ( | const py::dict & | kwargs | ) | const

## ◆ with_length()

const std::shared_ptr< ak::ArrayGenerator > with_length | ( | int64_t | length | ) | const
| overridevirtual

Return a copy of this ArrayGenerator with a different length (or a now-known length, whereas it might have been unknown before).

Implements ArrayGenerator.

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

- include/awkward/python/virtual.h