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

◆ find_references_in_region()

std::vector< std::pair< std::string, Region > > MayaFlux::Kakshya::find_references_in_region ( const std::vector< std::pair< std::string, Region > > &  refs,
const Region region 
)

Find all references in a reference list that overlap a given region.

Parameters
refsReference list (name, Region) pairs.
regionRegion to check for overlap.
Returns
Vector of (name, Region) pairs that overlap.

Definition at line 155 of file RegionUtils.cpp.

157{
158 std::vector<std::pair<std::string, Region>> result;
159
160 std::ranges::copy_if(refs, std::back_inserter(result),
161 [&region](const auto& pair) { return region.contains(pair.second.start_coordinates); });
162 return result;
163}
bool contains(const std::vector< uint64_t > &coordinates) const
Check if the given coordinates are contained within this region.
Definition Region.hpp:248

References MayaFlux::Kakshya::Region::contains(), and find_references_in_region().

Referenced by find_references_in_region().

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