MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ subtree()

template<FieldArray Array>
auto MayaFlux::Kakshya::DataForestTraversal< Array >::subtree ( size_t row) const
inlinenodiscard

Borrow the rows of the subtree of row, including row itself.

Returns
The array's slice, or an empty result when the rows are not preorder, row is out of range, or the index does not match the array.

Definition at line 100 of file DataForestTraversal.hpp.

101 {
102 using Slice = decltype(m_array->slice(size_t {}, size_t {}));
103 const auto range = m_index->subtree_range(row);
104 if (!range || !matches())
105 return Slice {};
106 return m_array->slice(range->first, range->count);
107 }
bool matches() const
Whether the index and array have the same number of rows.
On-demand walks over the parent links of an indexed array.

References m_array, m_index, and matches().

Here is the call graph for this function: