Sort regions by a specific attribute (numeric).
- Parameters
-
| attr_name | The attribute name. |
Definition at line 149 of file RegionGroup.hpp.
150 {
152 [&attr_name](
const Region&
a,
const Region&
b) {
153 auto a_val =
a.get_attribute<
double>(attr_name);
154 auto b_val =
b.get_attribute<
double>(attr_name);
155 if (a_val && b_val)
156 return *a_val < *b_val;
157 return false;
158 });
159 }
std::vector< Region > regions
Collection of regions belonging to this group.
References a, and b.