22 swaths = std::move(sorted_swaths);
29 std::sort(unique.begin(), unique.end());
30 auto last = std::unique(unique.begin(), unique.end());
31 unique.erase(last, unique.end());
34 throw std::invalid_argument(
35 "Order vector does not contain unique elements.");
39 throw std::length_error(
40 "Lengths of the order vector and swaths must be the same.");
43 if (max_el >
swaths.size() - 1) {
44 throw std::invalid_argument( \
45 "Custom order element is out of the swath range [" + \