MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ sort_regions_by_dimension()

void MayaFlux::Kakshya::sort_regions_by_dimension ( std::vector< Region > &  regions,
size_t  dimension 
)

Sort a vector of Regions by a specific dimension.

Parameters
regionsVector of Regions to sort.
dimensionDimension index to sort by.

Definition at line 114 of file RegionUtils.cpp.

115{
116 std::ranges::sort(regions,
117 [dimension](const Region& a, const Region& b) {
118 if (dimension < a.start_coordinates.size() && dimension < b.start_coordinates.size())
119 return a.start_coordinates[dimension] < b.start_coordinates[dimension];
120 return false;
121 });
122}
std::vector< uint64_t > start_coordinates
Starting frame index (inclusive)
Definition Region.hpp:69
Represents a point or span in N-dimensional space.
Definition Region.hpp:67

References sort_regions_by_dimension(), and MayaFlux::Kakshya::Region::start_coordinates.

Referenced by sort_regions_by_dimension().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: