Extract bounds information from region group.
302{
303 std::unordered_map<std::string, std::any> bounds_info;
304
306 return bounds_info;
307 }
308
309 const auto& first_region = group.
regions[0];
310 std::vector<uint64_t> min_coords = first_region.start_coordinates;
311 std::vector<uint64_t> max_coords = first_region.end_coordinates;
312
313 for (
size_t i = 1; i < group.
regions.size(); ++i) {
314 const auto& region = group.
regions[i];
315
316 for (size_t j = 0; j < min_coords.size() && j < region.start_coordinates.size(); ++j) {
317 min_coords[j] = std::min(min_coords[j], region.start_coordinates[j]);
318 }
319
320 for (size_t j = 0; j < max_coords.size() && j < region.end_coordinates.size(); ++j) {
321 max_coords[j] = std::max(max_coords[j], region.end_coordinates[j]);
322 }
323 }
324
325 bounds_info[
"group_name"] = group.
name;
326 bounds_info[
"num_regions"] = group.
regions.size();
327 bounds_info["bounding_min"] = min_coords;
328 bounds_info["bounding_max"] = max_coords;
329 bounds_info[
"group_attributes"] = group.
attributes;
330
331 return bounds_info;
332}
std::unordered_map< std::string, std::any > attributes
Flexible key-value store for group-specific attributes.
std::vector< Region > regions
Collection of regions belonging to this group.
std::string name
Descriptive name of the group.