-----------------------------------------------------------------------------
| 1314 | std::span<const int> IndexMap::dest() const noexcept { return _dest; } |
| 1315 | //----------------------------------------------------------------------------- |
| 1316 | std::vector<std::int32_t> IndexMap::weights_src() const |
| 1317 | { |
| 1318 | std::vector<std::int32_t> weights(_src.size(), 0); |
| 1319 | for (int r : _owners) |
| 1320 | { |
| 1321 | auto it = std::ranges::lower_bound(_src, r); |
| 1322 | assert(it != _src.end() and *it == r); |
| 1323 | std::size_t pos = std::distance(_src.begin(), it); |
| 1324 | assert(pos < weights.size()); |
| 1325 | weights[pos] += 1; |
| 1326 | } |
| 1327 | |
| 1328 | return weights; |
| 1329 | } |
| 1330 | //----------------------------------------------------------------------------- |
| 1331 | std::vector<std::int32_t> IndexMap::weights_dest() const |
| 1332 | { |