mmcfilters
Public API documentation
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | List of all members
mmcfilters::attributes::computers::TreeTopologyComputer Class Reference

Computes structural descriptors that depend only on the tree topology. More...

#include <TreeTopologyComputer.hpp>

Static Public Member Functions

template<std::floating_point Real>
static void compute (const AttributeComputeContext< Real > &context)
 Computes the requested topology descriptors.
 
template<std::floating_point Real>
static void computeUnitRows (const UnitAttributeComputeContext< Real > &context)
 Materializes topology descriptors for one-pixel unit supports.
 

Static Public Attributes

static constexpr std::string_view familyName = "tree-topology"
 Family name used in dependency-plan diagnostics.
 
static constexpr AttributeComputerFamily family = AttributeComputerFamily::TreeTopology
 Stable family id used by the scheduler.
 
static constexpr AttributeComputerDomain domain = AttributeComputerDomain::Topology
 Execution domain required by the computer.
 
static constexpr std::array< Attribute, 11 > producedAttributes
 Canonical list of topology-derived descriptors produced by this computer.
 

Detailed Description

Computes structural descriptors that depend only on the tree topology.

This computer ignores the image-domain geometry and uses only the parent / child relationships encoded in the hierarchy. The descriptors cover:

Some of these descriptors depend on intermediate quantities that are also public outputs, such as subtree height or number of descendants. To avoid forcing callers to request those attributes explicitly, the implementation allocates temporary scratch buffers whenever an intermediate quantity is needed internally but is not part of the requested output set.

The computation is incremental:

Definition at line 227 of file TreeTopologyComputer.hpp.

Member Function Documentation

◆ compute()

template<std::floating_point Real>
static void mmcfilters::attributes::computers::TreeTopologyComputer::compute ( const AttributeComputeContext< Real > &  context)
inlinestatic

Computes the requested topology descriptors.

The computation is topology-only and ignores altitude/dependencies. All output rows are indexed by dense internal node id. Intermediate quantities such as height, depth, and descendant counts are kept in scratch storage when they are needed to derive a requested descriptor but are not themselves requested as public columns.

Parameters
contextOperation context or diagnostic label.

Definition at line 257 of file TreeTopologyComputer.hpp.

◆ computeUnitRows()

template<std::floating_point Real>
static void mmcfilters::attributes::computers::TreeTopologyComputer::computeUnitRows ( const UnitAttributeComputeContext< Real > &  context)
inlinestatic

Materializes topology descriptors for one-pixel unit supports.

A unit proper part is represented as a degenerate one-node tree: root and leaf flags are true, depths/heights/child counts are zero, and leaf ratio is one.

Parameters
contextOperation context or diagnostic label.

Definition at line 273 of file TreeTopologyComputer.hpp.

Member Data Documentation

◆ domain

constexpr AttributeComputerDomain mmcfilters::attributes::computers::TreeTopologyComputer::domain = AttributeComputerDomain::Topology
staticconstexpr

Execution domain required by the computer.

Definition at line 236 of file TreeTopologyComputer.hpp.

◆ family

constexpr AttributeComputerFamily mmcfilters::attributes::computers::TreeTopologyComputer::family = AttributeComputerFamily::TreeTopology
staticconstexpr

Stable family id used by the scheduler.

Definition at line 233 of file TreeTopologyComputer.hpp.

◆ familyName

constexpr std::string_view mmcfilters::attributes::computers::TreeTopologyComputer::familyName = "tree-topology"
staticconstexpr

Family name used in dependency-plan diagnostics.

Definition at line 230 of file TreeTopologyComputer.hpp.

◆ producedAttributes

constexpr std::array<Attribute, 11> mmcfilters::attributes::computers::TreeTopologyComputer::producedAttributes
inlinestaticconstexpr
Initial value:
{SubtreeHeight, DepthNode, IsLeafNode, IsRootNode,
NumChildrenNode, NumSiblingsNode, NumDescendantsNode, NumLeafDescendantsNode,
LeafRatioNode, BalanceNode, AvgChildHeightNode}

Canonical list of topology-derived descriptors produced by this computer.

Definition at line 241 of file TreeTopologyComputer.hpp.


The documentation for this class was generated from the following file: