MorphologicalAttributeFilters
Public API documentation
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
mmcfilters::ComputedAttributeData< Real > Struct Template Reference

Owning result for one computed scalar attribute layout and buffer. More...

#include <AttributeResultTypes.hpp>

Collaboration diagram for mmcfilters::ComputedAttributeData< Real >:
Collaboration graph
[legend]

Public Member Functions

 ComputedAttributeData (AttributeNames attrNames, std::vector< Real > buffer, NodeIdSpace outputSpace=NodeIdSpace::MORPHOLOGICAL_TREE)
 Takes ownership of a scalar-attribute layout and its flat buffer.
 
 ComputedAttributeData (const ComputedAttributeData &)=delete
 
ComputedAttributeDataoperator= (const ComputedAttributeData &)=delete
 
 ComputedAttributeData (ComputedAttributeData &&) noexcept=default
 Transfers ownership of the layout, buffer, and node-id-space marker.
 
ComputedAttributeDataoperator= (ComputedAttributeData &&)=delete
 
AttributeNamesattributeNames () noexcept
 Returns the mutable attribute layout.
 
const AttributeNamesattributeNames () const noexcept
 Returns the immutable attribute layout.
 
std::vector< Real > & values () noexcept
 Returns the mutable flat attribute buffer.
 
const std::vector< Real > & values () const noexcept
 Returns the immutable flat attribute buffer.
 

Public Attributes

AttributeNames first
 Layout used to interpret second; kept public for tuple-like access.
 
std::vector< Realsecond
 Flat per-node attribute buffer indexed through first.
 
NodeIdSpace nodeIdSpace = NodeIdSpace::MORPHOLOGICAL_TREE
 Node-id domain used by the rows of second.
 

Detailed Description

template<std::floating_point Real = float>
struct mmcfilters::ComputedAttributeData< Real >

Owning result for one computed scalar attribute layout and buffer.

A computed attribute result is defined by three pieces of information:

The result is move-only on purpose: the public API treats each computed buffer as having a single owner. Internal dependency reuse is implemented by detail/AttributeDependencyCache.hpp, so ordinary callers do not need to traffic in borrowed cache views.

The public fields remain named first and second so existing direct uses and structured bindings keep working naturally.

Definition at line 33 of file AttributeResultTypes.hpp.

Constructor & Destructor Documentation

◆ ComputedAttributeData()

template<std::floating_point Real = float>
mmcfilters::ComputedAttributeData< Real >::ComputedAttributeData ( AttributeNames  attrNames,
std::vector< Real buffer,
NodeIdSpace  outputSpace = NodeIdSpace::MORPHOLOGICAL_TREE 
)
inline

Takes ownership of a scalar-attribute layout and its flat buffer.

Parameters
attrNamesLayout that maps attributes to per-node offsets.
bufferAttribute values stored in node-major order.
outputSpaceNode-id domain used by the buffer rows.

Definition at line 50 of file AttributeResultTypes.hpp.

Member Function Documentation

◆ attributeNames() [1/2]

template<std::floating_point Real = float>
const AttributeNames & mmcfilters::ComputedAttributeData< Real >::attributeNames ( ) const
inlinenoexcept

Returns the immutable attribute layout.

Definition at line 65 of file AttributeResultTypes.hpp.

◆ attributeNames() [2/2]

template<std::floating_point Real = float>
AttributeNames & mmcfilters::ComputedAttributeData< Real >::attributeNames ( )
inlinenoexcept

Returns the mutable attribute layout.

Definition at line 62 of file AttributeResultTypes.hpp.

◆ values() [1/2]

template<std::floating_point Real = float>
const std::vector< Real > & mmcfilters::ComputedAttributeData< Real >::values ( ) const
inlinenoexcept

Returns the immutable flat attribute buffer.

Definition at line 71 of file AttributeResultTypes.hpp.

◆ values() [2/2]

template<std::floating_point Real = float>
std::vector< Real > & mmcfilters::ComputedAttributeData< Real >::values ( )
inlinenoexcept

Returns the mutable flat attribute buffer.

Definition at line 68 of file AttributeResultTypes.hpp.

Member Data Documentation

◆ first

template<std::floating_point Real = float>
AttributeNames mmcfilters::ComputedAttributeData< Real >::first

Layout used to interpret second; kept public for tuple-like access.

Definition at line 35 of file AttributeResultTypes.hpp.

◆ nodeIdSpace

template<std::floating_point Real = float>
NodeIdSpace mmcfilters::ComputedAttributeData< Real >::nodeIdSpace = NodeIdSpace::MORPHOLOGICAL_TREE

Node-id domain used by the rows of second.

Definition at line 41 of file AttributeResultTypes.hpp.

◆ second

template<std::floating_point Real = float>
std::vector<Real> mmcfilters::ComputedAttributeData< Real >::second

Flat per-node attribute buffer indexed through first.

Definition at line 38 of file AttributeResultTypes.hpp.


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