|
mmcfilters
Public API documentation
|
Non-owning view pairing a topology with an external altitude span. More...
#include <ValuedMorphologicalTreeView.hpp>
Public Types | |
| using | AltitudeType = T |
| Altitude scalar type borrowed by this view. | |
Public Member Functions | |
| ValuedMorphologicalTreeView (const MorphologicalTree &topology, NodeAltitudeSpan< T > altitude) | |
| Builds a view over caller-owned topology and altitude storage. | |
| ValuedMorphologicalTreeView (const MorphologicalTree &topology, const NodeAltitudeBuffer< T > &altitude) | |
| Builds a view over a caller-owned altitude buffer. | |
| ValuedMorphologicalTreeView (const MorphologicalTree &, NodeAltitudeBuffer< T > &&)=delete | |
| Rejects temporary altitude buffers that would leave a dangling span. | |
| const MorphologicalTree & | topology () const noexcept |
| Returns the borrowed tree topology. | |
| NodeAltitudeSpan< T > | nodeAltitudes () const noexcept |
Returns the borrowed altitude span indexed by internal NodeId. | |
| void | requireTopologyUnchanged (const char *context) const |
| Throws if the borrowed topology changed since view construction. | |
| T | nodeAltitude (NodeId nodeId) const |
| Returns the altitude associated with an internal node id. | |
| AltitudeDifference< T > | nodeResidue (NodeId nodeId) const |
| Returns the altitude difference between a live node and its parent. | |
Non-owning view pairing a topology with an external altitude span.
ValuedMorphologicalTreeView is the lightweight C++ representation of the Higra-like model used by generic-altitude kernels: topology storage stays elsewhere, and node altitudes are borrowed as a contiguous read-only span indexed by the dense internal NodeId domain. The caller must keep both the topology and the altitude storage alive for the lifetime of the view. The view intentionally carries no ownership or canonical-tree identity; operations that need owned valued state must receive a ValuedMorphologicalTree<T> instead.
Definition at line 24 of file ValuedMorphologicalTreeView.hpp.
| using mmcfilters::ValuedMorphologicalTreeView< T >::AltitudeType = T |
Altitude scalar type borrowed by this view.
Definition at line 43 of file ValuedMorphologicalTreeView.hpp.
|
inlineexplicit |
Builds a view over caller-owned topology and altitude storage.
The span must be indexed by the dense internal NodeId domain and remain alive for the full lifetime of the view.
| topology | Tree topology. |
| altitude | Altitude data indexed by node identifier. |
Definition at line 54 of file ValuedMorphologicalTreeView.hpp.
|
inlineexplicit |
Builds a view over a caller-owned altitude buffer.
This overload is equivalent to passing std::span<const T>(altitude) and exists so ValuedMorphologicalTreeView(tree, buffer) deduces the altitude type.
| topology | Tree topology. |
| altitude | Altitude data indexed by node identifier. |
Definition at line 68 of file ValuedMorphologicalTreeView.hpp.
|
inline |
Returns the altitude associated with an internal node id.
| nodeId | Dense internal node identifier. |
Definition at line 105 of file ValuedMorphologicalTreeView.hpp.
|
inlinenoexcept |
Returns the borrowed altitude span indexed by internal NodeId.
Definition at line 90 of file ValuedMorphologicalTreeView.hpp.
|
inline |
Returns the altitude difference between a live node and its parent.
The project adopts a fixed zero reconstruction baseline. Root-like nodes, whose parent is invalid or themselves, therefore use their own altitude as residue.
| nodeId | Dense internal node identifier. |
Definition at line 121 of file ValuedMorphologicalTreeView.hpp.
|
inline |
Throws if the borrowed topology changed since view construction.
| context | Operation context or diagnostic label. |
Definition at line 97 of file ValuedMorphologicalTreeView.hpp.
|
inlinenoexcept |
Returns the borrowed tree topology.
Definition at line 83 of file ValuedMorphologicalTreeView.hpp.