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

Loading...
Searching...
No Matches
UnmaskedArray.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_UNMASKEDARRAY_H_
4#define AWKWARD_UNMASKEDARRAY_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
17 class ByteMaskedArray;
18
22 class LIBAWKWARD_EXPORT_SYMBOL UnmaskedForm: public Form {
23 public:
25 UnmaskedForm(bool has_identities,
26 const util::Parameters& parameters,
27 const FormKey& form_key,
28 const FormPtr& content);
29
30 const FormPtr
31 content() const;
32
33 const TypePtr
34 type(const util::TypeStrs& typestrs) const override;
35
36 void
37 tojson_part(ToJson& builder, bool verbose) const override;
38
39 const FormPtr
40 shallow_copy() const override;
41
42 const FormPtr
43 with_form_key(const FormKey& form_key) const override;
44
45 const std::string
46 purelist_parameter(const std::string& key) const override;
47
48 bool
49 purelist_isregular() const override;
50
51 int64_t
52 purelist_depth() const override;
53
54 bool
55 dimension_optiontype() const override;
56
57 const std::pair<int64_t, int64_t>
58 minmax_depth() const override;
59
60 const std::pair<bool, int64_t>
61 branch_depth() const override;
62
63 int64_t
64 numfields() const override;
65
66 int64_t
67 fieldindex(const std::string& key) const override;
68
69 const std::string
70 key(int64_t fieldindex) const override;
71
72 bool
73 haskey(const std::string& key) const override;
74
75 const std::vector<std::string>
76 keys() const override;
77
78 bool
79 istuple() const override;
80
81 bool
82 equal(const FormPtr& other,
83 bool check_identities,
84 bool check_parameters,
85 bool check_form_key,
86 bool compatibility_check) const override;
87
88 const FormPtr
89 getitem_field(const std::string& key) const override;
90
91 const FormPtr
92 getitem_fields(const std::vector<std::string>& keys) const override;
93
94 const FormPtr
95 simplify_optiontype() const;
96
97 private:
98 const FormPtr content_;
99 };
100
107 class LIBAWKWARD_EXPORT_SYMBOL UnmaskedArray: public Content {
108 public:
116 UnmaskedArray(const IdentitiesPtr& identities,
117 const util::Parameters& parameters,
118 const ContentPtr& content);
119
121 const ContentPtr
122 content() const;
123
126 const ContentPtr
127 project() const;
128
132 const ContentPtr
133 project(const Index8& mask) const;
134
136 const Index8
137 bytemask() const;
138
143 const ContentPtr
144 simplify_optiontype() const;
145
147 const std::shared_ptr<ByteMaskedArray>
148 toByteMaskedArray() const;
149
152 const ContentPtr
153 toIndexedOptionArray64() const;
154
156 const std::string
157 classname() const override;
158
159 void
160 setidentities() override;
161
162 void
163 setidentities(const IdentitiesPtr& identities) override;
164
165 const TypePtr
166 type(const util::TypeStrs& typestrs) const override;
167
168 const FormPtr
169 form(bool materialize) const override;
170
171 kernel::lib
172 kernels() const override;
173
174 void
175 caches(std::vector<ArrayCachePtr>& out) const override;
176
177 const std::string
178 tostring_part(const std::string& indent,
179 const std::string& pre,
180 const std::string& post) const override;
181
182 void
183 tojson_part(ToJson& builder, bool include_beginendlist) const override;
184
185 void
186 nbytes_part(std::map<size_t, int64_t>& largest) const override;
187
188 int64_t
189 length() const override;
190
191 const ContentPtr
192 shallow_copy() const override;
193
194 const ContentPtr
195 deep_copy(bool copyarrays,
196 bool copyindexes,
197 bool copyidentities) const override;
198
199 void
200 check_for_iteration() const override;
201
202 const ContentPtr
203 getitem_nothing() const override;
204
205 const ContentPtr
206 getitem_at(int64_t at) const override;
207
208 const ContentPtr
209 getitem_at_nowrap(int64_t at) const override;
210
211 const ContentPtr
212 getitem_range(int64_t start, int64_t stop) const override;
213
214 const ContentPtr
215 getitem_range_nowrap(int64_t start, int64_t stop) const override;
216
217 const ContentPtr
218 getitem_field(const std::string& key) const override;
219
220 const ContentPtr
221 getitem_field(const std::string& key,
222 const Slice& only_fields) const override;
223
224 const ContentPtr
225 getitem_fields(const std::vector<std::string>& keys) const override;
226
227 const ContentPtr
228 getitem_fields(const std::vector<std::string>& keys,
229 const Slice& only_fields) const override;
230
231 const ContentPtr
232 getitem_next(const SliceItemPtr& head,
233 const Slice& tail,
234 const Index64& advanced) const override;
235
236 const ContentPtr
237 carry(const Index64& carry, bool allow_lazy) const override;
238
239 int64_t
240 purelist_depth() const override;
241
242 const std::pair<int64_t, int64_t>
243 minmax_depth() const override;
244
245 const std::pair<bool, int64_t>
246 branch_depth() const override;
247
248 int64_t
249 numfields() const override;
250
251 int64_t
252 fieldindex(const std::string& key) const override;
253
254 const std::string
255 key(int64_t fieldindex) const override;
256
257 bool
258 haskey(const std::string& key) const override;
259
260 const std::vector<std::string>
261 keys() const override;
262
263 bool
264 istuple() const override;
265
266 // operations
267 const std::string
268 validityerror(const std::string& path) const override;
269
273 const ContentPtr
274 shallow_simplify() const override;
275
276 const ContentPtr
277 num(int64_t axis, int64_t depth) const override;
278
279 const std::pair<Index64, ContentPtr>
280 offsets_and_flattened(int64_t axis, int64_t depth) const override;
281
282 bool
283 mergeable(const ContentPtr& other, bool mergebool) const override;
284
285 bool
286 referentially_equal(const ContentPtr& other) const override;
287
288 const ContentPtr
289 reverse_merge(const ContentPtr& other) const override;
290
291 const ContentPtr
292 mergemany(const ContentPtrVec& others) const override;
293
294 const SliceItemPtr
295 asslice() const override;
296
297 const ContentPtr
298 fillna(const ContentPtr& value) const override;
299
300 const ContentPtr
301 rpad(int64_t target, int64_t axis, int64_t depth) const override;
302
303 const ContentPtr
304 rpad_and_clip(int64_t target,
305 int64_t axis,
306 int64_t depth) const override;
307
308 const ContentPtr
309 reduce_next(const Reducer& reducer,
310 int64_t negaxis,
311 const Index64& starts,
312 const Index64& shifts,
313 const Index64& parents,
314 int64_t outlength,
315 bool mask,
316 bool keepdims) const override;
317
318 const ContentPtr
319 sort_next(int64_t negaxis,
320 const Index64& starts,
321 const Index64& parents,
322 int64_t outlength,
323 bool ascending,
324 bool stable) const override;
325
326 const ContentPtr
327 argsort_next(int64_t negaxis,
328 const Index64& starts,
329 const Index64& shifts,
330 const Index64& parents,
331 int64_t outlength,
332 bool ascending,
333 bool stable) const override;
334
335 const ContentPtr
336 localindex(int64_t axis, int64_t depth) const override;
337
338 const ContentPtr
339 combinations(int64_t n,
340 bool replacement,
341 const util::RecordLookupPtr& recordlookup,
342 const util::Parameters& parameters,
343 int64_t axis,
344 int64_t depth) const override;
345
346 const ContentPtr
347 getitem_next(const SliceAt& at,
348 const Slice& tail,
349 const Index64& advanced) const override;
350
351 const ContentPtr
352 getitem_next(const SliceRange& range,
353 const Slice& tail,
354 const Index64& advanced) const override;
355
356 const ContentPtr
357 getitem_next(const SliceArray64& array,
358 const Slice& tail,
359 const Index64& advanced) const override;
360
361 const ContentPtr
362 getitem_next(const SliceJagged64& jagged,
363 const Slice& tail,
364 const Index64& advanced) const override;
365
366 const ContentPtr
367 getitem_next_jagged(const Index64& slicestarts,
368 const Index64& slicestops,
369 const SliceArray64& slicecontent,
370 const Slice& tail) const override;
371
372 const ContentPtr
373 getitem_next_jagged(const Index64& slicestarts,
374 const Index64& slicestops,
375 const SliceMissing64& slicecontent,
376 const Slice& tail) const override;
377
378 const ContentPtr
379 getitem_next_jagged(const Index64& slicestarts,
380 const Index64& slicestops,
381 const SliceJagged64& slicecontent,
382 const Slice& tail) const override;
383
384 const ContentPtr
385 copy_to(kernel::lib ptr_lib) const override;
386
387 const ContentPtr
388 numbers_to_type(const std::string& name) const override;
389
391 bool
392 is_unique() const override;
393
395 const ContentPtr
396 unique() const override;
397
399 bool
400 is_subrange_equal(const Index64& start, const Index64& stop) const override;
401
402protected:
403 template <typename S>
404 const ContentPtr
405 getitem_next_jagged_generic(const Index64& slicestarts,
406 const Index64& slicestops,
407 const S& slicecontent,
408 const Slice& tail) const;
409
410 private:
412 const ContentPtr content_;
413
414 };
415}
416
417#endif // AWKWARD_UNMASKEDARRAY_H_
Content.h
Index.h
Slice.h
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::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
awkward::UnmaskedArray
Converts content of any type into an OptionType in which all values happen to be valid.
Definition: UnmaskedArray.h:107
awkward::UnmaskedArray::purelist_depth
int64_t purelist_depth() const override
The list-depth of this array, not counting any contained within a RecordArray.
awkward::UnmaskedArray::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::UnmaskedArray::bytemask
const Index8 bytemask() const
Returns a byte mask of all 0 values (representing valid data).
awkward::UnmaskedArray::caches
void caches(std::vector< ArrayCachePtr > &out) const override
Accumulates all the unique #ArrayCache objects from nested #VirtualArray nodes. (Uniqueness is determ...
awkward::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::setidentities
void setidentities() override
Assign a surrogate index of Identities to this array (in-place).
awkward::UnmaskedArray::UnmaskedArray
UnmaskedArray(const IdentitiesPtr &identities, const util::Parameters &parameters, const ContentPtr &content)
Creates an UnmaskedArray from a full set of parameters.
awkward::UnmaskedArray::getitem_field
const ContentPtr getitem_field(const std::string &key, const Slice &only_fields) const override
awkward::UnmaskedArray::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::UnmaskedArray::unique
const ContentPtr unique() const override
Returns an array where all components are unique.
awkward::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::project
const ContentPtr project() const
Equivalent to calling content; removes OptionType but there are no None values to remove.
awkward::UnmaskedArray::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::UnmaskedArray::getitem_fields
const ContentPtr getitem_fields(const std::vector< std::string > &keys, const Slice &only_fields) const override
awkward::UnmaskedArray::length
int64_t length() const override
The number of elements in the array.
awkward::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::istuple
bool istuple() const override
Returns true if the outermost RecordArray is a tuple.
awkward::UnmaskedArray::getitem_nothing
const ContentPtr getitem_nothing() const override
Internal function to get an empty slice (with the correct type).
awkward::UnmaskedArray::kernels
kernel::lib kernels() const override
Returns the kernel library enum for all nested ptr_lib within the array's tree structure....
awkward::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::setidentities
void setidentities(const IdentitiesPtr &identities) override
Assign a specified set of Identities to this array (in-place).
awkward::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::getitem_next_jagged_generic
const ContentPtr getitem_next_jagged_generic(const Index64 &slicestarts, const Index64 &slicestops, const S &slicecontent, const Slice &tail) const
awkward::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::nbytes_part
void nbytes_part(std::map< size_t, int64_t > &largest) const override
Internal function used to calculate nbytes.
awkward::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::is_unique
bool is_unique() const override
Returns 'true' if all components of the array are unique.
awkward::UnmaskedArray::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::UnmaskedArray::asslice
const SliceItemPtr asslice() const override
Converts this array into a SliceItem that can be used in getitem.
awkward::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::is_subrange_equal
bool is_subrange_equal(const Index64 &start, const Index64 &stop) const override
Returns 'true' if subranges are equal.
awkward::UnmaskedArray::fillna
const ContentPtr fillna(const ContentPtr &value) const override
Returns this array with None values replaced by a given value.
awkward::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::type
const TypePtr type(const util::TypeStrs &typestrs) const override
High-level Type describing this array.
awkward::UnmaskedArray::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::UnmaskedArray::project
const ContentPtr project(const Index8 &mask) const
Applies a given mask and calls project.
awkward::UnmaskedArray::simplify_optiontype
const ContentPtr simplify_optiontype() const
If the content also has OptionType, return the content; otherwise, return shallow_copy.
awkward::UnmaskedArray::mergeable
bool mergeable(const ContentPtr &other, bool mergebool) const override
Returns true if this array can be merged with the other; false otherwise.
awkward::UnmaskedArray::haskey
bool haskey(const std::string &key) const override
Returns true if the array contains a RecordArray with the specified key; false otherwise.
awkward::UnmaskedArray::toByteMaskedArray
const std::shared_ptr< ByteMaskedArray > toByteMaskedArray() const
Converts this array into a ByteMaskedArray.
awkward::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::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::UnmaskedArray::content
const ContentPtr content() const
Data to be converted to an OptionType.
awkward::UnmaskedArray::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::UnmaskedArray::numbers_to_type
const ContentPtr numbers_to_type(const std::string &name) const override
Change the leaf types to 'totype'.
awkward::UnmaskedArray::toIndexedOptionArray64
const ContentPtr toIndexedOptionArray64() const
Converts this array into an IndexedOptionArray without missing values.
awkward::UnmaskedArray::classname
const std::string classname() const override
User-friendly name of this class: "UnmaskedArray".
awkward::UnmaskedArray::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::UnmaskedForm
Form describing UnmaskedArray.
Definition: UnmaskedArray.h:22
awkward::UnmaskedForm::purelist_depth
int64_t purelist_depth() const override
The list-depth of this array, not counting any contained within a RecordForm.
awkward::UnmaskedForm::with_form_key
const FormPtr with_form_key(const FormKey &form_key) const override
Copies this node, adding or replacing a form_key.
awkward::UnmaskedForm::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::UnmaskedForm::simplify_optiontype
const FormPtr simplify_optiontype() const
awkward::UnmaskedForm::istuple
bool istuple() const override
Returns true if the outermost RecordArray is a tuple.
awkward::UnmaskedForm::shallow_copy
const FormPtr shallow_copy() const override
Copies this node without copying any nodes hierarchically nested within it.
awkward::UnmaskedForm::tojson_part
void tojson_part(ToJson &builder, bool verbose) const override
Internal function to produce a JSON representation one node at a time.
awkward::UnmaskedForm::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::UnmaskedForm::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::UnmaskedForm::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::UnmaskedForm::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::UnmaskedForm::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::UnmaskedForm::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::UnmaskedForm::content
const FormPtr content() const
awkward::UnmaskedForm::getitem_field
const FormPtr getitem_field(const std::string &key) const override
Returns the Form that would result from a field-slice.
awkward::UnmaskedForm::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::UnmaskedForm::type
const TypePtr type(const util::TypeStrs &typestrs) const override
High-level Type describing this Form.
awkward::UnmaskedForm::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::UnmaskedForm::UnmaskedForm
UnmaskedForm(bool has_identities, const util::Parameters &parameters, const FormKey &form_key, const FormPtr &content)
Creates a UnmaskedForm. See UnmaskedArray for documentation.
awkward::UnmaskedForm::haskey
bool haskey(const std::string &key) const override
Returns true if the array contains a RecordForm with the specified key; false otherwise.
awkward::UnmaskedForm::purelist_isregular
bool purelist_isregular() const override
Returns true if all nested lists down to the first RecordForm are RegularForm nodes; false otherwise.
awkward::UnmaskedForm::dimension_optiontype
bool dimension_optiontype() const override
Returns true if this dimension has option-type; false otherwise.
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