Awkward Array: include/awkward/array/ByteMaskedArray.h Source File

Loading...
Searching...
No Matches
ByteMaskedArray.h
Go to the documentation of this file.
1// BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
2
3#ifndef AWKWARD_BYTEMASKEDARRAY_H_
4#define AWKWARD_BYTEMASKEDARRAY_H_
5
6#include <string>
7#include <memory>
8#include <vector>
9
10#include "awkward/common.h"
11#include "awkward/Slice.h"
12#include "awkward/Index.h"
13#include "awkward/Content.h"
14
15namespace awkward {
16 template <typename T, bool ISOPTION>
17 class IndexedArrayOf;
18
22 class LIBAWKWARD_EXPORT_SYMBOL ByteMaskedForm: public Form {
23 public:
25 ByteMaskedForm(bool has_identities,
26 const util::Parameters& parameters,
27 const FormKey& form_key,
28 Index::Form mask,
29 const FormPtr& content,
30 bool valid_when);
31
32 Index::Form
33 mask() const;
34
35 const FormPtr
36 content() const;
37
38 bool
39 valid_when() const;
40
41 const TypePtr
42 type(const util::TypeStrs& typestrs) const override;
43
44 void
45 tojson_part(ToJson& builder, bool verbose) const override;
46
47 const FormPtr
48 shallow_copy() const override;
49
50 const FormPtr
51 with_form_key(const FormKey& form_key) const override;
52
53 const std::string
54 purelist_parameter(const std::string& key) const override;
55
56 bool
57 purelist_isregular() const override;
58
59 int64_t
60 purelist_depth() const override;
61
62 bool
63 dimension_optiontype() const override;
64
65 const std::pair<int64_t, int64_t>
66 minmax_depth() const override;
67
68 const std::pair<bool, int64_t>
69 branch_depth() const override;
70
71 int64_t
72 numfields() const override;
73
74 int64_t
75 fieldindex(const std::string& key) const override;
76
77 const std::string
78 key(int64_t fieldindex) const override;
79
80 bool
81 haskey(const std::string& key) const override;
82
83 const std::vector<std::string>
84 keys() const override;
85
86 bool
87 istuple() const override;
88
89 bool
90 equal(const FormPtr& other,
91 bool check_identities,
92 bool check_parameters,
93 bool check_form_key,
94 bool compatibility_check) const override;
95
96 const FormPtr
97 getitem_field(const std::string& key) const override;
98
99 const FormPtr
100 getitem_fields(const std::vector<std::string>& keys) const override;
101
102 const FormPtr
103 simplify_optiontype() const;
104
105 private:
106 Index::Form mask_;
107 const FormPtr content_;
108 bool valid_when_;
109 };
110
117 class LIBAWKWARD_EXPORT_SYMBOL ByteMaskedArray: public Content {
118 public:
136 ByteMaskedArray(const IdentitiesPtr& identities,
137 const util::Parameters& parameters,
138 const Index8& mask,
139 const ContentPtr& content,
140 bool valid_when);
141
148 const Index8
149 mask() const;
150
153 const ContentPtr
154 content() const;
155
160 bool
161 valid_when() const;
162
165 const ContentPtr
166 project() const;
167
172 const ContentPtr
173 project(const Index8& mask) const;
174
178 const Index8
179 bytemask() const;
180
186 const ContentPtr
187 simplify_optiontype() const;
188
191 const std::shared_ptr<IndexedArrayOf<int64_t, true>>
192 toIndexedOptionArray64() const;
193
195 const std::string
196 classname() const override;
197
198 void
199 setidentities() override;
200
201 void
202 setidentities(const IdentitiesPtr& identities) override;
203
204 const TypePtr
205 type(const util::TypeStrs& typestrs) const override;
206
207 const FormPtr
208 form(bool materialize) const override;
209
210 kernel::lib
211 kernels() const override;
212
213 void
214 caches(std::vector<ArrayCachePtr>& out) const override;
215
216 const std::string
217 tostring_part(const std::string& indent,
218 const std::string& pre,
219 const std::string& post) const override;
220
221 void
222 tojson_part(ToJson& builder, bool include_beginendlist) const override;
223
224 void
225 nbytes_part(std::map<size_t, int64_t>& largest) const override;
226
230 int64_t
231 length() const override;
232
233 const ContentPtr
234 shallow_copy() const override;
235
236 const ContentPtr
237 deep_copy(bool copyarrays,
238 bool copyindexes,
239 bool copyidentities) const override;
240
241 void
242 check_for_iteration() const override;
243
244 const ContentPtr
245 getitem_nothing() const override;
246
247 const ContentPtr
248 getitem_at(int64_t at) const override;
249
250 const ContentPtr
251 getitem_at_nowrap(int64_t at) const override;
252
253 const ContentPtr
254 getitem_range(int64_t start, int64_t stop) const override;
255
256 const ContentPtr
257 getitem_range_nowrap(int64_t start, int64_t stop) const override;
258
259 const ContentPtr
260 getitem_field(const std::string& key) const override;
261
262 const ContentPtr
263 getitem_field(const std::string& key,
264 const Slice& only_fields) const override;
265
266 const ContentPtr
267 getitem_fields(const std::vector<std::string>& keys) const override;
268
269 const ContentPtr
270 getitem_fields(const std::vector<std::string>& keys,
271 const Slice& only_fields) const override;
272
273 const ContentPtr
274 getitem_next(const SliceItemPtr& head,
275 const Slice& tail,
276 const Index64& advanced) const override;
277
278 const ContentPtr
279 carry(const Index64& carry, bool allow_lazy) const override;
280
281 int64_t
282 purelist_depth() const override;
283
284 const std::pair<int64_t, int64_t>
285 minmax_depth() const override;
286
287 const std::pair<bool, int64_t>
288 branch_depth() const override;
289
290 int64_t
291 numfields() const override;
292
293 int64_t
294 fieldindex(const std::string& key) const override;
295
296 const std::string
297 key(int64_t fieldindex) const override;
298
299 bool
300 haskey(const std::string& key) const override;
301
302 const std::vector<std::string>
303 keys() const override;
304
305 bool
306 istuple() const override;
307
308 // operations
309 const std::string
310 validityerror(const std::string& path) const override;
311
315 const ContentPtr
316 shallow_simplify() const override;
317
318 const ContentPtr
319 num(int64_t axis, int64_t depth) const override;
320
321 const std::pair<Index64, ContentPtr>
322 offsets_and_flattened(int64_t axis, int64_t depth) const override;
323
324 bool
325 mergeable(const ContentPtr& other, bool mergebool) const override;
326
327 bool
328 referentially_equal(const ContentPtr& other) const override;
329
330 const ContentPtr
331 reverse_merge(const ContentPtr& other) const override;
332
333 const ContentPtr
334 mergemany(const ContentPtrVec& others) const override;
335
336 const SliceItemPtr
337 asslice() const override;
338
339 const ContentPtr
340 fillna(const ContentPtr& value) const override;
341
342 const ContentPtr
343 rpad(int64_t target, int64_t axis, int64_t depth) const override;
344
345 const ContentPtr
346 rpad_and_clip(int64_t target,
347 int64_t axis,
348 int64_t depth) const override;
349
350 const ContentPtr
351 reduce_next(const Reducer& reducer,
352 int64_t negaxis,
353 const Index64& starts,
354 const Index64& shifts,
355 const Index64& parents,
356 int64_t outlength,
357 bool mask,
358 bool keepdims) const override;
359
360 const ContentPtr
361 sort_next(int64_t negaxis,
362 const Index64& starts,
363 const Index64& parents,
364 int64_t outlength,
365 bool ascending,
366 bool stable) const override;
367
368 const ContentPtr
369 argsort_next(int64_t negaxis,
370 const Index64& starts,
371 const Index64& shifts,
372 const Index64& parents,
373 int64_t outlength,
374 bool ascending,
375 bool stable) const override;
376
377 const ContentPtr
378 localindex(int64_t axis, int64_t depth) const override;
379
380 const ContentPtr
381 combinations(int64_t n,
382 bool replacement,
383 const util::RecordLookupPtr& recordlookup,
384 const util::Parameters& parameters,
385 int64_t axis,
386 int64_t depth) const override;
387
388 const ContentPtr
389 getitem_next(const SliceAt& at,
390 const Slice& tail,
391 const Index64& advanced) const override;
392
393 const ContentPtr
394 getitem_next(const SliceRange& range,
395 const Slice& tail,
396 const Index64& advanced) const override;
397
398 const ContentPtr
399 getitem_next(const SliceArray64& array,
400 const Slice& tail,
401 const Index64& advanced) const override;
402
403 const ContentPtr
404 getitem_next(const SliceJagged64& jagged,
405 const Slice& tail,
406 const Index64& advanced) const override;
407
408 const ContentPtr
409 getitem_next_jagged(const Index64& slicestarts,
410 const Index64& slicestops,
411 const SliceArray64& slicecontent,
412 const Slice& tail) const override;
413
414 const ContentPtr
415 getitem_next_jagged(const Index64& slicestarts,
416 const Index64& slicestops,
417 const SliceMissing64& slicecontent,
418 const Slice& tail) const override;
419
420 const ContentPtr
421 getitem_next_jagged(const Index64& slicestarts,
422 const Index64& slicestops,
423 const SliceJagged64& slicecontent,
424 const Slice& tail) const override;
425
426 const ContentPtr
427 copy_to(kernel::lib ptr_lib) const override;
428
429 const ContentPtr
430 numbers_to_type(const std::string& name) const override;
431
433 bool
434 is_unique() const override;
435
437 const ContentPtr
438 unique() const override;
439
441 bool
442 is_subrange_equal(const Index64& start, const Index64& stop) const override;
443
444 protected:
445 template <typename S>
446 const ContentPtr
447 getitem_next_jagged_generic(const Index64& slicestarts,
448 const Index64& slicestops,
449 const S& slicecontent,
450 const Slice& tail) const;
451
452 const std::pair<Index64, Index64>
453 nextcarry_outindex(int64_t& numnull) const;
454
455 private:
457 const Index8 mask_;
459 const ContentPtr content_;
461 const bool valid_when_;
462 };
463
464}
465
466#endif // AWKWARD_BYTEMASKEDARRAY_H_
Content.h
Index.h
Slice.h
awkward::ByteMaskedArray
Represents potentially missing data by overlaying a byte mask over its content.
Definition: ByteMaskedArray.h:117
awkward::ByteMaskedArray::purelist_depth
int64_t purelist_depth() const override
The list-depth of this array, not counting any contained within a RecordArray.
awkward::ByteMaskedArray::argsort_next
const ContentPtr argsort_next(int64_t negaxis, const Index64 &starts, const Index64 &shifts, const Index64 &parents, int64_t outlength, bool ascending, bool stable) const override
This array sorted indices.
awkward::ByteMaskedArray::bytemask
const Index8 bytemask() const
Returns a byte mask with a fixed interpretation: missing values are 1 and valid values are 0 (as thou...
awkward::ByteMaskedArray::caches
void caches(std::vector< ArrayCachePtr > &out) const override
Accumulates all the unique #ArrayCache objects from nested #VirtualArray nodes. (Uniqueness is determ...
awkward::ByteMaskedArray::getitem_fields
const ContentPtr getitem_fields(const std::vector< std::string > &keys) const override
This array with the first nested RecordArray replaced by a RecordArray of a given subset of keys.
awkward::ByteMaskedArray::getitem_next_jagged
const ContentPtr getitem_next_jagged(const Index64 &slicestarts, const Index64 &slicestops, const SliceArray64 &slicecontent, const Slice &tail) const override
Internal function that propagates a jagged array (array with irregular-length dimensions) slice throu...
awkward::ByteMaskedArray::getitem_at
const ContentPtr getitem_at(int64_t at) const override
Returns the element at a given position in the array, handling negative indexing and bounds-checking ...
awkward::ByteMaskedArray::setidentities
void setidentities() override
Assign a surrogate index of Identities to this array (in-place).
awkward::ByteMaskedArray::getitem_field
const ContentPtr getitem_field(const std::string &key, const Slice &only_fields) const override
awkward::ByteMaskedArray::getitem_next
const ContentPtr getitem_next(const SliceArray64 &array, const Slice &tail, const Index64 &advanced) const override
Internal function that propagates a generic getitem request through one axis (including advanced inde...
awkward::ByteMaskedArray::unique
const ContentPtr unique() const override
Returns an array where all components are unique.
awkward::ByteMaskedArray::sort_next
const ContentPtr sort_next(int64_t negaxis, const Index64 &starts, const Index64 &parents, int64_t outlength, bool ascending, bool stable) const override
This array sorted.
awkward::ByteMaskedArray::toIndexedOptionArray64
const std::shared_ptr< IndexedArrayOf< int64_t, true > > toIndexedOptionArray64() const
Converts this array into an IndexedOptionArray with the same missing values.
awkward::ByteMaskedArray::reverse_merge
const ContentPtr reverse_merge(const ContentPtr &other) const override
Merges a single other with this array in reverse order: other first, this last.
awkward::ByteMaskedArray::project
const ContentPtr project() const
Return an array with the same type as content with None values removed.
awkward::ByteMaskedArray::tojson_part
void tojson_part(ToJson &builder, bool include_beginendlist) const override
Internal function to produce a JSON representation one node at a time.
awkward::ByteMaskedArray::getitem_fields
const ContentPtr getitem_fields(const std::vector< std::string > &keys, const Slice &only_fields) const override
awkward::ByteMaskedArray::length
int64_t length() const override
The number of elements in the array.
awkward::ByteMaskedArray::deep_copy
const ContentPtr deep_copy(bool copyarrays, bool copyindexes, bool copyidentities) const override
Copies this node and all nodes hierarchically nested within it, optionally copying the associated arr...
awkward::ByteMaskedArray::validityerror
const std::string validityerror(const std::string &path) const override
Returns an error message if this array is invalid; otherwise, returns an empty string.
awkward::ByteMaskedArray::getitem_next
const ContentPtr getitem_next(const SliceAt &at, const Slice &tail, const Index64 &advanced) const override
Internal function that propagates a generic getitem request through one axis (including advanced inde...
awkward::ByteMaskedArray::istuple
bool istuple() const override
Returns true if the outermost RecordArray is a tuple.
awkward::ByteMaskedArray::ByteMaskedArray
ByteMaskedArray(const IdentitiesPtr &identities, const util::Parameters &parameters, const Index8 &mask, const ContentPtr &content, bool valid_when)
Creates an ByteMaskedArray from a full set of parameters.
awkward::ByteMaskedArray::getitem_nothing
const ContentPtr getitem_nothing() const override
Internal function to get an empty slice (with the correct type).
awkward::ByteMaskedArray::kernels
kernel::lib kernels() const override
Returns the kernel library enum for all nested ptr_lib within the array's tree structure....
awkward::ByteMaskedArray::carry
const ContentPtr carry(const Index64 &carry, bool allow_lazy) const override
Returns an array of the same type with elements filtered, rearranged, and possibly duplicated by the ...
awkward::ByteMaskedArray::combinations
const ContentPtr combinations(int64_t n, bool replacement, const util::RecordLookupPtr &recordlookup, const util::Parameters &parameters, int64_t axis, int64_t depth) const override
Tuples or records of all n-tuple combinations of list items at some axis depth.
awkward::ByteMaskedArray::setidentities
void setidentities(const IdentitiesPtr &identities) override
Assign a specified set of Identities to this array (in-place).
awkward::ByteMaskedArray::localindex
const ContentPtr localindex(int64_t axis, int64_t depth) const override
A (possibly nested) array of integers indicating the positions of elements within each nested list.
awkward::ByteMaskedArray::getitem_range_nowrap
const ContentPtr getitem_range_nowrap(int64_t start, int64_t stop) const override
Subinterval of this array, without handling negative indexing or bounds-checking.
awkward::ByteMaskedArray::valid_when
bool valid_when() const
Interpretation of the boolean bytes in mask as None or valid values from content. Only boolean bytes ...
awkward::ByteMaskedArray::offsets_and_flattened
const std::pair< Index64, ContentPtr > offsets_and_flattened(int64_t axis, int64_t depth) const override
Returns (a) an offsets Index and (b) a flattened version of the array at some axis depth.
awkward::ByteMaskedArray::fieldindex
int64_t fieldindex(const std::string &key) const override
The position of a tuple or record key name if this array contains a RecordArray.
awkward::ByteMaskedArray::check_for_iteration
void check_for_iteration() const override
Performs up-front validity checks on an array so that they don't have to be checked in getitem_at_now...
awkward::ByteMaskedArray::keys
const std::vector< std::string > keys() const override
A list of RecordArray keys or an empty list if this array does not contain a RecordArray.
awkward::ByteMaskedArray::getitem_next_jagged_generic
const ContentPtr getitem_next_jagged_generic(const Index64 &slicestarts, const Index64 &slicestops, const S &slicecontent, const Slice &tail) const
awkward::ByteMaskedArray::getitem_field
const ContentPtr getitem_field(const std::string &key) const override
This array with the first nested RecordArray replaced by the field at key.
awkward::ByteMaskedArray::mask
const Index8 mask() const
Mask in which each byte represents a missing value (None) or a valid value (from content).
awkward::ByteMaskedArray::branch_depth
const std::pair< bool, int64_t > branch_depth() const override
Returns (a) whether the list-depth of this array "branches," or differs when followed through differe...
awkward::ByteMaskedArray::rpad
const ContentPtr rpad(int64_t target, int64_t axis, int64_t depth) const override
If axis = 0, returns a view of this array padded on the right with None values to have a minimum leng...
awkward::ByteMaskedArray::getitem_next
const ContentPtr getitem_next(const SliceItemPtr &head, const Slice &tail, const Index64 &advanced) const override
Internal function that propagates a generic getitem request through one axis (including advanced inde...
awkward::ByteMaskedArray::getitem_at_nowrap
const ContentPtr getitem_at_nowrap(int64_t at) const override
Returns the element at a given position in the array, without handling negative indexing or bounds-ch...
awkward::ByteMaskedArray::nbytes_part
void nbytes_part(std::map< size_t, int64_t > &largest) const override
Internal function used to calculate nbytes.
awkward::ByteMaskedArray::mergemany
const ContentPtr mergemany(const ContentPtrVec &others) const override
Returns an array with this and the others concatenated (in order, this first, others last).
awkward::ByteMaskedArray::key
const std::string key(int64_t fieldindex) const override
The record name associated with a given field index or the tuple index as a string (e....
awkward::ByteMaskedArray::shallow_copy
const ContentPtr shallow_copy() const override
Copies this node without copying any nodes hierarchically nested within it or any array/index/identit...
awkward::ByteMaskedArray::minmax_depth
const std::pair< int64_t, int64_t > minmax_depth() const override
Returns (a) the minimum list-depth and (b) the maximum list-depth of the array, which can differ if t...
awkward::ByteMaskedArray::is_unique
bool is_unique() const override
Returns 'true' if all components of the array are unique.
awkward::ByteMaskedArray::form
const FormPtr form(bool materialize) const override
Low-level Form describing all the features of this array except the actual data buffers (Index,...
awkward::ByteMaskedArray::asslice
const SliceItemPtr asslice() const override
Converts this array into a SliceItem that can be used in getitem.
awkward::ByteMaskedArray::tostring_part
const std::string tostring_part(const std::string &indent, const std::string &pre, const std::string &post) const override
Internal function to build an output string for tostring.
awkward::ByteMaskedArray::rpad_and_clip
const ContentPtr rpad_and_clip(int64_t target, int64_t axis, int64_t depth) const override
If axis = 0, returns a view of this array padded on the right.
awkward::ByteMaskedArray::getitem_next
const ContentPtr getitem_next(const SliceJagged64 &jagged, const Slice &tail, const Index64 &advanced) const override
Internal function that propagates a generic getitem request through one axis (including advanced inde...
awkward::ByteMaskedArray::nextcarry_outindex
const std::pair< Index64, Index64 > nextcarry_outindex(int64_t &numnull) const
awkward::ByteMaskedArray::getitem_range
const ContentPtr getitem_range(int64_t start, int64_t stop) const override
Subinterval of this array, handling negative indexing and bounds-checking like Python.
awkward::ByteMaskedArray::is_subrange_equal
bool is_subrange_equal(const Index64 &start, const Index64 &stop) const override
Returns 'true' if subranges are equal.
awkward::ByteMaskedArray::fillna
const ContentPtr fillna(const ContentPtr &value) const override
Returns this array with None values replaced by a given value.
awkward::ByteMaskedArray::numfields
int64_t numfields() const override
The number of fields in the first nested tuple or records or -1 if this array does not contain a Reco...
awkward::ByteMaskedArray::referentially_equal
bool referentially_equal(const ContentPtr &other) const override
Returns true if this array has all the same buffers and parameters as other; false otherwise.
awkward::ByteMaskedArray::type
const TypePtr type(const util::TypeStrs &typestrs) const override
High-level Type describing this array.
awkward::ByteMaskedArray::num
const ContentPtr num(int64_t axis, int64_t depth) const override
The length of this array (as a NumpyArray scalar) if axis = 0 or the lengths of subarrays (as an arra...
awkward::ByteMaskedArray::project
const ContentPtr project(const Index8 &mask) const
Performs a set-union of a given mask with the missing values and calls project.
awkward::ByteMaskedArray::simplify_optiontype
const ContentPtr simplify_optiontype() const
If the content also has OptionType, combine the mask with the content's indicator of missing values; ...
awkward::ByteMaskedArray::mergeable
bool mergeable(const ContentPtr &other, bool mergebool) const override
Returns true if this array can be merged with the other; false otherwise.
awkward::ByteMaskedArray::haskey
bool haskey(const std::string &key) const override
Returns true if the array contains a RecordArray with the specified key; false otherwise.
awkward::ByteMaskedArray::getitem_next_jagged
const ContentPtr getitem_next_jagged(const Index64 &slicestarts, const Index64 &slicestops, const SliceJagged64 &slicecontent, const Slice &tail) const override
Internal function that propagates a jagged array (array with irregular-length dimensions) slice throu...
awkward::ByteMaskedArray::getitem_next_jagged
const ContentPtr getitem_next_jagged(const Index64 &slicestarts, const Index64 &slicestops, const SliceMissing64 &slicecontent, const Slice &tail) const override
Internal function that propagates a jagged array (array with irregular-length dimensions) slice throu...
awkward::ByteMaskedArray::getitem_next
const ContentPtr getitem_next(const SliceRange &range, const Slice &tail, const Index64 &advanced) const override
Internal function that propagates a generic getitem request through one axis (including advanced inde...
awkward::ByteMaskedArray::shallow_simplify
const ContentPtr shallow_simplify() const override
Returns an equivalent array simplified at one level only using simplify_optiontype if an option-type ...
awkward::ByteMaskedArray::content
const ContentPtr content() const
Data to be masked; mask[i] corresponds to content[i] for all i.
awkward::ByteMaskedArray::reduce_next
const ContentPtr reduce_next(const Reducer &reducer, int64_t negaxis, const Index64 &starts, const Index64 &shifts, const Index64 &parents, int64_t outlength, bool mask, bool keepdims) const override
This array with one axis removed by applying a Reducer (e.g. "sum", "max", "any", "all).
awkward::ByteMaskedArray::numbers_to_type
const ContentPtr numbers_to_type(const std::string &name) const override
Change the leaf types to 'totype'.
awkward::ByteMaskedArray::classname
const std::string classname() const override
User-friendly name of this class: "ByteMaskedArray".
awkward::ByteMaskedArray::copy_to
const ContentPtr copy_to(kernel::lib ptr_lib) const override
Recursively copies components of the array from main memory to a GPU (if ptr_lib == kernel::lib::cuda...
awkward::ByteMaskedForm
Form describing ByteMaskedArray.
Definition: ByteMaskedArray.h:22
awkward::ByteMaskedForm::purelist_depth
int64_t purelist_depth() const override
The list-depth of this array, not counting any contained within a RecordForm.
awkward::ByteMaskedForm::with_form_key
const FormPtr with_form_key(const FormKey &form_key) const override
Copies this node, adding or replacing a form_key.
awkward::ByteMaskedForm::equal
bool equal(const FormPtr &other, bool check_identities, bool check_parameters, bool check_form_key, bool compatibility_check) const override
Returns true if this Form is equal to the other Form; false otherwise.
awkward::ByteMaskedForm::simplify_optiontype
const FormPtr simplify_optiontype() const
awkward::ByteMaskedForm::istuple
bool istuple() const override
Returns true if the outermost RecordArray is a tuple.
awkward::ByteMaskedForm::shallow_copy
const FormPtr shallow_copy() const override
Copies this node without copying any nodes hierarchically nested within it.
awkward::ByteMaskedForm::tojson_part
void tojson_part(ToJson &builder, bool verbose) const override
Internal function to produce a JSON representation one node at a time.
awkward::ByteMaskedForm::getitem_fields
const FormPtr getitem_fields(const std::vector< std::string > &keys) const override
Returns the Form that would result from a fields-slice.
awkward::ByteMaskedForm::valid_when
bool valid_when() const
awkward::ByteMaskedForm::fieldindex
int64_t fieldindex(const std::string &key) const override
The position of a tuple or record key name if this array contains a RecordForm.
awkward::ByteMaskedForm::keys
const std::vector< std::string > keys() const override
A list of RecordArray keys or an empty list if this array does not contain a RecordArray.
awkward::ByteMaskedForm::mask
Index::Form mask() const
awkward::ByteMaskedForm::ByteMaskedForm
ByteMaskedForm(bool has_identities, const util::Parameters &parameters, const FormKey &form_key, Index::Form mask, const FormPtr &content, bool valid_when)
Creates a ByteMaskedForm. See ByteMaskedArray for documentation.
awkward::ByteMaskedForm::branch_depth
const std::pair< bool, int64_t > branch_depth() const override
Returns (a) whether the list-depth of this array "branches," or differs when followed through differe...
awkward::ByteMaskedForm::key
const std::string key(int64_t fieldindex) const override
The record name associated with a given field index or the tuple index as a string (e....
awkward::ByteMaskedForm::minmax_depth
const std::pair< int64_t, int64_t > minmax_depth() const override
Returns (a) the minimum list-depth and (b) the maximum list-depth of the array, which can differ if t...
awkward::ByteMaskedForm::content
const FormPtr content() const
awkward::ByteMaskedForm::getitem_field
const FormPtr getitem_field(const std::string &key) const override
Returns the Form that would result from a field-slice.
awkward::ByteMaskedForm::numfields
int64_t numfields() const override
The number of fields in the first nested tuple or records or -1 if this array does not contain a Reco...
awkward::ByteMaskedForm::type
const TypePtr type(const util::TypeStrs &typestrs) const override
High-level Type describing this Form.
awkward::ByteMaskedForm::purelist_parameter
const std::string purelist_parameter(const std::string &key) const override
The parameter associated with key at the first level that has a non-null value, descending only as de...
awkward::ByteMaskedForm::haskey
bool haskey(const std::string &key) const override
Returns true if the array contains a RecordForm with the specified key; false otherwise.
awkward::ByteMaskedForm::purelist_isregular
bool purelist_isregular() const override
Returns true if all nested lists down to the first RecordForm are RegularForm nodes; false otherwise.
awkward::ByteMaskedForm::dimension_optiontype
bool dimension_optiontype() const override
Returns true if this dimension has option-type; false otherwise.
awkward::Content
Abstract superclass of all array node types (flat hierarchy). Any Content can be nested within any ot...
Definition: Content.h:276
awkward::Form
Abstract superclass of all array node forms, which expresses the nesting structure without any large ...
Definition: Content.h:39
awkward::IndexOf
A contiguous, one-dimensional array of integers used to represent data structures,...
Definition: Index.h:82
awkward::Index::Form
Form
Integer type of an Index, used by ListForm, IndexedForm, etc.
Definition: Index.h:34
awkward::Reducer
Abstract class for all reducer algorithms.
Definition: Reducer.h:20
awkward::SliceArrayOf
Represents an array of integers in a slice (possibly converted from an array of booleans).
Definition: Slice.h:229
awkward::SliceAt
Represents an integer in a tuple of slices passed to __getitem__ in Python.
Definition: Slice.h:58
awkward::SliceJaggedOf
Represents an array of nested lists, where the content may be SliceArrayOf, SliceMissingOf,...
Definition: Slice.h:515
awkward::SliceMissingOf
Represents a SliceArrayOf, SliceMissingOf, or SliceJaggedOf with missing values: None (no equivalent ...
Definition: Slice.h:435
awkward::SliceRange
Represents a Python slice object (usual syntax: array[start:stop:step]).
Definition: Slice.h:93
awkward::Slice
A sequence of SliceItem objects representing a tuple passed to Python's __getitem__.
Definition: Slice.h:585
awkward::ToJson
Definition: json.h:21
common.h
LIBAWKWARD_EXPORT_SYMBOL
#define LIBAWKWARD_EXPORT_SYMBOL
Definition: common.h:45
awkward::kernel::lib
lib
Definition: kernel-dispatch.h:20
awkward::util::Parameters
std::map< std::string, std::string > Parameters
Definition: util.h:165
awkward::util::RecordLookupPtr
std::shared_ptr< RecordLookup > RecordLookupPtr
Definition: util.h:130
awkward::util::TypeStrs
std::map< std::string, std::string > TypeStrs
Definition: util.h:215
awkward
Definition: BitMaskedArray.h:15
awkward::FormKey
std::shared_ptr< std::string > FormKey
Definition: Content.h:19
awkward::ContentPtrVec
std::vector< std::shared_ptr< Content > > ContentPtrVec
Definition: Content.h:16
awkward::SliceItemPtr
std::shared_ptr< SliceItem > SliceItemPtr
Definition: Slice.h:15
awkward::ContentPtr
std::shared_ptr< Content > ContentPtr
Definition: Content.h:15
awkward::FormPtr
std::shared_ptr< Form > FormPtr
Definition: Content.h:18
awkward::TypePtr
std::shared_ptr< Type > TypePtr
Definition: Content.h:23
awkward::IdentitiesPtr
std::shared_ptr< Identities > IdentitiesPtr
Definition: Identities.h:16