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

◆ subtree_range()

std::optional< RowRange > MayaFlux::Kakshya::ForestIndex::subtree_range ( size_t row) const
nodiscardnoexcept

Consecutive rows of the subtree of row.

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

Definition at line 87 of file ForestIndex.cpp.

88{
89 if (!m_preorder || row >= m_parent.size())
90 return std::nullopt;
91 return RowRange { .first = row, .count = static_cast<size_t>(m_subtree_size[row]) };
92}
std::vector< uint64_t > m_parent
std::vector< uint64_t > m_subtree_size

References m_parent, m_preorder, and m_subtree_size.

Referenced by MayaFlux::Kakshya::copy_forest_subtree(), and MayaFlux::Kakshya::forest_subtree_region().

Here is the caller graph for this function: