Represents an array of nested lists, where the content may be SliceArrayOf, SliceMissingOf, or SliceJaggedOf (no equivalent in NumPy). More...
#include <Slice.h>
Public Member Functions | |
SliceJaggedOf (const IndexOf< T > &offsets, const SliceItemPtr &content) | |
Creates a SliceJaggedOf with a full set of parameters. | |
const IndexOf< T > | offsets () const |
Positions where one nested list stops and the next starts in the content in the same sense as ListOffsetArray . | |
const SliceItemPtr | content () const |
The contiguous content of the nested lists, like ListOffsetArray's content . | |
int64_t | length () const |
The length of the array: len(offsets) - 1 . | |
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. | |
![]() | |
virtual | ~SliceItem () |
Virtual destructor acts as a first non-inline virtual function that determines a specific translation unit in which vtable shall be emitted. | |
Represents an array of nested lists, where the content may be SliceArrayOf, SliceMissingOf, or SliceJaggedOf (no equivalent in NumPy).
Currently, the only type specialization is T = int64_t
.
SliceJaggedOf | ( | const IndexOf< T > & | offsets, |
const SliceItemPtr & | content ) |
Creates a SliceJaggedOf with a full set of parameters.
offsets | Positions where one nested list stops and the next starts in the content in the same sense as ListOffsetArray . The offsets must be monotonically increasing and its length is one greater than the length of the array it represents. As such, it must always have at least one element. |
content | The contiguous content of the nested lists, like ListOffsetArray's content . |
const SliceItemPtr content | ( | ) | const |
The contiguous content of the nested lists, like ListOffsetArray's content
.
Positions where one nested list stops and the next starts in the content in the same sense as ListOffsetArray
.
The offsets
must be monotonically increasing and its length is one greater than the length of the array it represents. As such, it must always have at least one element.
Returns true
if this slice would preserve an array's slice and therefore should pass on Content::parameters
.
advanced | The index that is passed through Content::getitem_next . |
Always true
for SliceJaggedOf.
Implements SliceItem.
|
overridevirtual |
Returns true
if this slice item has all the same buffers and parameters as other
; false
otherwise.
other | The slice item to compare this with. |
Implements SliceItem.
|
overridevirtual |
Copies this node without copying any associated arrays.
Implements SliceItem.
Returns a string representation of this slice item (single-line custom format).
Implements SliceItem.