3 #ifndef AWKWARD_SLICE_H_ 4 #define AWKWARD_SLICE_H_ 30 shallow_copy()
const = 0;
34 virtual const std::string
44 preserves_type(
const Index64& advanced)
const = 0;
51 referentially_equal(
const SliceItemPtr& other)
const = 0;
70 shallow_copy()
const override;
73 tostring()
const override;
79 preserves_type(
const Index64& advanced)
const override;
82 referentially_equal(
const SliceItemPtr& other)
const override;
105 SliceRange(int64_t start, int64_t stop, int64_t step);
142 shallow_copy()
const override;
145 tostring()
const override;
151 preserves_type(
const Index64& advanced)
const override;
154 referentially_equal(
const SliceItemPtr& other)
const override;
158 const int64_t start_;
175 shallow_copy()
const override;
178 tostring()
const override;
184 preserves_type(
const Index64& advanced)
const override;
187 referentially_equal(
const SliceItemPtr& other)
const override;
203 shallow_copy()
const override;
206 tostring()
const override;
212 preserves_type(
const Index64& advanced)
const override;
215 referentially_equal(
const SliceItemPtr& other)
const override;
224 template <
typename T>
226 #ifdef AWKWARD_SLICE_NO_EXTERN_TEMPLATE 250 const std::vector<int64_t>& shape,
251 const std::vector<int64_t>& strides,
bool frombool);
266 const std::vector<int64_t>
275 const std::vector<int64_t>
296 shallow_copy()
const override;
299 tostring()
const override;
302 tostring_part()
const;
309 preserves_type(
const Index64& advanced)
const override;
312 referentially_equal(
const SliceItemPtr& other)
const override;
323 const std::vector<int64_t> shape_;
325 const std::vector<int64_t> strides_;
330 #ifndef AWKWARD_SLICE_NO_EXTERN_TEMPLATE 361 shallow_copy()
const override;
364 tostring()
const override;
370 preserves_type(
const Index64& advanced)
const override;
373 referentially_equal(
const SliceItemPtr& other)
const override;
377 const std::string key_;
401 const std::vector<std::string>
405 shallow_copy()
const override;
408 tostring()
const override;
414 preserves_type(
const Index64& advanced)
const override;
417 referentially_equal(
const SliceItemPtr& other)
const override;
421 const std::vector<std::string> keys_;
430 template <
typename T>
432 #ifdef AWKWARD_SLICE_NO_EXTERN_TEMPLATE 446 const Index8& originalmask,
457 originalmask()
const;
469 shallow_copy()
const override;
472 tostring()
const override;
475 tostring_part()
const;
483 preserves_type(
const Index64& advanced)
const override;
486 referentially_equal(
const SliceItemPtr& other)
const override;
492 const Index8 originalmask_;
497 #ifndef AWKWARD_SLICE_NO_EXTERN_TEMPLATE 510 template <
typename T>
512 #ifdef AWKWARD_SLICE_NO_EXTERN_TEMPLATE 549 shallow_copy()
const override;
552 tostring()
const override;
555 tostring_part()
const;
563 preserves_type(
const Index64& advanced)
const override;
566 referentially_equal(
const SliceItemPtr& other)
const override;
575 #ifndef AWKWARD_SLICE_NO_EXTERN_TEMPLATE 590 static int64_t
none();
597 Slice(
const std::vector<SliceItemPtr>& items,
bool sealed);
602 Slice(
const std::vector<SliceItemPtr>& items);
608 const std::vector<SliceItemPtr>
710 referentially_equal(
const Slice& other)
const;
714 std::vector<SliceItemPtr> items_;
721 #endif // AWKWARD_SLICE_H_ Represents a Python slice object (usual syntax: array[start:stop:step]).
Definition: Slice.h:93
#define LIBAWKWARD_EXPORT_SYMBOL
Definition: common.h:45
const std::string key(const RecordLookupPtr &recordlookup, int64_t fieldindex, int64_t numfields)
Returns the key associated with a field index, given a RecordLookup and a number of fields...
Definition: BitMaskedArray.h:15
A contiguous, one-dimensional array of integers used to represent data structures, rather than numerical data in the arrays themselves.
Definition: Index.h:16
const ContentPtr none
A constant value with type None.
Represents NumPy's newaxis marker (a.k.a. None), which prompts __getitem__ to insert a length-1 regul...
Definition: Slice.h:197
Represents a SliceArrayOf, SliceMissingOf, or SliceJaggedOf with missing values: None (no equivalent ...
Definition: Slice.h:431
Represents a single string in a slice tuple, indicating that a RecordArray should be replaced by one ...
Definition: Slice.h:340
const std::vector< std::string > keys(const RecordLookupPtr &recordlookup, int64_t numfields)
Returns a given RecordLookup as keys or generate anonymous ones form a number of fields.
Represents an array of integers in a slice (possibly converted from an array of booleans).
Definition: Slice.h:225
Represents an array of nested lists, where the content may be SliceArrayOf, SliceMissingOf, or SliceJaggedOf (no equivalent in NumPy).
Definition: Slice.h:511
A sequence of SliceItem objects representing a tuple passed to Python's __getitem__.
Definition: Slice.h:585
Represents a Python Ellipsis object (usual syntax: array[...]).
Definition: Slice.h:169
Abstract class for slice items, which are elements of a tuple passed to an array's __getitem__ in Pyt...
Definition: Slice.h:21
Represents an integer in a tuple of slices passed to __getitem__ in Python.
Definition: Slice.h:58
std::shared_ptr< SliceItem > SliceItemPtr
Definition: Slice.h:15