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

Computes the canonical subtree area attribute. More...

#include <AreaComputer.hpp>

Static Public Member Functions

template<std::floating_point Real>
static void compute (const AttributeComputeContext< Real > &context)
 Computes area by summing direct proper-part counts bottom-up.
 
template<std::floating_point Real>
static void computeUnitRows (const UnitAttributeComputeContext< Real > &context)
 Materializes AREA for one-pixel unit supports.
 

Static Public Attributes

static constexpr std::string_view familyName = "area"
 Family name used in dependency-plan diagnostics.
 
static constexpr AttributeComputerFamily family = AttributeComputerFamily::Area
 Stable family id used by the scheduler.
 
static constexpr AttributeComputerDomain domain = AttributeComputerDomain::Topology
 Execution domain required by the computer.
 
static constexpr std::array< Attribute, 1 > producedAttributes {Area}
 Canonical list of attributes produced by this computer.
 

Detailed Description

Computes the canonical subtree area attribute.

AREA is the most basic size descriptor in the hierarchy and is defined as the number of proper parts covered by the full support of a node, including the supports contributed by all of its descendants. In image-domain trees, this corresponds to the number of pixels represented by the connected component associated with the node.

The implementation follows a post-order accumulation:

Several other attribute computers depend on AREA, so this computer serves as a foundational building block for the incremental attribute pipeline.

Definition at line 64 of file AreaComputer.hpp.

Member Function Documentation

◆ compute()

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

Computes area by summing direct proper-part counts bottom-up.

The context buffer is written in dense internal-node order. The request subset is ignored because AreaComputer produces a single descriptor; callers are responsible for passing an AttributeNames layout containing AREA.

Parameters
contextNon-owning compute context whose layout contains AREA.

Definition at line 91 of file AreaComputer.hpp.

◆ computeUnitRows()

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

Materializes AREA for one-pixel unit supports.

Every exported unit proper part has area 1.

Parameters
contextOperation context or diagnostic label.

Definition at line 104 of file AreaComputer.hpp.

Member Data Documentation

◆ domain

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

Execution domain required by the computer.

Definition at line 73 of file AreaComputer.hpp.

◆ family

constexpr AttributeComputerFamily mmcfilters::attributes::computers::AreaComputer::family = AttributeComputerFamily::Area
staticconstexpr

Stable family id used by the scheduler.

Definition at line 70 of file AreaComputer.hpp.

◆ familyName

constexpr std::string_view mmcfilters::attributes::computers::AreaComputer::familyName = "area"
staticconstexpr

Family name used in dependency-plan diagnostics.

Definition at line 67 of file AreaComputer.hpp.

◆ producedAttributes

constexpr std::array<Attribute, 1> mmcfilters::attributes::computers::AreaComputer::producedAttributes {Area}
inlinestaticconstexpr

Canonical list of attributes produced by this computer.

Definition at line 78 of file AreaComputer.hpp.


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