|
MorphologicalAttributeFilters
Public API documentation
|
Layout for node attributes sampled at signed ancestor/current/descendant offsets. More...
#include <AttributeNames.hpp>
Public Member Functions | |
| NodeAttributeSampleLayout (std::unordered_map< NodeAttributeSampleKey, int > &&map) | |
| Constructs a layout from an already validated offset map. | |
| int | getIndex (Attribute attribute, int sampleOffset) const |
Returns the per-node offset associated with (attribute, sampleOffset). | |
| int | getIndex (NodeAttributeSampleKey sampleKey) const |
| Returns the per-node offset associated with a composite sample key. | |
| int | linearIndex (int nodeIndex, Attribute attribute, int sampleOffset) const |
| Returns the linear index in the flat buffer for a given node and sampled attribute. | |
| int | linearIndex (int nodeIndex, NodeAttributeSampleKey sampleKey) const |
Convenience overload taking a NodeAttributeSampleKey. | |
Static Public Member Functions | |
| static NodeAttributeSampleLayout | create (int samplingRadius, const std::vector< Attribute > &attributes) |
Builds the canonical dense layout for offsets in [-samplingRadius, samplingRadius]. | |
| static std::string | toString (NodeAttributeSampleKey sampleKey) |
| Returns a human-readable label for a composite key. | |
| static std::string | toString (Attribute attribute, int sampleOffset) |
| Returns a serialized label for an attribute at a sample offset. | |
Public Attributes | |
| std::unordered_map< NodeAttributeSampleKey, int > | indexMap |
Maps each (attribute, sampleOffset) key to its per-node offset. | |
| const int | NUM_ATTRIBUTES |
| Number of sampled entries stored for each node. | |
Layout for node attributes sampled at signed ancestor/current/descendant offsets.
The layout is node-major: for a given node, all requested sample positions are stored contiguously. NUM_ATTRIBUTES therefore counts the number of (attribute, sampleOffset) entries associated with each node.
Definition at line 32 of file AttributeNames.hpp.
|
inline |
Constructs a layout from an already validated offset map.
The constructor takes ownership of map and derives the per-node stride from its final size.
| map | Mapping used to initialize the layout. |
Definition at line 48 of file AttributeNames.hpp.
|
inlinestatic |
Builds the canonical dense layout for offsets in [-samplingRadius, samplingRadius].
| samplingRadius | Maximum ancestor/descendant sample offset. |
| attributes | Attributes requested by the operation. |
Definition at line 58 of file AttributeNames.hpp.
|
inline |
Returns the per-node offset associated with (attribute, sampleOffset).
| attribute | Attribute requested by the operation. |
| sampleOffset | Signed sample coordinate. |
Definition at line 79 of file AttributeNames.hpp.
|
inline |
Returns the per-node offset associated with a composite sample key.
| sampleKey | Composite sampled-attribute key. |
Definition at line 89 of file AttributeNames.hpp.
|
inline |
Returns the linear index in the flat buffer for a given node and sampled attribute.
| nodeIndex | Index. |
| attribute | Attribute requested by the operation. |
| sampleOffset | Signed sample coordinate. |
Definition at line 100 of file AttributeNames.hpp.
|
inline |
Convenience overload taking a NodeAttributeSampleKey.
| nodeIndex | Index. |
| sampleKey | Composite sampled-attribute key. |
Definition at line 111 of file AttributeNames.hpp.
|
inlinestatic |
Returns a serialized label for an attribute at a sample offset.
| attribute | Attribute requested by the operation. |
| sampleOffset | Signed sample coordinate. |
Definition at line 132 of file AttributeNames.hpp.
|
inlinestatic |
Returns a human-readable label for a composite key.
| sampleKey | Composite sampled-attribute key. |
Definition at line 121 of file AttributeNames.hpp.
| std::unordered_map<NodeAttributeSampleKey, int> mmcfilters::NodeAttributeSampleLayout::indexMap |
Maps each (attribute, sampleOffset) key to its per-node offset.
Definition at line 35 of file AttributeNames.hpp.
Number of sampled entries stored for each node.
Definition at line 38 of file AttributeNames.hpp.