mmcfilters
Public API documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
mmcfilters::DistanceTransformProfiles Class Reference

Compact CSR-like sparse distance histograms for every live tree node. More...

#include <DistanceTransformProfiles.hpp>

Classes

struct  Span
 Offset and length of one node histogram in the flat bin array. More...
 

Public Member Functions

 DistanceTransformProfiles (DistanceTransformAccuracy accuracy, std::vector< DistanceTransformHistogramBin > bins, std::vector< Span > spans, std::vector< std::uint8_t > alive)
 Constructs validated CSR-like profiles.
 
DistanceTransformAccuracy accuracy () const noexcept
 Returns the numerical backend used to produce the profiles.
 
std::size_t numNodeSlots () const noexcept
 Returns the number of addressable internal node slots.
 
std::size_t numBins () const noexcept
 Returns the number of bins stored across all live nodes.
 
std::span< const DistanceTransformHistogramBin > histogram (NodeId node) const
 Returns the sorted sparse histogram for one live internal node.
 
std::vector< DistanceTransformSurvivalBin > survivalProfile (NodeId node) const
 Computes counts at or above every represented squared-distance level.
 

Detailed Description

Compact CSR-like sparse distance histograms for every live tree node.

Definition at line 16 of file DistanceTransformProfiles.hpp.

Constructor & Destructor Documentation

◆ DistanceTransformProfiles()

mmcfilters::DistanceTransformProfiles::DistanceTransformProfiles ( DistanceTransformAccuracy  accuracy,
std::vector< DistanceTransformHistogramBin >  bins,
std::vector< Span >  spans,
std::vector< std::uint8_t >  alive 
)
inline

Constructs validated CSR-like profiles.

Parameters
accuracyNumerical backend that produced the profiles.
binsFlat sorted-bin storage.
spansPer-node offsets and lengths into bins.
alivePer-node liveness flags aligned with spans.

Definition at line 33 of file DistanceTransformProfiles.hpp.

Member Function Documentation

◆ accuracy()

DistanceTransformAccuracy mmcfilters::DistanceTransformProfiles::accuracy ( ) const
inlinenoexcept

Returns the numerical backend used to produce the profiles.

Returns
Accuracy selection.

Definition at line 57 of file DistanceTransformProfiles.hpp.

◆ histogram()

std::span< const DistanceTransformHistogramBin > mmcfilters::DistanceTransformProfiles::histogram ( NodeId  node) const
inline

Returns the sorted sparse histogram for one live internal node.

Parameters
nodeLive internal node id.
Returns
Borrowed span of strictly increasing squared-distance bins.

Definition at line 68 of file DistanceTransformProfiles.hpp.

◆ numBins()

std::size_t mmcfilters::DistanceTransformProfiles::numBins ( ) const
inlinenoexcept

Returns the number of bins stored across all live nodes.

Returns
Flat bin count.

Definition at line 61 of file DistanceTransformProfiles.hpp.

◆ numNodeSlots()

std::size_t mmcfilters::DistanceTransformProfiles::numNodeSlots ( ) const
inlinenoexcept

Returns the number of addressable internal node slots.

Returns
Node-slot count.

Definition at line 59 of file DistanceTransformProfiles.hpp.

◆ survivalProfile()

std::vector< DistanceTransformSurvivalBin > mmcfilters::DistanceTransformProfiles::survivalProfile ( NodeId  node) const
inline

Computes counts at or above every represented squared-distance level.

Parameters
nodeLive internal node id.
Returns
Owning survival-profile bins in increasing threshold order.

Definition at line 78 of file DistanceTransformProfiles.hpp.


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