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

◆ forest_subtree_region()

MAYAFLUX_API std::optional< Region > MayaFlux::Kakshya::forest_subtree_region ( const ForestIndex & index,
size_t row )
nodiscard

One-axis Region covering the subtree of row, inclusive.

Any Region consumer then applies to a branch: CompositeContainer region copies and slices, and Yantra region inference.

Returns
The Region, or nullopt when the rows are not preorder or row is out of range.

Definition at line 23 of file CompositeForest.cpp.

24{
25 const auto range = index.subtree_range(row);
26 if (!range)
27 return std::nullopt;
28 return Region(std::vector<uint64_t> { range->first },
29 std::vector<uint64_t> { range->first + range->count - 1 });
30}
std::optional< RowRange > subtree_range(size_t row) const noexcept
Consecutive rows of the subtree of row.
Represents a point or span in N-dimensional space.
Definition Region.hpp:74

References MayaFlux::Kakshya::ForestIndex::subtree_range().

Referenced by MayaFlux::Kakshya::CompositeForest::subtree_region().

Here is the call graph for this function:
Here is the caller graph for this function: