MorphologicalAttributeFilters
Public API documentation
Loading...
Searching...
No Matches
Concepts | Typedefs | Variables
Altitude.hpp File Reference

Shared altitude type contracts and buffer aliases. More...

#include <concepts>
#include <cstdint>
#include <span>
#include <type_traits>
#include <vector>
Include dependency graph for Altitude.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Concepts

concept  mmcfilters::AltitudeValue
 Value types accepted by generic altitude helpers.
 

Typedefs

template<AltitudeValue T>
using mmcfilters::AltitudeSpan = std::span< const T >
 Read-only contiguous view over node altitudes.
 
template<AltitudeValue T>
using mmcfilters::AltitudeDiff = typename detail::AltitudeDiffSelector< T >::type
 Arithmetic result type for altitude differences.
 
template<AltitudeValue T>
using mmcfilters::AltitudeBuffer = std::vector< T >
 Owning dense altitude buffer indexed by internal node id.
 

Variables

template<class T >
constexpr bool mmcfilters::detail::SupportedIntegralAltitude
 True when T is an integral altitude type with safe 64-bit differences.
 
template<class T >
constexpr bool mmcfilters::detail::SupportedFloatingAltitude = std::is_floating_point_v<std::remove_cv_t<T>>
 True when T is a floating-point altitude type.
 

Detailed Description

Shared altitude type contracts and buffer aliases.

Definition in file Altitude.hpp.

Typedef Documentation

◆ AltitudeBuffer

template<AltitudeValue T>
using mmcfilters::AltitudeBuffer = typedef std::vector<T>

Owning dense altitude buffer indexed by internal node id.

WeightedMorphologicalTree<T> owns one of these buffers. Read-only kernels may instead accept an AltitudeSpan<T> or WeightedTreeView<T> when the topology and altitude storage have separate owners.

Definition at line 84 of file Altitude.hpp.

◆ AltitudeDiff

template<AltitudeValue T>
using mmcfilters::AltitudeDiff = typedef typename detail::AltitudeDiffSelector<T>::type

Arithmetic result type for altitude differences.

Integral altitudes use a signed 64-bit difference type to avoid narrowing when comparing typed trees whose altitude domain is wider than uint8_t. Floating-point altitudes keep their own precision so callers can express real-valued deltas such as 0.05f.

Definition at line 74 of file Altitude.hpp.

◆ AltitudeSpan

template<AltitudeValue T>
using mmcfilters::AltitudeSpan = typedef std::span<const T>

Read-only contiguous view over node altitudes.

The span is indexed by dense internal NodeId. Callers must provide at least one value for every internal node slot in the associated topology.

Definition at line 54 of file Altitude.hpp.

Variable Documentation

◆ SupportedFloatingAltitude

template<class T >
constexpr bool mmcfilters::detail::SupportedFloatingAltitude = std::is_floating_point_v<std::remove_cv_t<T>>
inlineconstexpr

True when T is a floating-point altitude type.

Definition at line 26 of file Altitude.hpp.

◆ SupportedIntegralAltitude

template<class T >
constexpr bool mmcfilters::detail::SupportedIntegralAltitude
inlineconstexpr
Initial value:
=
std::is_integral_v<std::remove_cv_t<T>> &&
sizeof(std::remove_cv_t<T>) < sizeof(std::int64_t)

True when T is an integral altitude type with safe 64-bit differences.

Definition at line 20 of file Altitude.hpp.